/* Keep the original desktop layout; adjust only narrow screens. */
@media (max-width: 767px) {
  #wrapper {
    box-sizing: border-box;
    width: 100%;
    margin: 20px auto;
    background-size: 100% auto;
  }

  #contents {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  #contents_main,
  #banner {
    box-sizing: border-box;
    float: none;
    width: 100%;
  }

  #contents_main { order: 1; }

  #banner {
    order: 2;
    padding-top: 20px;
  }

  #banner ul,
  #banner li {
    max-width: 260px;
    width: 100%;
  }

  #banner ul { margin: 0 auto; }

  #contents_main h1 {
    box-sizing: border-box;
    width: auto;
    height: auto;
    margin: 20px 10px;
  }

  #contents_main img,
  #banner img,
  #contents_main iframe,
  #contents_main video {
    max-width: 100%;
    height: auto;
  }

  ul#topnav {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    float: none;
    width: auto;
    height: auto;
    margin: 0 10px 12px;
  }

  ul#topnav li,
  ul#topnav a {
    box-sizing: border-box;
    float: none;
    width: 100% !important;
  }

  ul#topnav li { margin: 0; }

  ul#topnav li a,
  ul#topnav li a:hover {
    height: auto;
    min-height: 36px;
    padding: 9px 4px;
    border: 1px solid #ae8249;
    background-color: #d30052;
    background-image: none !important;
    background-repeat: no-repeat;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    text-indent: 0;
  }

  ul#topnav span { display: inline; }

  #news_contents,
  #profile_contents,
  #discography_contents,
  #biography_contents,
  #gallery_contents,
  #privacy_contents {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0 10px;
    padding: 15px;
  }

  #profile_biography,
  #discography_contents h3,
  #biography_text,
  .biography_year,
  #gallery_text,
  .profile_contents_dl,
  .profile_contents_dl2 {
    box-sizing: border-box;
    width: 100%;
  }

  #gallery_text { margin-left: 0; }
  #gallery_text li { width: calc(50% - 14px); }

  .profile_contents_dl2 dt,
  #biography_text dt { width: 25%; }

  .profile_contents_dl2 dd,
  #biography_text dd { width: 75%; }

  #contents_main {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #contents_main table,
  #contents_main pre {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  #footer {
    box-sizing: border-box;
    width: auto;
    margin: 10px;
  }

  #footer_left,
  #footer_copy {
    float: none;
    margin-bottom: 5px;
  }
}
