/** --------------------------------------------------
 * mixin
 */

// .aspect-ratioが使えないブラウザ用のpolyfill
// --------------------
.aspect-ratio(@width, @height) {
  @supports (aspect-ratio: 1) {
    aspect-ratio: @width / @height;
  }

  @supports not (aspect-ratio: 1) {
    &::before {
      content: '';
      float: left;
      padding-top: (@height / @width * 100% * 100) / 100;
    }

    &::after {
      content: '';
      display: block;
      clear: both;
    }
  }
}

// スマートフォン用フォントサイズ指定
// --------------------
.smartphone-font-size(@font-size) {
  @size: (100 / 770) * @font-size * 1vw;
  font-size: @size;

  @media screen and (min-width: 771px) {
    font-size: (640 / 770) * @font-size * 1px;
  }
}

// glightbox
// --------------------
.gslide-inline {
  background: transparent;
}
.gslide-inline .ginlined-content {
  padding: 0;
  .smartphone & {
    padding-top: 3rem;
    padding-bottom: 3rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

// ページ全体設定
// --------------------
.content {
  color: #fff;
  background: top center / 100% repeat-y url(../img/bg/bg_main_md.jpg);
}

.anchor-box {
  display: block;
  padding-top: 100px;
  margin-top: -100px;
}
.anchor-tokuten {
  display: block;
  padding-top: 90px;
  margin-top: -90px;
    .smartphone & {
      display: block;
      padding-top: 70px;
      margin-top: -70px;
    }
}

.c-brown {
  color: #2d0404;
}

.c-lightbrown {
  color: #b04d0c;
}

.c-yellow {
  color: #fcd26e;
}

.c-deepred{
  color: #ab0000;
}

.t-150 {
  font-size: 150%;
  .smartphone & {
    font-size: 115%;
  }
}

// .steam-notes{
//   max-width: 700px;
//   margin-left: auto;
//   margin-right: auto;
// }

hr.multi-driver {
  height: 7px;
  border: none;
  background: top center / 100% repeat-y url(../img/misc/misc_line_md.png);
  display: block;
  .smartphone & {
    background: top center / 100% repeat-y url(../img/misc/misc_line_sm.png);
    margin: 0;
  }
}

.filter-bright {
  img {
    transition: all 0.3s, transform 0.3s;
    &:hover {
      filter: brightness(120%);
      opacity: 1;
    }
  }
}

a.link-bg-white,
a.lightbox {
  background-color: #fff;
  img {
    transition: all 0.3s, transform 0.3s;
    &:hover {
      opacity: 0.8;
    }
  }
}
a.lightbox{
  display: block;
}

// ヘッダー
// --------------------
.primary-header {
  position: relative;
}

.primary-header__body {
  position: relative;
}

.series-intro-area {
  background: top center / 100% repeat-y url(../img/header/header_bg_series_md.jpg);
}


// 各セット見出し共通
// --------------------
.notes-head{
  font-weight: normal;
  text-shadow: none;
  .userweb & {
    font-size: 16px;
  }
  .smartphone & {
    font-size: calc(var(--half-vw) / 15);
  }
}


// 各ブロック
// --------------------

// 赤背景見出し,茶色見出し共通
.content-box__head.h-bg-red,
.content-box__head.h-bg-brown,
.content-box__head.h-bg-blue {
  position: relative;
  background: top center / 100% repeat url(../img/set/bg_head_red_md.jpg);
  padding-top: 26px;
  padding-bottom: 28px;
  &:before {
    content: '';
    display: block;
    background: top center / 100% repeat url(../img/set/line_head_top_md.png);
    height: 10px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  &:after {
    content: '';
    display: block;
    background: top center / 100% repeat url(../img/set/line_head_bottom_md.png);
    height: 11px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  &.noline {
    padding-top: 14px;
    padding-bottom: 14px;
    &:before,
    &:after {
      display: none;
    }
  }
  .smartphone & {
    padding: 6% 3%;
    &:before {
      background: top center / 100% repeat url(../img/set/line_head_top_sm.png);
      height: .55em;
    }
    &:after {
      background: top center / 100% repeat url(../img/set/line_head_bottom_sm.png);
      height: .55em;
    }
    &.noline {
      padding: 3%;
    }
  }
}

// 青背景
.content-box__head.h-bg-blue {
  background: top center / 100% repeat url(../img/set/bg_head_blue_md.jpg);
}

.content-box__head.h-bg-blue.no-chara{
  .userweb & {
    padding-bottom: 24px;
  }
  
}

// 茶色背景
.content-box__head.h-bg-brown {
  background: top center / 100% repeat url(../img/set/bg_head_brown_md.jpg);

  .userweb & {
    padding-top: 24px;
    padding-bottom: 26px;
  }

  h3 {
    color: #ffc020;
    .userweb & {
      font-size: 34px;
    }
    .smartphone & {
      font-size: 115%;
    }
  }
}

.save-dq3.content-box__head.h-bg-brown {
  h3{
    .smartphone & {
      font-size: 100%;
      span{
        font-size: 78%;
      }
    }
  }
}


.content-box__head {
  h3 {
    text-shadow: 0 2px 1px #000;
    .smartphone & {
      font-size: calc(var(--half-vw) / 11);
    }
  }

  //- セット内容のサブ見出し
  &.bg-thin {
    background-color: rgb(255 0 0 / 10%);
  }
  &.bg-dq3{
    background: top center / 100% repeat-y url(../img/bg/bg_dq3.jpg);
  }
}

// 数量限定
.head-icon {
  .userweb & {
    position: relative;
    display: block;
    margin: auto;
  }

  span {
    background-color: #fcd26e;
    color: #2d0404;
    text-shadow: none;
    .userweb & {
      line-height: 1.3;
      padding: 6px;
      margin-bottom: 4px;
      width: 230px;
      margin-left: 0;
      position: relative;
    }
    .smartphone & {
      padding: 1% 3%;
      margin-bottom: 0.5em;
      width: 13em;
    }
  }
}

.content-box__body {
  &.bg-thin {
    background-color: rgb(255 0 0 / 10%);
    // 特典内容
    .marchandise-sidebyside__explain-icon {
      background-color: #fcd26e;
      color: #2d0404;
    }
    .marchandise-sidebyside__explain-head {
      color: #fcd26e;
    }
  }
  &.bg-paper {
    background: top center / 100% repeat url(../img/set/bg_box_paper_md.jpg);
    color: #2d0404;
    // 特典内容
    .marchandise-sidebyside__explain-icon {
      background-color: #2d0404;
      color: #fcd26e;
    }
    .marchandise-sidebyside__explain-head {
      color: #2d0404;
    }
  }
  &.bg-paper02 {
    position: relative;
    background: top center / 100% repeat url(../img/set/bg_box_paper02_md.jpg);
    color: #2d0404;
    &:before {
      content: '';
      display: block;
      background: top center / 100% repeat url(../img/set/line_head_top_md.png);
      height: 11px;
      width: 100%;
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
    }
    &:after {
      content: '';
      display: block;
      background: top center / 100% repeat url(../img/set/line_head_bottom_md.png);
      height: 11px;
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
    }
    .content-box__head {
      background: linear-gradient(
        90deg,
        rgba(199, 88, 72, 1) 0%,
        rgba(99, 131, 139, 1) 100%
      );
      h3 {
        text-shadow: none;
      }
    }
  }

  &.bg-dq3{
    background: top center / 100% repeat-y url(../img/bg/bg_dq3.jpg);
  }


}

.gamePackageInfo {
  .glightbox-clean .gnext,
  .glightbox-clean .gprev {
    display: none;
  }
}

// 見出しのドットキャラ
// --------------------

.mt-withdot{
  .smartphone & {
    margin-top: 10%;
  }
}

.tokuten-withdot{
  .smartphone & {
    margin-top: 20%;
  }
}

// .content-box__head {
//   &.h-complete{
//     .userweb & {
//       padding-top: 38px;
//     }
//     .smartphone & {
//       margin-top: 25%;
//       padding-top: 12%;
//     }
//   }
// }

.chara-box {
  position: absolute;
  display: flex;
  justify-content: center;
  left: 50%;
  transform: translateX(-50%);

  &.x2 {
    top: -90px;
  }
  &.monster {
    top: -50px;
  }
  &.monster02 {
    top: -50px;
  }

  .smartphone & {
    &.x2 {
      top: -4em;
      width: 16%;
    }
    &.monster {
      top: -2.4em;
      width: 18%;
    }
    &.monster02 {
      top: -50px;
    }
  }
}

// スライドショー
// --------------------
a.lightbox.lightbox-link {
  background: #fff;
}

.image-slideshow__image .swiper-slide img {
  transition: all 0.3s, transform 0.3s;
  &:hover {
    opacity: 0.8;
  }
}

// 購入エリア
// --------------------

.smartphone .order-button-pane--3-cols .order-button-pane__item{
  width: 100%;
}


a.order-button--ps5,
.order-button--ps5 {
  background-color: #4c15a7;
  box-shadow: 0 4px #834eed;
}

.smartphone a.order-button--steam,
.smartphone .order-button--steam,
.smartphone a.order-button--ps5,
.smartphone .order-button--ps5,
.smartphone a.order-button--switch,
.smartphone .order-button--switch,
.smartphone a.order-button--switch2,
.smartphone .order-button--switch2 {
  padding-top: 1.3rem;
  padding-bottom: 1.3rem;
  font-size: calc(var(--half-vw) / 12);
  width: 100%;
}

// 購入ボタン
// --------------------
a.order-button--ps5,
a.order-button--switch,
a.order-button--switch2{
  position: relative;
  .userweb & {
    font-size: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  // &::after{
  //   content: '';
  //   background-image: url(../img/misc/ico_window.png);
  //   background-position: center center;
  //   background-repeat: no-repeat;
  //   width: 15px;
  //   height: 14px;
  //   display: inline-block;
  //   position: absolute;
  //   bottom: 12px;
  //   right: 26px;
  // }
}


// Steam購入エリア
// --------------------
.steam-order {
  .steam-order__nav {
    margin-right: auto;
    margin-left: auto;
    .userweb & {
      width: 40%;
    }
  }
}

.steam-btn-wrap {
  .userweb & {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

a.order-button--steam{
  .userweb & {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

a.order-button--steam.mute{
  pointer-events: none;
  filter: grayscale(100);
}


// 早見表
// --------------------
.items-chart {
  overflow-x: auto;
  padding-bottom: 0.4rem;
  table {
    background-color: #fff;
  }
  td {
    border: 2px solid #fff;
    align-items: center;
    vertical-align: middle;
    text-align: center;
    background-color: #f6f6f6;
    padding: 10px;

    &.version {
      writing-mode: vertical-rl;
      .userweb & {
        width: 4em !important;
        min-width: 4em !important;
      }
      .smartphone & {
        width: 3em !important;
        min-width: 3em !important;
      }
    }

    &.w-200 {
      width: 200px;
      min-width: 200px;
      .userweb & {
        width: 200px;
        min-width: 200px;
      }
      .smartphone & {
        width: 150px;
        min-width: 150px;
      }
    }

    // 各セル設定
    &.package {
      background-color: #ffedbe;
    }
    &.download {
      background-color: #c6ebf1;
    }
    &.item {
      background-color: #c6daf8;
    }
    &.tokuten{
      background-color: #f1d3cb;
    }
  }
  // 列固定
  .sticky-cell-1st-col,
  .sticky-cell-2nd-col {
    position: sticky;
    top: 0;
    left: 2px;
  }
  // 2pxはボーダー分
  .sticky-cell-2nd-col {
    .smartphone & {
      left: calc(3em + 2px);
    }
    .userweb & {
      left: calc(4em + 2px);
    }
  }
}
// 注釈
.items-chart__notes {
  td {
    vertical-align: top;
  }
}

// 壁紙
// --------------------
.wallpaper-pane {
  .userweb & {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  & > li {
    padding-bottom: 1rem;
    .smartphone & {
      &:nth-of-type(n + 2) {
        margin-top: 1rem;
      }
    }
    .userweb & {
      width: calc(50% - 0.5rem);
    }
    img {
      width: 100%;
    }
  }
}

// 動画
// --------------------
.dq-video {
  .userweb & {
    width: 660px;
    margin-right: auto;
    margin-left: auto;
  }
}

.video-button::after,
.video-button--mute::after {
  display: none;
}

.marchandise-box__name a,
.marchandise-box__name a:visited {
  color: #65b9ff;
}

// フッターのドットキャラ
// --------------------
.footer-chara-box {
  .smartphone & {
    width: 90%;
    margin: auto;
  }
}


// 販売終了対応
// ----------------------------------------
// .sale-ended-tabidachi{
//   position: relative;
//   &:after{
//     content: '『旅立ちの4人パーティセット』は終了しました';
//     text-align: center;
//     display: block;
//     background-color: rgba(0, 0, 0, 0.6);
//     width: 100%;
//     padding: 1rem 0;
//     position: absolute;
//     left: 0%;
//     top: 50%;
//     transform: translateY(-50%);
//     color: #fff;
//     font-weight: bold;
//     .userweb &{
//       font-size: 20px;
//     }
//     .smartphone &{
//       font-size: calc(var(--half-vw) / 13);
//     }
  
//   }
// }

// .tabidachi-set-button{
//   .order-button--switch{
//     background-color: #888;
//     box-shadow: 0px 4px #555;
//     pointer-events: none;
//   }
//   .order-button--ps5{
//     background-color: #666;
//     box-shadow: 0px 4px #444;
//     pointer-events: none;
//   }
// }

// 販売終了対応（収納ボックス）
// --------------------
.sale-ended-box{
  // display: none;
}

.order-button--ps5.mute{
  background-color: #666;
  box-shadow: 0px 4px #444;
  pointer-events: none;
}

.order-button--switch.mute{
  background-color: #888;
  box-shadow: 0px 4px #555;
  pointer-events: none;
}



//- ドラクエ3のアコーディオン内
.dq3-info{
  .accordion-box__head{
    .userweb &{
      background: top center / 100% no-repeat url(../img/bg/bg_dq3_ac_md.jpg);
      padding-top: .7em;
      padding-bottom: .7em;
      font-size: 24px;
        .toggle-icon{
          width: 2.8em;
          height: 2.8em;
        }
    }
    .smartphone &{
      background: top center / 100% no-repeat url(../img/bg/bg_dq3_ac_sm.jpg);
      padding-top: 1.8em;
      padding-bottom: 0.2em;
      font-size: calc(var(--half-vw) / 15);
      position: relative;
      display: block;
      height: 7em;
        .toggle-icon{
          width: 2.8em;
          height: 2.8em;
          position: absolute;
          margin: auto 0;
          top: 0;
          bottom: 0;
          right: .2em;
        }
    }
  }

  .accordion-box__body{

    .head-icon {
      span{
          color: #fff;
          background-color: #0079d4;
      }
    }

    .userweb & {
      .package-order-btns-pane{
        display: flex;
        justify-content: center;
      }
      .package-order-btns-pane .package-order-btns-pane__item{
        width: 40%;
        padding-left: 20px;
        padding-right: 20px;
      }
    }


    .marchandise-sidebyside__explain-icon{
      color: #2d0404;
      background-color: #fcd26e;
    }
    .marchandise-sidebyside__explain-head{
      color: #fcd26e;
    }

    hr.solid-divider {
        height: 2px;
        background-color: #004784;
    }



  }

}
