/* =========================
   mobilefix.css（HTML変更なし版）
   ========================= */

*{ box-sizing: border-box; }
img, iframe, video, embed, object{ max-width: 100%; }

@media (max-width: 820px){

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

  body{
    margin: 0 !important;
    padding: 16px !important;     /* ← はみ出すなら 16px 推奨 */
    overflow-x: hidden !important;
    font-size: 16px !important;   /* 文字小さいページ救済 */
    line-height: 1.55 !important;
  }

  img{
    max-width: 100% !important;
    height: auto !important;
  }

  iframe{
    max-width: 100% !important;
    height: auto !important;
  }
  iframe[src*="youtube.com"], iframe[src*="youtu.be"]{
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
  }

  table{
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
  td, th{
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  table[width], td[width], th[width]{
    width: auto !important;
    max-width: 100% !important;
  }

  pre, code{
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  font[size="-2"], font[size="-1"]{ font-size: 14px !important; }
  font[size="1"], font[size="2"], font[size="3"]{ font-size: 16px !important; }
  font[size="4"], font[size="5"], font[size="+1"], font[size="+2"]{ font-size: 18px !important; }
}