/* 3D 運動頁共用的手機修正（2026-11-18，專案健檢 2-1、2-2、2-3）
   五頁（walking、running；cycling、surfing、badminton 由 build 腳本從 running 沿用頁首）都引用這個檔。
   使用者的手機規則：版面不超出螢幕、點擊目標 ≥ 44px、select 字級 ≥ 16px、3D 畫布不擋捲動。 */

/* 2-1：3D 區格線欄寬不能被長選項（找肌肉選單）撐開，否則整頁變寬、手機只能縮小顯示 */
.s3grid > * { min-width: 0 }
@media (max-width: 900px) { .s3grid { grid-template-columns: minmax(0, 1fr) } }
#s3mpick { width: 100%; max-width: 100% }
/* 頁首「運動系列」導覽：運動變多後一排放不下，允許換行、不撐寬頁首 */
header.top > * { min-width: 0 }
.series { flex-wrap: wrap; max-width: 100%; row-gap: 2px }

/* 2-2：手機上的點擊目標與字級 */
@media (max-width: 600px), (pointer: coarse) {
  select, input, textarea { font-size: 16px !important }
  button, .btn, select, .s3tl .btn, .s3cam .btn, .s3chips .btn, .jsel .btn { min-height: 44px; min-width: 44px }
  button, a.btn { display: inline-flex; align-items: center; justify-content: center }
  .secnav a, .series a { display: inline-flex; align-items: center; min-height: 44px }
  .secnav { padding-top: 4px; padding-bottom: 4px }
  summary { min-height: 44px; display: flex; align-items: center; gap: 6px }
  summary::before { content: "▸"; color: var(--muted, #888); font-size: .85em }
  details[open] > summary::before { content: "▾" }
  summary::-webkit-details-marker { display: none }
  label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 6px }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px }
  input[type=range] { min-height: 44px }
}

/* 2-3：手機第一次碰 3D 畫布時的操作提示（touch3d.js） */
.touch3d-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5;
  background: rgba(20, 20, 20, .82); color: #fff; font-size: 14px; line-height: 1.4; padding: 8px 14px;
  border-radius: 999px; pointer-events: none; white-space: nowrap; transition: opacity .4s }

/* 2-4（D-198，2026-12-02）：既有 < 44px 的點擊目標全部擴到 ≥ 44px；用負邊距、內距或透明點擊區，盡量不改視覺比例 */
@media (max-width: 600px), (pointer: coarse) {
  /* 核取方塊：點擊範圍 44×44，畫面上仍是 20px 方框（負邊距讓版面占位不變） */
  input[type=checkbox]:not(.jchip input) { appearance: none; -webkit-appearance: none; width: 44px; height: 44px; margin: -12px; flex: none; cursor: pointer; border: 0; border-radius: 0;
    background: linear-gradient(var(--surface, #fff), var(--surface, #fff)) center / 16px 16px no-repeat, linear-gradient(var(--muted, #777), var(--muted, #777)) center / 20px 20px no-repeat }
  input[type=checkbox]:not(.jchip input):checked { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat, linear-gradient(var(--accent, #2b6cb0), var(--accent, #2b6cb0)) center / 20px 20px no-repeat }
  input[type=checkbox]:not(.jchip input):focus-visible { outline: 2px solid var(--accent, #2b6cb0); outline-offset: -10px }
  label:has(> input[type=checkbox]:not(.jchip input)) { gap: 0 }
  .jchip input { width: 0 !important; height: 0 !important }   /* 關節膠囊：輸入框本來就隱藏，整顆膠囊（≥ 44px）才是點擊目標 */
  /* 下拉選單等的文字標籤 */
  label[for] { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px }
  /* 分期條：最窄的一格也至少 44px（其他格依比例縮）；8 格放不下時改兩排 */
  .phasebar > .seg { min-width: 44px }
  @media (max-width: 420px) {
    .phasebar:has(> .seg:nth-child(7)) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto }
    .phasebar:has(> .seg:nth-child(7)) > .seg { width: auto !important; min-height: 44px; border-bottom: 1px solid var(--line) }
  }
  /* 段落裡的連結（授權、骨骼特寫參考）與文獻交叉引用：上下擴大點擊區，行高不變 */
  .bsrc a[href], #sec-bone a[href] { padding: 14px 1px; margin: 0 -1px }
  a.cref { padding-top: 14.5px !important; padding-bottom: 14.5px !important }
  /* 功率峰值清單、2D 示意圖的關節點 */
  #powPeaks li { min-height: 44px }
  g.hot > circle[fill="transparent"] { transform: scale(2.1) }
  g.atag { pointer-events: none }   /* 角度小標籤蓋在關節點正中心，讓點擊落到下面的關節點（mobile-qa 回報） */
}
