@media screen and (max-width: 767px) {

  /* =====================================
     ヘッダー：ロゴとハンバーガーを整列
  ===================================== */
  header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 5%;
    position: relative;
  }

  .logo {
    flex-shrink: 0;
  }

  .logo img {
    height: 40px;
  }

  .ac_menu {
    display: block !important;
    position: relative;
    margin-left: auto;
    right: 0;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 10000;
  }

  .ac_menu span,
  .ac_menu span::before,
  .ac_menu span::after {
    position: absolute;
    content: "";
    left: 0;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .ac_menu span {
    top: 50%;
    transform: translateY(-50%);
  }

  .ac_menu span::before {
    top: -8px;
  }

  .ac_menu span::after {
    bottom: -8px;
  }

  /* 開いた時の× */
  .ac_menu.active span {
    background: transparent;
  }

  .ac_menu.active span::before {
    transform: rotate(45deg);
    top: 0;
  }

  .ac_menu.active span::after {
    transform: rotate(-45deg);
    bottom: 0;
  }

  /* =====================================
     メニュー本体
  ===================================== */
  nav ul.navi {
    display: none;
    flex-direction: column;
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 9999 !important;
    transition: right 0.3s ease;
    padding: 2em 2em;
    margin: 0;
  }

  nav ul.navi.active {
    right: 0 !important;
    display: flex !important;
  }

  nav ul.navi li {
    width: auto;
    border-bottom: 1px solid #eee;
    padding: 0.8em 0;
    margin: 0;
  }

  nav ul.navi li:last-child {
    border-bottom: none;
  }

  nav ul.navi a {
    display: inline-block;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
  }

  nav ul.navi a:hover {
    color: #0066cc;
  }

  /* =====================================
     背景オーバーレイ
  ===================================== */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9000 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* =====================================
     他要素との干渉防止
  ===================================== */
  header, main, footer, .mainimage, .slider {
    position: static !important;
    z-index: auto !important;
  }

  /* =====================================
     PCの斜線区切りを無効化
  ===================================== */
  nav ul.navi li + li::before {
    content: none;
  }
}

