/* LIGHT LAB v17 — スマホ幅（820px 以下）の手直し（2026-11-21）
   ・指で押しやすく：小さなボタン（高さ 24px 前後）を 34px 以上に。スイッチは見た目そのまま、押せる範囲だけ広げる
   ・下の行（カメラ設定）が「T2…」で切れる → カメラ設定を 1 行目、比と露出を 2 行目に分ける
   ・下のタブ 7 つが 8px はみ出す → 左右の余白を少し詰めて 1 行に収める
   PC の見た目は変えない（すべて max-width:820px の中） */
@media (max-width:820px){
  .seg button{min-height:32px;padding:5px 8px}
  #histSeg button{min-width:32px}
  .chip{min-height:32px}
  .topbar .chip{padding:5px 8px}
  .ltab{min-height:36px}
  .probadge{min-height:30px}
  .sw::before{content:'';position:absolute;left:-6px;right:-6px;top:-9px;bottom:-9px}
  button[aria-label=close]{min-width:36px;min-height:36px}
  input.num12,select.c13mini,#panel input[type=text],#panel input[type=number],#panel input:not([type]){min-height:32px}

  #tabs.tabs button{padding:10px 6px;flex:1 0 auto}

  .hud{flex-wrap:wrap;row-gap:3px}
  #camRead{flex:1 0 100%;white-space:normal}
}

/* v17-2（たかの実機の感想「ライト動かす時、上にスクロールするの大変」）
   ・画（カメラの画面）は上に固定。下の操作部分は、パネル全体を 1 本のスクロールにする
     （v16 は名前の帯と見本 6 つの帯が場所を取り、実際に動く所が高さ 100px しかなかった）
   ・タブは上に貼りつく。名前の帯・見本の帯は操作と一緒に上へ流れる
   ・画の高さは中身に合わせて詰める（ui13.js の fitStagePhone） */
@media (max-width:820px){
  #panel{display:block;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  #panel .scroll{overflow:visible;flex:none}
  #panel #tabs.tabs{position:sticky;top:0;z-index:4;background:var(--panel)}
  .hud{padding-right:124px}
  #topview{bottom:8px}
}
@media (max-width:820px){
  /* スライダーのつまみを指の大きさに（12px → 24px、押せる高さ 32px） */
  input[type=range]{height:32px}
  input[type=range]::-webkit-slider-thumb{width:24px;height:24px;margin-top:-11px}
  input[type=range]::-moz-range-thumb{width:24px;height:24px}
  /* ライトの選択（1 キー・2 フィル…）は、下へ送ってもタブのすぐ下に残す */
  #panel .ltabs{position:sticky;top:var(--tabsH,44px);z-index:3;background:var(--panel);padding:6px 0;margin-top:-6px}
}
@media (max-width:820px){
  /* ライトの欄：動かす操作（明るさ・距離・水平角・高さ角・向き・上から見た図）を上へ。機材や付けるものはその下 */
  #leditor{display:flex;flex-direction:column}
  #leditor>*{order:20}
  #leditor>.f9soloBtn{order:0}
  #leditor>.toggle{order:1}
  #leditor>.row:has(#lDim){order:2}
  #leditor>.row:has(#lDist){order:3}
  #leditor>.row:has(#lAz){order:4}
  #leditor>.row:has(#lEl){order:5}
  #leditor>.aim12{order:6}
}
@media (max-width:820px){
  /* iPhone：16px 未満の入力欄・選択欄を押すと画面が勝手に拡大されるので 16px に。ボタンの 2 回押しで拡大されないように */
  #panel select,#panel input[type=number],#panel input[type=text],#panel input:not([type]),#panel textarea{font-size:16px}
  button,select,input,#panel,.topbar{touch-action:manipulation}
}
