/* ============================================================
   AllocLab 2.0 Reset（mobile-first，Pico 之後載入）
   ------------------------------------------------------------
   補強 Pico 缺的部分，不重寫已設定的 box-sizing 等。
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* CJK 預設：不在中文字中間斷行、讓英文長詞可折；防手機窄容器把中文逐字斷成直排 */
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

/* tap highlight 改成 accent 色，消 iOS 預設藍光 */
html {
  -webkit-tap-highlight-color: rgba(110, 143, 179, 0.15);
}

/* 消 iOS input 圓角與內陰影 */
input, textarea, button, select {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

/* 禁止圖片超出容器 */
img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* scroll 慣性 */
body {
  -webkit-overflow-scrolling: touch;
}

/* 統一 focus ring（取代 browser 預設） */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-xs);
}

/* reduce motion 尊重 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
