/* Only opted-in pages, only mobile. Original DOM/content order is retained.
   No rules outside this media query: desktop layout remains with its old CSS. */
@media screen and (max-width: 600px) {
  .rpm-content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* A table within a table must also release its column widths. Keep the tags,
     captions, headings, colspan/rowspan and source order; change layout only. */
  .rpm-content table,
  .rpm-content tbody,
  .rpm-content thead,
  .rpm-content tfoot,
  .rpm-content tr,
  .rpm-content td,
  .rpm-content th {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  .rpm-content table {
    table-layout: auto !important;
    border-spacing: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }
  .rpm-content tr,
  .rpm-content tbody,
  .rpm-content thead,
  .rpm-content tfoot { margin: 0 !important; padding: 0 !important; }
  .rpm-content td,
  .rpm-content th { margin: 0 !important; padding: 4px !important; }
  .rpm-content table img { max-width: 100% !important; height: auto !important; }
  .rpm-content table [nowrap],
  .rpm-content table nobr { white-space: normal !important; }
  .rpm-content .taxhist tr { margin-bottom: 10px !important; }
  .rpm-content .taxhist th { text-align: left; }

  /* aquafish/style/style.css: 750px + two 1px borders = 752px.
     The old right float and all five fixed boxes must become fluid together. */
  .rpm-aquafish #header,
  .rpm-aquafish #mainbox,
  .rpm-aquafish #footer {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-left: 8px;
    margin-right: 8px;
    overflow-wrap: anywhere;
  }
  /* 見出しの背景写真 (右下) に文章が重ならないよう、写真を下へ分けて置く。 */
  .rpm-aquafish #header { min-height: 0; padding-bottom: 104px; background-size: auto 96px; }
  .rpm-aquafish #header p { width: auto; margin: 10px; }
  .rpm-aquafish #leftbox,
  .rpm-aquafish #rightbox {
    float: none;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 12px;
  }
  .rpm-aquafish #mainbox .catbox,
  .rpm-aquafish #mainbox .side_catbox {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
  }
  .rpm-aquafish #mainbox img,
  .rpm-aquafish #header img,
  .rpm-aquafish #footer img {
    float: none;
    max-width: 100%;
    height: auto;
    margin-left: 0;
    margin-right: 0;
  }
}
