:root{
  --bg:#000;
  --footer-bg:rgba(0,0,0,.6);
  --fg:#e9eef6;
}

*{
  box-sizing:border-box;
}

html,body{
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:"Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* ===== KVセクション ===== */
.kv{
  position:relative;
  width:100%;
  height:100vh;
  overflow:hidden;
  background:#000;
}

.kv__media{
  position:relative;
  width:100%;
  height:100%;
}

/* 画像共通 */
#kv-bg, #kv-char{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  opacity:0;
  transition:opacity 1.6s ease-in-out;
  will-change:opacity;
}

#kv-bg.is-visible,
#kv-char.is-visible{
  opacity:1;
}

/* キャラは前面に重ねる */
#kv-char{
  z-index:2;
}

/* 周囲の暗がり（高級感） */
.kv__vignette{
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 60%,
    rgba(0,0,0,.65) 100%
  );
}

/* PC時：中央寄せでトリミング */
@media (min-width:821px){
  #kv-bg{ object-position:center; }
  #kv-char{ display:none; }
}

/* スマホ時：背景は上寄せ、キャラは下方向へオフセット */
@media (max-width:820px){
  #kv-bg{
    object-position:center top;
  }
  #kv-char{
    object-position:center bottom;
    transform:translateY(8vh); /* キャラ全体を下げる */
  }

  /* 画像ごとに微調整したい場合 */
  #kv-char[src*="kv_sp_erena.png"]{
    transform:translateY(7vh);
  }
  #kv-char[src*="kv_sp_saya.png"]{
    transform:translateY(9vh);
  }
}

/* ===== App Store 固定バッジ ===== */
.store-fab{
  position:fixed;
  z-index:10;
  display:inline-block;
  line-height:0;
  filter:drop-shadow(0 6px 16px rgba(0,0,0,.45));
  transition:transform .15s ease;
}

.store-fab:hover{
  transform:translateY(-2px);
}

.store-fab svg{
  width:180px;
  height:auto;
}

.store-fab svg rect{
  fill:#000;
}

/* PC：右下 */
@media (min-width:821px){
  .store-fab{
    right:24px;
    bottom:24px;
  }
}

/* スマホ：フッター上部に中央配置 */
@media (max-width:820px){
  .store-fab{
    left:50%;
    transform:translateX(-50%);
    bottom:calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .store-fab svg{
    width:200px;
  }
}

/* ===== フッター ===== */
.footer{
  position:relative;
  z-index:4;
  width:100%;
  background:var(--footer-bg);
  backdrop-filter:saturate(140%) blur(6px);
}

.footer__inner{
  max-width:1120px;
  margin:0 auto;
  padding:16px 20px env(safe-area-inset-bottom, 16px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.footer__links a{
  color:#bcd2ff;
  text-decoration:none;
  font-size:14px;
}

.footer__links a:hover{
  text-decoration:underline;
}

.footer__links .dot{
  margin:0 8px;
  color:#88a;
}

.footer__brand img{
  display:block;
  height:28px;
  width:auto;
  object-fit:contain;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

/* SP：縦積み */
@media (max-width:600px){
  .footer__inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .footer__brand img{
    height:24px;
  }
}
