
:root{
  --bg:#0f1115; --fg:#fff; --accent:#41b883;
  --pad:16px;
  --progress-h:4px;
  --stack-gap: 16px;

  /* ロゴのサイズ上限（デスクトップ既定） */
  --logo-max-w: 320px;
  --logo-max-h: 60svh;
  --logo-vw: 84vw;
}

/* モバイル用 */
@media (max-width: 640px) {
  :root{
    --logo-max-w: 240px;
    --logo-max-h: 52svh;
    --logo-vw: 72vw;
    --stack-gap: 14px;
  }
}

*{ box-sizing:border-box; }

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

body{ overflow:hidden; }

.splash{
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;

  /* 3点セット全体を縦横中央へ */
  place-content: center;    /* コンテンツブロック全体を中央寄せ */
  justify-items: center;    /* 各行の横位置を中央（.meterは既に中央） */

  padding: calc(var(--pad) + env(safe-area-inset-top, 0px))
           var(--pad)
           calc(var(--pad) + env(safe-area-inset-bottom, 0px));
  row-gap: var(--stack-gap);

  width: 100vw;
  max-width: 100vw;
}

/* 各ブロックは幅100%を維持 */
.hero, .meter { width: 100%; }

/* ロゴ領域（中央寄せ） */
.hero{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

img.logo{
  width: auto;
  max-width: min(var(--logo-max-w), var(--logo-vw));
  height: auto;
  max-height: var(--logo-max-h);
  max-height: 60vh; /* フォールバック */
  display: block;
  margin: 0 auto;
  object-fit: contain;
  aspect-ratio: 430 / 400;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
  animation: popIn 500ms 120ms ease-out both;
}

.meter{
  display: grid;
  place-items: center;
}

.progress{
  width: min(480px, 92vw);
  height: var(--progress-h);
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress .bar{
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #2f7d96);
  transition: width 280ms ease;
}

@media (max-height: 640px){
  img.logo{ max-height: 60vh; }
}

/* スクリーンリーダー専用 */
.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* アニメ */
@keyframes popIn{
  0%{ transform: scale(0.92); opacity: 0; }
  100%{ transform: scale(1); opacity: 1; }
}

/* 画像の一般ルール（ロゴ以外） */
.splash img:not(.logo){
  max-width: 100%;
  height: auto;
}
