/* 爆乳郵便 マスコット「ミル」用スタイル
   案内ブロック（mascot-block.html）とキャラ紹介ページ（mascot.html）で共用。
   共通スタイル style.css の変数（--accent 等）に依存するので、
   style.css の後に読み込むこと。 */

/* ---------- マスコット案内ブロック ---------- */
.mascot-block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  margin: 18px 0;
}
.mascot-block-face {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  background: var(--bg-soft);
}
.mascot-bubble {
  position: relative;
  flex: 1;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
.mascot-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 26px;
  border-width: 6px 8px 6px 0;
  border-style: solid;
  border-color: transparent var(--bg-soft) transparent transparent;
}
.mascot-bubble .mascot-name {
  display: block;
  font-weight: 800;
  color: var(--accent-strong);
  font-size: 0.8rem;
  margin-bottom: 2px;
}
.mascot-bubble p { margin: 0 0 8px; }
.mascot-bubble p:last-child { margin-bottom: 0; }
.mascot-pick-link {
  display: inline-block;
  font-weight: 800;
  color: var(--accent);
}
.mascot-ai-note {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* ---------- キャラ紹介ページ ---------- */
.mascot-hero {
  text-align: center;
  margin-bottom: 18px;
}
.mascot-hero img {
  margin: 0 auto;
  max-height: 480px;
  width: auto;
  border-radius: 8px;
}
.mascot-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.mascot-gallery figure { margin: 0; }
.mascot-gallery img {
  border-radius: 8px;
  border: 1px solid var(--card-border);
}
.mascot-gallery figcaption {
  font-size: 0.78rem;
  color: var(--text-sub);
  text-align: center;
  margin-top: 4px;
}
@media (max-width: 520px) {
  .mascot-gallery { grid-template-columns: 1fr; }
  .mascot-block-face { width: 60px; height: 60px; }
}


/* ---------- トップページ：フルスクリーン・スプラッシュ＋その場ソムリエ ----------
   画面全体（100dvw×100dvh）を占有するフルスクリーンのオーバーレイ。
   背景はピンク〜暗色の半透明グラデーション＋控えめな blur で、
   後ろのトップページ本体が透けて見える（ユーザー指示 2026-11-16）。
   吹き出し・ボタン類は地が白／濃色でコントラストを保ち、透けても読める。
   レイアウトはユーザーの手描きスケッチ準拠：
   ・✕ボタンは右上に固定
   ・ミルの立ち絵は画面中央〜上部に大きく（下端接地・左右中央）
   ・セリフ・質問文はキャラの下部あたり（下部エリアの先頭）に出す
   ・選択肢は画面下部に大きな角丸ブロック（ピンク系）を左右2列で並べ、
     5択は 2+2+1（最後の1つは横幅いっぱい）。選択肢ブロックが主役で、
     背後の「帯」の地は薄くし、文字は影で読ませる。
   その場でAIソムリエの質問が進み、ミルの表情・仕草が状態で切り替わる。
   層は年齢確認ゲート（z-index 9999）より下の 9000。
   開閉と進行は splash.js（index.html からのみ読み込む）。 */
.splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  z-index: 9000;
  overflow: hidden;
  overscroll-behavior: none;
  /* 半透明：後ろのホーム画面（トップページ本体）が判別できる程度に透ける。
     透け感は alpha のみで確保し、backdrop-filter の blur は使わない
     （帯側の blur と合わせてキャラがぼやけて見える原因になったため撤去）。 */
  background:
    radial-gradient(ellipse 90% 55% at 50% 30%, rgba(255, 214, 235, 0.22) 0%, rgba(255, 214, 235, 0) 60%),
    linear-gradient(168deg, rgba(255, 143, 191, 0.38) 0%, rgba(244, 63, 158, 0.38) 34%, rgba(194, 24, 122, 0.46) 62%, rgba(64, 9, 42, 0.62) 100%);
  opacity: 1;
  transition: opacity 0.3s ease;
}
.splash-closed {
  opacity: 0;
  pointer-events: none;
}
body.splash-locked { overflow: hidden; }

/* シーン：立ち絵を画面いっぱいに配置する層 */
.splash-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  animation: splash-scene-in 0.7s ease-out both;
}
/* キャラの背後の柔らかい光（浮き上がらせず、シーンに溶け込ませる） */
.splash-scene::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 120dvh;
  height: 120dvh;
  background: radial-gradient(circle, rgba(255, 230, 244, 0.4) 0%, rgba(255, 230, 244, 0) 62%);
  pointer-events: none;
}
/* 立ち絵は透過PNG（キャラの形にくり抜き済み）。
   上半身アップ：画面高の約1.3倍に拡大し、画像の上端を画面上端に合わせて
   下方向へはみ出させる（足元は画面外）。顔・上半身が主役になる構図。 */
.splash-img {
  position: absolute;
  bottom: -40vh;
  bottom: -40dvh;
  left: 50%;
  transform: translateX(-50%);
  height: 140vh;
  height: 140dvh;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 0 22px rgba(64, 0, 36, 0.35));
  transition: opacity 0.18s ease, height 0.3s ease, bottom 0.3s ease;
}
.splash-img-fading { opacity: 0; }

/* 指差し絵は元画像自体がバストアップ構図で顔が大きいため、ポーズ別に縮める
   （他の差分と顔の大きさを揃える。ユーザー指摘 2026-11-17） */
.splash-img[data-pose="question"] {
  height: 72vh;
  height: 72dvh;
  bottom: 30vh;
  bottom: 30dvh;
}

/* 下部エリア：セリフ・質問・選択肢・結果はすべてこの中に敷く。
   .splash 内で下端に固定し、常にビューポート下部に見えるようにする。
   「帯」の地は主役にしない：上側は透明から始まる薄いグラデーションだけにし、
   枠線や濃い影は付けない。主役はピンクの選択肢ブロックで、
   セリフ・質問文はテキストシャドウで読ませる。
   高さは最大でも画面の66%までに抑え、立ち絵の顔・上半身（画像の上部）に
   被らないようにする（結果表示時のみ少し広げる）。入りきらない場合の
   保険として overflow-y: auto は残すが、エリア自体は常に下部に固定される。 */
.splash-band {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-height: 66vh;
  max-height: 66dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 30px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  /* backdrop-filter: blur は付けない。帯の範囲に重なるキャラ（胸元）が
     ぼやけて見えるため撤去した。可読性はこのグラデーションの地で確保する。
     グラデーションの立ち上がりも遅らせ、帯の上端〜胸元にかかる部分は
     完全に透明にしてキャラを暗くしない。 */
  background: linear-gradient(180deg, rgba(26, 0, 16, 0) 0%, rgba(26, 0, 16, 0) 22%, rgba(26, 0, 16, 0.42) 55%, rgba(15, 0, 9, 0.82) 100%);
  animation: splash-band-in 0.55s ease-out 0.15s both;
}
.splash-band > * {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
/* 結果表示時はエリアを少し広げて、カードの横並びとボタンの場所を確保する */
.splash.splash-phase-result .splash-band {
  max-height: 74vh;
  max-height: 74dvh;
}
/* 帯の地が薄い分、文字は影で読ませる */
.splash-speech, .splash-catch, .splash-question, .splash-result-lead {
  text-shadow: 0 1px 8px rgba(40, 0, 22, 0.65), 0 0 2px rgba(40, 0, 22, 0.65);
}
.splash-sub, .splash-progress, .splash-mock-note, .splash-result-meta, .splash-runner-meta {
  text-shadow: 0 1px 6px rgba(40, 0, 22, 0.6);
}

/* セリフ：名前タグ付きの会話文として帯の先頭に出す */
.splash-speech {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  color: #fff;
}
.splash-speech::before {
  content: "ミル 📮";
  display: inline-block;
  margin-right: 10px;
  padding: 1px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5da2, var(--accent));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.12em;
  box-shadow: 0 2px 8px rgba(230, 0, 126, 0.45);
}

/* 吹き出し：ミルが喋っている形にする。
   セリフ（.splash-speech）・開始パネルのキャッチ＋サブ（.splash-bubble で囲む）・
   質問文／検索中文／結果リード（.splash-bubble-text を付けた要素）を、
   白〜薄ピンク地の吹き出しバブルに入れる。しっぽ（::after）は上向きで、
   画面上部に立つキャラ（立ち絵）の方を指す。
   名前タグ（.splash-speech::before）は吹き出しの左上に重ねるラベルに変更。 */
.splash-speech {
  position: relative;
  margin: 12px 0 12px;
  padding: 13px 16px 12px;
  background: linear-gradient(180deg, #ffffff, #fff0f6);
  border: 2px solid #ffb3d1;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(40, 0, 22, 0.35);
  color: #45102c;
  text-shadow: none;
}
.splash-speech::before {
  position: absolute;
  top: -11px;
  left: 16px;
  margin-right: 0;
  vertical-align: baseline;
}
.splash-bubble {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #fff0f6);
  border: 2px solid #ffb3d1;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(40, 0, 22, 0.35);
  color: #45102c;
  text-shadow: none;
}
.splash-bubble { padding: 12px 16px 2px; margin: 0 0 12px; }
/* 質問文・検索中文・結果リードは吹き出しにしない（ユーザー指示 2026-11-17：
   吹き出しはミルのセリフだけにして、質問は帯の上に素の文字で出す） */
.splash-bubble-text {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: #fff;
}
/* しっぽ：吹き出し上辺からキャラの方（上）を指す */
.splash-speech::after, .splash-bubble::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 15px;
  height: 15px;
  background: #ffffff;
  border-top: 2px solid #ffb3d1;
  border-left: 2px solid #ffb3d1;
  border-top-left-radius: 4px;
  transform: translateX(-50%) rotate(45deg);
}
/* 吹き出し内では文字色を濃色に切り替える（地が白〜薄ピンクのため） */
.splash-bubble .splash-catch { color: #c2187a; text-shadow: none; }
.splash-bubble .splash-sub { color: #7a3055; text-shadow: none; margin-bottom: 8px; }

/* パネル共通：帯の中では区画を作らず、そのまま流す */
.splash-panel { padding-top: 2px; }
.splash-catch {
  margin: 2px 0 4px;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}
.splash-sub {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffe3f0;
}
/* 開始・結果パネルのボタンも選択肢と同じく大きな2列ブロックにする
   （スケッチ下部の黄色い2ブロックがこの形） */
.splash-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.splash-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: inherit;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.35;
  border-radius: 20px;
  padding: 18px 12px;
  min-height: 76px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.splash-btn:hover { text-decoration: none; opacity: 0.92; }
.splash-btn:active { transform: scale(0.97); }
/* 結果パネルの主ボタン（もっと詰めたい方はこちら）は横幅いっぱいにし、
   残り2つをその下に左右並びにする */
#splash-panel-result .splash-btn-primary { grid-column: 1 / -1; }
.splash-btn-primary {
  background: linear-gradient(180deg, #ff5da2, var(--accent));
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(230, 0, 126, 0.5);
}
.splash-btn-view {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.splash-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(30, 0, 18, 0.45);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.splash-close:hover { background: rgba(30, 0, 18, 0.7); }
.splash .mascot-ai-note { color: rgba(255, 255, 255, 0.85); }

/* 質問パネル */
.splash-progress {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffb3d1;
}
.splash-question {
  margin: 0 0 12px;
  font-size: 1.3rem;
  line-height: 1.5;
  /* 質問文は艶やかに：明朝系＋ピンクグラデーション＋柔らかいグロー（ユーザー指示 2026-11-17） */
  font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #ffffff 15%, #ffe0f0 48%, #ff9ecb 85%, #ff7fba);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 9px rgba(64, 0, 36, 0.6));
}
/* 5択は下部に2列グリッド（2+2+1、最後の1つは横幅いっぱい）で、
   大きな角丸ピンクブロックとして並べる。選択肢がこの画面の主役。 */
.splash-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.splash-ans-btn {
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 93, 162, 0.95), rgba(230, 0, 126, 0.95));
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 16px 8px;
  min-height: 60px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(120, 0, 55, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.splash-ans-btn:last-child { grid-column: 1 / -1; }
.splash-ans-btn:hover { background: linear-gradient(180deg, #ff2e88, #c2187a); }
.splash-ans-btn:active { transform: scale(0.96); }
.splash-ans-btn:disabled { opacity: 0.55; cursor: wait; }

/* 検索中バー */
.splash-searchbar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  margin: 4px 0 10px;
  max-width: 520px;
}
.splash-searchfill {
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5da2, var(--accent));
  transition: width 0.6s ease;
}

/* 結果パネル：帯の中でカードを横並び（横スクロール）にする */
.splash-mock-note {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffd7e8;
}
.splash-result-lead {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
}
.splash-result-list {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 12px;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.splash-result-card {
  flex: 0 0 336px;
  max-width: 86vw;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px;
}
.splash-result-thumb {
  flex: none;
  width: 96px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.splash-result-body { flex: 1; min-width: 0; }
.splash-result-body h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #fff;
}
.splash-result-meta {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffe3f0;
}
.splash-result-reason {
  margin: 0 0 6px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #fff;
}
.splash-result-card .price { color: #ff8fab; }
.splash-goto {
  display: inline-block;
  margin-top: 8px;
  background: linear-gradient(180deg, #ff5da2, var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 3px 10px rgba(230, 0, 126, 0.5);
}
.splash-goto:hover { text-decoration: none; opacity: 0.92; }
.splash-runners-title {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffb3d1;
  writing-mode: vertical-rl;
}
.splash-runner {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px;
}
.splash-runner img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.splash-runner-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}
.splash-runner-title a { color: #fff; }
.splash-runner-meta {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffe3f0;
}

@keyframes splash-scene-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes splash-band-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* キャラは全画面サイズで左右中央（スケッチ準拠）。
   以前のPC右寄せは廃止し、背後の光も中央のままにする。 */

@media (max-width: 640px) {
  .splash-band { padding: 26px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .splash-speech { font-size: 0.94rem; }
  .splash-catch { font-size: 1.45rem; }
  .splash-sub { font-size: 0.88rem; margin-bottom: 10px; }
  .splash-question { font-size: 1.12rem; }
  /* スマホでも選択肢・ボタンは2列ブロックのまま（縦積みにしない） */
  .splash-btn { min-height: 68px; padding: 14px 8px; font-size: 1.02rem; }
  .splash-ans-btn { min-height: 56px; padding: 14px 6px; }
  .splash-result-card { flex-basis: 84vw; }
  .splash-result-thumb { width: 84px; }
}

@media (max-height: 520px) {
  /* 低丈画面（横長PC・横向きスマホ）：エリアの上限をさらに絞り、
     立ち絵を少し小さくして顔・上半身がエリアの上に必ず出るようにする。
     ブロックも低くして、質問＋5択が入りきるようにする */
  .splash-band { padding-top: 14px; max-height: 62vh; max-height: 62dvh; }
  .splash.splash-phase-result .splash-band { max-height: 66vh; max-height: 66dvh; }
  /* 低丈画面ではアップを解除し、全身が収まる表示に戻す */
  .splash-img { height: 100vh; height: 100dvh; bottom: 0; }
  .splash-speech { font-size: 0.9rem; margin-bottom: 2px; }
  .splash-catch { font-size: 1.3rem; margin-top: 0; }
  .splash-sub { margin-bottom: 8px; }
  .splash-question { font-size: 1.05rem; margin-bottom: 8px; }
  .splash-btn { min-height: 52px; padding: 10px 8px; }
  .splash-ans-btn { min-height: 42px; padding: 8px 6px; }
  .splash-result-card { flex-basis: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-scene, .splash-band { animation: none; }
  .splash, .splash-img, .splash-searchfill { transition: none; }
  .splash-ans-btn:active { transform: none; }
}
