/* ===== 公式スタイルMODショーケース ===== */
.stylemods_showcase{
  width:100%;
  box-sizing:border-box;
}

.stylemods_rail{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  justify-content:center;
  gap:20px;
  max-width:1100px;
  margin:0 auto;
  padding:8px 10px 14px;
  box-sizing:border-box;
}

.stylemods_card{
  flex:0 1 300px;
  min-width:0;
  max-width:320px;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #222;
  box-shadow:5px 5px 0 rgba(205,43,90,0.20);
  box-sizing:border-box;
  text-align:left;
  transition:transform .18s ease, box-shadow .18s ease;
}

/* 画像（848x592）は比率を保ったまま全幅で見せる。画像はmods.phpへのリンク */
.stylemods_thumb{
  position:relative;
  display:block;
  width:100%;
  padding-top:69.81%;
  overflow:hidden;
  background:#f4f4f4;
  border-bottom:1px solid #222;
  text-decoration:none;
  -webkit-tap-highlight-color:rgba(205,43,90,0.25);
}

.stylemods_thumb:focus-visible{
  outline:2px solid #cd2b5a;
  outline-offset:-2px;
}

.stylemods_thumb img{
  position:absolute;
  top:0;
  left:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.stylemods_tag{
  position:absolute;
  top:0;
  left:0;
  z-index:2;
  background:#cd2b5a;
  color:#fff;
  font-family:Quicksand, sans-serif;
  font-size:10px;
  font-weight:bold;
  letter-spacing:0.16em;
  line-height:1;
  padding:5px 9px 4px;
}

.stylemods_body{
  padding:13px 15px 15px;
}

.stylemods_name{
  position:relative;
  margin:0 0 9px;
  padding-bottom:8px;
  font-family:"Shippori Mincho", Quicksand, serif;
  font-weight:700;
  font-size:17px;
  line-height:1.35;
  color:#222;
  overflow-wrap:break-word;
}

/* タイトル下の罫線。登場時に左から引かれる */
.stylemods_name::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:1px;
  background:#cd2b5a;
  transform-origin:left center;
}

.stylemods_text{
  margin:0;
  font-size:13px;
  line-height:1.7;
  color:#666;
  overflow-wrap:break-word;
}

.stylemods_hint{
  display:none;
}

/* ===== 画面に入ったカードの登場アニメーション =====
   js_revealはJS側で付与するので、JS無効時は最初から表示されたままになる。
   ホバー効果とtransformが競合しないよう、登場側はanimationで実装している。 */
.stylemods_showcase.js_reveal .stylemods_card{
  opacity:0;
}

.stylemods_showcase.js_reveal .stylemods_card:not(.is_visible) .stylemods_thumb img{
  transform:scale(1.09);
}

.stylemods_showcase.js_reveal .stylemods_card:not(.is_visible) .stylemods_tag{
  transform:translateY(-110%);
}

.stylemods_showcase.js_reveal .stylemods_card:not(.is_visible) .stylemods_body{
  opacity:0;
}

.stylemods_showcase.js_reveal .stylemods_card:not(.is_visible) .stylemods_name::after{
  transform:scaleX(0);
}

.stylemods_showcase.js_reveal .stylemods_card.is_visible{
  opacity:1;
  animation:stylemods_rise .65s cubic-bezier(.16,.84,.44,1) backwards;
}

.stylemods_showcase.js_reveal .stylemods_card.is_visible .stylemods_thumb img{
  animation:stylemods_unzoom .95s cubic-bezier(.16,.84,.44,1) backwards;
}

.stylemods_showcase.js_reveal .stylemods_card.is_visible .stylemods_tag{
  animation:stylemods_flag .45s cubic-bezier(.2,.9,.3,1) .24s backwards;
}

.stylemods_showcase.js_reveal .stylemods_card.is_visible .stylemods_body{
  animation:stylemods_fadeup .6s ease .18s backwards;
}

.stylemods_showcase.js_reveal .stylemods_card.is_visible .stylemods_name::after{
  animation:stylemods_rule .7s cubic-bezier(.16,.84,.44,1) .3s backwards;
}

@keyframes stylemods_rise{
  from{ opacity:0.95; }
  to{ opacity:1; transform:none; }
}

@keyframes stylemods_unzoom{
  from{ transform:scale(1.09); }
  to{ transform:none; }
}

@keyframes stylemods_flag{
  from{ transform:translateY(-110%); }
  to{ transform:none; }
}

@keyframes stylemods_fadeup{
  from{ transform:translateY(10px); }
  to{ transform:none; }
}

@keyframes stylemods_rule{
  from{ transform:scaleX(0); }
  to{ transform:scaleX(1); }
}

@media (hover:hover){
  .stylemods_card:hover{
    transform:translate(-2px,-2px);
    box-shadow:8px 8px 0 rgba(205,43,90,0.28);
  }
  .stylemods_thumb:hover img{
    transform:scale(1.05);
  }
}

/* スマホ幅（360pxでも成立するよう）では横スクロールのカルーセルにする */
@media (max-width:767px){
  .stylemods_rail{
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scroll-padding-left:14px;
    gap:14px;
    padding:8px 14px 10px;
  }

  .stylemods_card{
    flex:0 0 auto;
    width:74vw;
    max-width:300px;
    scroll-snap-align:center;
    box-shadow:4px 4px 0 rgba(205,43,90,0.20);
  }

  .stylemods_name{
    font-size:16px;
  }

  .stylemods_text{
    font-size:12.5px;
    line-height:1.65;
  }

  .stylemods_rail::-webkit-scrollbar{
    height:5px;
  }

  .stylemods_rail::-webkit-scrollbar-track{
    background:transparent;
  }

  .stylemods_rail::-webkit-scrollbar-thumb{
    background:rgba(205,43,90,0.35);
    border-radius:3px;
  }

  .stylemods_hint{
    display:block;
    margin:0 0 2px;
    color:#cd2b5a;
    font-size:12px;
    letter-spacing:0.3em;
    text-align:center;
    animation:stylemods_nudge 1.6s ease-in-out infinite;
  }
}

@keyframes stylemods_nudge{
  0%,100%{ transform:translateX(-3px); opacity:.55; }
  50%{ transform:translateX(3px); opacity:1; }
}

/* ===== 注目のAIモデルショーケース =====
   スタイルMODショーケースの見た目をそのまま受け継ぎ、
   立ち絵に合わせて縦長のカードにするぶんだけを上書きする。 */
.models_card{
  flex:0 1 250px;
  max-width:260px;
}

/* 立ち絵は縦横比がまちまち（720x1024／512x512／720x600）なので4:5で切り揃える */
.models_thumb{
  padding-top:125%;
  background:#fff;
}

.models_thumb img{
  object-position:center top;
}

/* 縦長のぶんスマホでは横幅を少し詰める。flexはカルーセル側の指定に戻す */
@media (max-width:767px){
  .models_card{
    flex:0 0 auto;
    width:62vw;
    max-width:240px;
  }
}

@media (prefers-reduced-motion:reduce){
  .stylemods_card,
  .stylemods_thumb img{
    transition:none;
  }
  .stylemods_hint{
    animation:none;
  }
  /* 登場アニメーションはJS側でも抑止しているが、こちらでも念のため無効化する */
  .stylemods_showcase.js_reveal .stylemods_card,
  .stylemods_showcase.js_reveal .stylemods_card .stylemods_body{
    opacity:1;
  }
  .stylemods_showcase.js_reveal .stylemods_card,
  .stylemods_showcase.js_reveal .stylemods_card .stylemods_thumb img,
  .stylemods_showcase.js_reveal .stylemods_card .stylemods_tag,
  .stylemods_showcase.js_reveal .stylemods_card .stylemods_body,
  .stylemods_showcase.js_reveal .stylemods_card .stylemods_name::after{
    animation:none;
    transform:none;
  }
}