/** 轻量提示（对齐移动端 uni.showToast 的常见用法） */
export function showToast(message: string, durationMs = 2500): void {
  const el = document.createElement('div')
  el.textContent = message
  el.setAttribute('role', 'status')
  el.style.cssText = [
    'position:fixed',
    'bottom:88px',
    'left:50%',
    'transform:translateX(-50%)',
    'max-width:min(90vw,360px)',
    'padding:10px 16px',
    'background:rgba(0,0,0,0.78)',
    'color:#fff',
    'font-size:14px',
    'line-height:1.4',
    'border-radius:8px',
    'z-index:100000',
    'pointer-events:none',
    'box-sizing:border-box',
    'word-break:break-word'
  ].join(';')
  document.body.appendChild(el)
  window.setTimeout(() => el.remove(), durationMs)
}
