/* Keep the WordPress header aligned with the main hanzam.org site. */
#header .cashpoint { display: none; }
#header .header_info_ora { padding: 0; background: #f3ce00; }
#header .header_info_ora_inner { box-sizing: border-box; margin: 0 auto; background: #f3ce00; text-align: center; }

@media screen and (min-width: 769px) {
  #header .header_inner {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 1100px;
    height: 76px !important;
    margin: 0 auto;
    padding: 13px 235px 0 0;
    background: url(/image/common/header/free-d.png) 96% calc(50% - 2px) / 210px auto no-repeat;
  }
  #header .hanzam-logo { width: 195px; margin: 0; padding: 0; }
  #header .anniversary-logo { width: 58px; margin-left: 10px; }
  #header .nishikawa-logo { width: 150px; margin: 0 14px 0 auto; }
  #header .magni-logo { width: 52px; margin-right: 18px; }
  #header .hanzam-logo img,
  #header .anniversary-logo img,
  #header .nishikawa-logo img,
  #header .magni-logo img { display: block; width: 100%; height: auto; margin: 0; padding: 0; transform: translateY(-7px); }
  #header .header_info_ora {
    display: flex;
    align-items: center;
    height: 38px !important;
  }
  #header .header_info_ora_inner { width: 940px; padding: 0 7px; line-height: 1.6; }
  #header .header_point { width: 100%; height: 43px !important; background: #000080; }
  #header .header_point_inner {
    display: flex;
    justify-content: center;
    width: 1015px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    font-size: 0;
  }
  #header .header_point_inner li { display: block; flex: 0 0 auto; height: 43px; margin-top: 0; margin-bottom: 0; padding: 0; }
  #header .header_point_inner li:nth-child(5) { margin-left: 20px; }
  #header .header_point_inner li img { display: block; width: auto; height: 43px !important; }
  #header #menuback,
  #header .mainmenu,
  #header .mainmenu > ul,
  #header .mainmenu > ul > li { height: 46px !important; }
  #header #menuback { border-top: 1px solid #e8e8e5; border-bottom: 1px solid #deded9; background: #fafaf9; }
  #header .mainmenu {
    box-sizing: border-box;
    width: 1120px !important;
    margin: 0 auto;
    padding: 0 !important;
    font-size: 0;
  }
  #header .mainmenu > ul {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
  }
  #header .mainmenu > ul > li {
    float: none;
    position: relative;
    box-sizing: border-box;
    width: auto;
    margin: 0;
    padding: 0;
    border-left: 1px solid #e2e2de;
  }
  #header .mainmenu > ul > li:last-child { border-right: 1px solid #e2e2de; }
  #header .mainmenu > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0;
    color: #414746;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .035em;
    white-space: nowrap;
  }
  #header .mainmenu > ul > li > ul {
    position: absolute;
    top: 100%;
    left: 0;
    box-sizing: border-box;
    width: 260px;
    margin: 0;
    padding: 4px 0;
    border: 1px solid #deded9;
    border-top: 0;
    background: #fff;
    box-shadow: 0 7px 16px rgba(34, 42, 40, .12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10000;
  }
  #header .mainmenu > ul > li:hover > ul,
  #header .mainmenu > ul > li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  #header .mainmenu > ul > li:nth-last-child(-n+2) > ul { right: 0; left: auto; }
  #header .mainmenu > ul > li > ul > li,
  #header .mainmenu > ul > li:hover > ul > li {
    float: none;
    box-sizing: border-box;
    width: 260px;
    height: auto;
    margin: 0;
    padding: 0;
  }
  #header .mainmenu li ul li a {
    position: static;
    display: block;
    box-sizing: border-box;
    width: 260px;
    min-height: 42px;
    padding: 10px 15px;
    border-bottom: 1px solid #e7e7e3;
    background: #fff;
    color: #293735;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    text-align: left;
  }
  #header .mainmenu > ul > li > a:hover,
  #header .mainmenu > ul > li:focus-within > a { border-bottom: 2px solid #687a74; background: transparent; color: #1f3439; }
}

@media screen and (max-width: 768px) {
  #header .header_inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid #333;
  }
  #header .hanzam-logo { width: 140px; margin: 6px 0 6px 4px; }
  #header .anniversary-logo { width: 34px; margin-left: 5px; }
  #header .nishikawa-logo { width: 70px; margin: 0 8px 0 auto; }
  #header .magni-logo { width: 34px; margin-right: 5px; }
  #header .hanzam-logo img,
  #header .anniversary-logo img,
  #header .nishikawa-logo img,
  #header .magni-logo img { display: block; width: 100%; height: auto; margin: 0; padding: 0; transform: none; }
  #header .header_info_ora_inner { padding: 8px 7px; line-height: 1.5; }
  #header .header_point { display: none; }
  #header .header_point_sp { display: block; width: 100%; background: #000080; }
  #header .header_point_sp_inner { width: 88%; margin: 0 auto; padding: 2px 0; list-style: none; }
  #header .header_point_sp_inner li { display: block; width: 100%; }
  #header .header_point_sp_inner img { display: block; width: 100%; height: auto; }
}
