/** --------------------------------------------------
 * 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;
  .userweb & {
    background: top center / 100% repeat-y url(../img/bg/bg_main_md.jpg);
  }
  .smartphone & {
    background: top center / 100% repeat-y url(../img/bg/bg_main_sm.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%;
  }
}

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;
  background: top center / 100% repeat-y url(../img/header/header_bg_paper_md.jpg);
  .userweb & {
    height: 1200px;
  }
}

.primary-header__body {
  top: 535px;
  background: top center / 100% repeat-y url(../img/header/header_bg_lead_md.png);
  .smartphone & {
    position: relative;
    top: auto;
    background: top center / 100% repeat-y url(../img/header/header_bg_lead_sm.jpg);
  }
}

.series-intro-area {
  background: top center / 100% repeat-y url(../img/header/header_bg_series_md.jpg);
}


// 各ブロック
// --------------------

// 青背景見出し,茶色見出し共通
.content-box__head.h-bg-blue,
.content-box__head.h-bg-brown {
  position: relative;
  background: top center / 100% repeat url(../img/set/bg_head_blue_md.jpg);
  padding-top: 28px;
  padding-bottom: 34px;
  &: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: 8% 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);
  h3 {
    color: #ffc020;
    .userweb & {
      font-size: 38px;
    }
    .smartphone & {
      font-size: 115%;
    }
  }
}



.content-box__head {
  h3 {
    text-shadow: 0 2px 1px #000;
    .smartphone & {
      font-size: calc(var(--half-vw) / 11);
    }
  }
  &.sub-h {
    background: bottom center / auto no-repeat url(../img/set/bg_head_sub_md.png);
    background-color: rgba(255, 255, 255, 0.08);
    padding-bottom: 25px;
    .smartphone & {
      background: bottom center / 80% no-repeat url(../img/set/bg_head_sub_sm.png);
      background-color: rgba(255, 255, 255, 0.08);
      padding-bottom: 18px;
    }
  }
}

// 数量限定
.head-icon {
  .userweb & {
    position: relative;
    display: block;
    margin: auto;
  }

  span {
    background-color: #0079d4;
    color: #fff;
    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: rgba(255, 255, 255, 0.08);
    // 特典内容
    .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;
      }
    }
  }
}

.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;
  }
}

// 購入エリア
// --------------------
.package-order-btns {
  .package-order-btns__head {
    text-align: center;
    padding: 2px 0;
    .smartphone & {
      width: 70%;
      margin: auto;
    }
  }
  .package-order-btns__info {
    text-align: center;
  }
}
.package-order-btns__head.box-set {
  background-color: #fcd26e;
  color: #2d0404;
}

.package-order-btns__head.no-box {
  color: #fcd26e;
  border: 2px solid #fcd26e;
}
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 {
  padding-top: 1rem;
  padding-bottom: 1.3rem;
  font-size: calc(var(--half-vw) / 13);
}

// レイアアウト
.package-order-btns-pane {
  .userweb & {
    display: flex;
    justify-content: center;
  }
  .smartphone & {
    padding: 0 5%;
  }
  // 直下の子要素
  .package-order-btns-pane__item {
    .userweb & {
      width: 46%;
      padding-left: 40px;
      padding-right: 40px;
    }
  }
}

// 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.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: 500px;
    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: #fff;
}

// フッターのドットキャラ
// --------------------
.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;
}

// 販売終了対応（ピンバッジ）
// --------------------
// 注意書き
.sale-ended-badge{
  // display: none;
}

// サムネ１つ目
.sale-ended-badge-image01{
  .swiper-wrapper:after{
    content: '終了しました';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.6rem 1.2rem;
    font-weight: bold;
    .smartphone & {
      padding: 3% 10%;
      font-size: calc(var(--half-vw) / 15);
    }
  }
  // a{
  //   pointer-events: none;
  // }
  // .lightbox-link::after{
  //   display: none;
  // }
}

// サムネ２つ目
.sale-ended-badge-image02{
  .swiper-wrapper:after{
    content: '終了しました';
    display: block;
    position: absolute;
    top: 50%;
    left: 38px;
    transform: translateY(-50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.6rem 1rem;
    font-weight: bold;
      .smartphone & {
        padding: 2% 3%;
        left: 16%;
        font-size: calc(var(--half-vw) / 15);
      }
  }
  // a{
  //   pointer-events: none;
  // }
  // .lightbox-link::after{
  //   display: none;
  // }
}
