:root {
  --bg: #110814;
  --bg-glow-1: rgba(225, 29, 72, 0.25);
  --bg-glow-2: rgba(124, 58, 237, 0.22);
  --panel-soft: rgba(27, 13, 34, 0.85);
  --border: rgba(255, 255, 255, 0.12);
  --text: #fff7ed;
  --text-muted: #c9b9c8;
  --red: #a30f24;
  --red-strong: #e11d48;
  --gold: #d6b35a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, var(--bg-glow-1), transparent 28rem),
    radial-gradient(circle at bottom right, var(--bg-glow-2), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", sans-serif;
  line-height: 1.7;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(214, 179, 90, 0.35);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(214, 179, 90, 0.08);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 16px;
}

.intro-text {
  white-space: pre-line;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.lead-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.primary-button {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.25);
}

.primary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 質問画面: 進捗表示 */
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.progress-count {
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.progress-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-strong), var(--gold));
  transition: width 0.25s ease;
}

.question-text {
  font-size: clamp(19px, 4.5vw, 24px);
  font-weight: 800;
  line-height: 1.5;
  margin: 0 0 20px;
}

.option-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: 0.15s ease;
}

.option-button:hover,
.option-button.selected {
  border-color: rgba(214, 179, 90, 0.75);
  background: rgba(214, 179, 90, 0.12);
  transform: translateY(-1px);
}

.option-badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(225, 29, 72, 0.25);
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
}

.option-text {
  line-height: 1.6;
  padding-top: 4px;
}

.nav-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* 結果画面 */
.result-top {
  text-align: center;
  padding: 4px 0 18px;
}

.devil-image {
  display: block;
  width: clamp(200px, 85%, 320px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 8px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(225, 29, 72, 0.35));
}

.type-name {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin: 4px 0;
}

.muma-block {
  margin: 18px auto 4px;
  max-width: 420px;
}

.muma-meter {
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 10px;
}

.muma-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, var(--red-strong), var(--gold));
}

.muma-score-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}

.muma-score-label {
  color: var(--text-muted);
  font-size: 13px;
}

.muma-score-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
}

.muma-level-label {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.result-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.result-box h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 14px;
}

.result-box p {
  margin: 0;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-line;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.plain-list li {
  margin-bottom: 6px;
}

.scenes-box {
  margin-bottom: 20px;
}

.locked-note {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}

/* ブラーの上に重ねて表示する文言＋開放ボタン */
.locked-overlay-wrap {
  position: relative;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* 文言が枠の縁に触れないよう、内側に余白を確保する */
  padding: 12px;
}

/* 押せる要素ではないため、ボタンに見える装飾（枠線・影・立体感）はつけない。
   ぼかした本文の上でも読めるよう、背景だけ敷いて文字を枠内に収める */
.locked-overlay .locked-note {
  margin: 0;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(17, 8, 20, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
  color: var(--gold);
}

/* ---- 裏タイプ（2位）ブロック ---- */
.second-type-box {
  margin-bottom: 20px;
}

/* 未開放のあいだ本文をぼかす。開放後はJSがこのクラスを外す */
.second-type-body.locked-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

/* 未開放時のメッセージが枠内に収まる高さを確保する */
.second-type-box .locked-overlay-wrap {
  min-height: 210px;
}

.second-type-intro {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.second-type-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.second-type-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.second-type-name {
  margin: 0 0 4px;
  color: var(--gold);
  font-weight: 800;
}

.second-type-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.second-type-one-liner {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* ---- 沼る側の診断へのクロス導線 ---- */
.cross-box {
  margin-bottom: 20px;
  text-align: center;
}

/* aタグに .primary-button を当てているため、下線だけ打ち消す */
.cross-button {
  margin-top: 14px;
  text-decoration: none;
}

/* ---- 990円「脈あり・好意分析」への従CTA ----
   **主CTA（赤いグラデーションのボタン）と同じ強さで出さない。**
   このページの主役は無料の結果と、沼る側では495円のほうで、
   ここは「もう一つ別の商品がある」と伝えるだけの枠にする。
   枠線と金色だけで組み、影と塗りつぶしは使わない */
.paid-cross-box {
  margin-bottom: 20px;
  border: 1px solid rgba(214, 179, 90, 0.45);
  background: none;
}

.paid-cross-box h3 {
  color: var(--gold);
}

.paid-cross-box p {
  white-space: pre-line;
}

/* **恋愛沼診断の結果画面と同じ色にする**（2026-08-17・本人指摘）。
   あちらは2026-08-16に紫へ替えてあったが、こちらは金色のままで、
   **同じ商品への導線なのに診断ごとに見た目が違う状態だった。**
   紫にする理由もあちらと同じ——495円（金色）とも悪魔の一言（赤）とも
   ぶつからず、背景の紫（--bg-glow-2）と同系なのでサイトの中で浮かない。
   **主CTAより弱く見せる**決めごと（`docs/monetization.md` 5章）は
   塗りつぶさないことで保つ。**片方だけ替えないこと** */
.paid-cross-button {
  display: block;
  margin-top: 14px;
  padding: 13px 18px;
  border: 1px solid rgba(167, 139, 250, 0.75);
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.paid-cross-button:hover {
  background: rgba(124, 58, 237, 0.24);
}


.one-liner {
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1.5px solid var(--red-strong);
  background: rgba(225, 29, 72, 0.08);
  border-radius: 14px;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

/* 「悪魔の一言」見出し＋本文。見出しを本文と同じ四角枠の中に収める。
   見出しは他の項目見出し（.result-box h3、ゴールド）とは意図的に雰囲気を変え、
   赤・斜体・広めの字間で少し禍々しく見せる */
.one-liner-block {
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1.5px solid var(--red-strong);
  background: rgba(225, 29, 72, 0.08);
  border-radius: 14px;
}

.one-liner-block .one-liner {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}

.one-liner-heading {
  margin: 0 0 8px;
  color: var(--red-strong);
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px rgba(225, 29, 72, 0.45);
}

.one-liner-heading::before {
  content: "† ";
  font-style: normal;
}

.share-row-block {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1.5px solid rgba(255, 247, 237, 0.55);
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.2);
}

.share-row-label {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: center;
}

.share-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.share-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.share-icon-button:hover {
  transform: translateY(-2px);
}

.share-icon-x {
  background: #0b0b0d;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 17px;
}

.share-icon-line {
  background: #06c755;
  font-size: 9px;
  letter-spacing: 0.01em;
}

.share-icon-facebook {
  background: #1877f2;
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.share-icon-pinterest {
  background: #e60023;
  font-size: 19px;
}

.disclaimer {
  white-space: pre-line;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin: 8px 0 24px;
}

@media (max-width: 480px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- 1問目に出す一時案内（ふわっと出て、ふわっと消える） ---- */
.quiz-toast {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  /* 消えている間は下の選択肢を押せるようにする（この幕は無いのと同じ扱い） */
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  /* 消えるときだけ、透明になりきってから当たり判定を外す。
     出るときは `visibility` を待たせない（下の .is-visible が上書きする） */
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* **出ている間はタップを通さない**（2026-08-17・本人指摘）。
   画面全体を覆う案内なので、**下の選択肢を誤って押すと1問目が答え済みになる。**
   幕自身が当たり判定を持つので、下へは何も届かない。
   **消えるのは「理解した」を押したときだけ**——時間では消えない */
.quiz-toast.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* **出ている間はタップを通さない**（2026-08-17・本人指摘。恋愛沼診断と同じ）。
   画面全体を覆う案内なので、**下の選択肢を誤って押すと1問目が答え済みになる。**
   **アニメーションの終わりは `visibility: hidden`** なので、
   終わったあとは（このクラスが付いたままでも）当たり判定が消える。
   受け止めたタップは案内を閉じるのに使う（app.js） */
.quiz-toast.is-visible {
  pointer-events: auto;
  cursor: pointer;
}

/* 画面いっぱいに大きく見せる。囲みは作らず、画面全体を暗くした上に大きな文字を置く */
.quiz-toast {
  background: rgba(9, 4, 11, 0.82);
}

.quiz-toast p {
  margin: 0;
  max-width: 14em;
  color: var(--text);
  /* 375px幅で約41px、大画面で最大72px。既定の本文サイズの約3〜5倍 */
  font-size: clamp(30px, 11vw, 72px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

/* **時間で消すのをやめた**（2026-08-17・本人指示）。
   以前は約2.9秒で自動的に消えていた（`quiz-toast-fade`）。
   画面全体を覆う案内なので、**消えるのを待たずに触ると
   1問目を答えたことになってしまう。**
   いまは「理解した」を押すまで出したままにする（閉じるのは app.js）。 */

/* 案内の中身。文言の下にボタンを置く */
.quiz-toast-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* **押す場所をはっきりさせる。**文言がかなり大きいので、ボタンが小さいと
   「読むだけの画面」に見えて、どこを押せば進めるのか分からなくなる */
.quiz-toast-button {
  padding: 15px 40px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.35);
}

/* 動きを減らす設定の環境では、フェードもやめて即座に出し入れする */
@media (prefers-reduced-motion: reduce) {
  .quiz-toast,
  .quiz-toast.is-visible {
    transition-duration: 0s;
  }
}

/* あるある3場面ブロックの中に置くシェア枠。枠の中の枠になるため、
   外側の枠より控えめにして二重の囲みに見えないようにする */
/* 外側のシェア枠（16px）より一段小さくする。枠の中の枠なので主張を弱める */
.scenes-share-block .share-row-label {
  font-size: 12px;
  margin-bottom: 10px;
}

.scenes-share-block {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-width: 1px;
  border-color: rgba(255, 247, 237, 0.28);
  background: rgba(255, 247, 237, 0.1);
}

/* 「これは占いではない」ただし書き（固定文）。
   立ち位置を明示する防御的な表現なので、免責より前・本文と同じ読みやすさで出す。
   詳細は CLAUDE.md「禁止用語」と myakuari_bunseki_spec.md 5章⓪ */
.not-uranai {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding: 2px 0 2px 14px;
  margin: 24px 0 20px;
}

/* 法務ページへの導線。診断カードの外、画面最下部に置く */
.site-footer {
  margin: 28px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  margin: 0 10px;
  white-space: nowrap;
}

/* ---- ホームへ戻る（2026-08-17追加） ----
 *
 * **診断の入口には出口が無かった**（本人指摘）。トップ画面にあるのは
 * 「診断を始める」だけで、他の診断を見に行くにはブラウザの戻るしかなかった。
 * 販売ページ・購入前チェックの通過／不通過画面も同じ状態だった。
 *
 * **主ボタンと張り合わせない。**塗りつぶさず、枠と文字だけに色を置く
 * （990円への従CTAと同じ考え方。`docs/monetization.md` 5章）。
 * **`.site-footer` のリンクとは別物**——あちらは法務と復旧の入口で、
 * 診断を選び直すための導線ではない
 */
.home-back-row {
  margin: 20px 0 0;
  text-align: center;
}

.home-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.home-back-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

