@charset "UTF-8";
/* ============================================================
   むすび 復縁診断 — 夜明け前の空
   外部リクエストゼロ（Webフォント・画像・CDNを一切使わない）
   ============================================================ */

:root {
  --night-0: #0b0916;
  --night-1: #141127;
  --night-2: #1d1838;

  --ink:      #ece9f6;
  --ink-soft: #b9b3d0;
  --ink-dim:  #8a84a3;

  --sakura:      #f0b3c6;
  --sakura-deep: #d98aa6;
  --sakura-glow: rgba(240, 179, 198, .28);
  --gold:        #e6c78d;
  --leaf:        #9ecfbc;

  --glass:  rgba(255, 255, 255, .045);
  --glass2: rgba(255, 255, 255, .075);
  --hair:   rgba(255, 255, 255, .10);
  --hair-2: rgba(255, 255, 255, .18);

  --serif: "Hiragino Mincho ProN", "HiraMinProN-W3", "Yu Mincho", "YuMincho",
           "Noto Serif JP", "Source Han Serif JP", "MS PMincho", serif;
  --sans:  "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic",
           "Noto Sans JP", system-ui, -apple-system, sans-serif;

  --pad: clamp(20px, 5.5vw, 30px);
  --radius: 18px;
  --ease: cubic-bezier(.22, .68, .32, 1);
}

* { box-sizing: border-box; }

/* html にも地の色を置く。置かないと iOS の慣性スクロールで端に白が覗く */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--night-0);
}

body {
  margin: 0;
  min-height: 100vh;   /* svh 未対応ブラウザ向けのフォールバック */
  min-height: 100svh;
  background: var(--night-0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── 空 ───────────────────────────────────────────── */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.sky::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 108%, #6e3f57 0%, rgba(110, 63, 87, 0) 62%),
    radial-gradient(90% 60% at 12% 0%, #2b2350 0%, rgba(43, 35, 80, 0) 60%),
    linear-gradient(178deg, var(--night-0) 0%, var(--night-1) 42%, var(--night-2) 78%, #2c2143 100%);
}

.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 14%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 9%,  rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px   1px   at 33% 27%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.6px 1.6px at 62% 34%, rgba(255,236,244,.6),  transparent 60%),
    radial-gradient(1px   1px   at 89% 48%, rgba(255,255,255,.4),  transparent 60%),
    radial-gradient(1.2px 1.2px at 8%  55%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 46% 6%,  rgba(255,255,255,.5),  transparent 60%),
    radial-gradient(1px   1px   at 26% 44%, rgba(255,255,255,.3),  transparent 60%);
  animation: twinkle 7s ease-in-out infinite alternate;
}

.dawn {
  position: absolute; left: 50%; bottom: -34vh;
  width: 150vw; height: 60vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240,179,198,.20), rgba(240,179,198,0) 72%);
  filter: blur(24px);
}

@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

/* ── レイアウト ───────────────────────────────────── */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 620px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--pad) 6px;
}

.brand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.brand__mark { font-size: 14px; filter: saturate(.85); }
.brand__name {
  font-family: var(--serif); font-size: 13px; letter-spacing: .16em;
  color: var(--ink-soft);
}

/* 広告表示は「明瞭」であることが要件（ステマ規制）。小さく薄くしない */
.pr-badge {
  font-size: 12px; letter-spacing: .04em; color: var(--ink);
  border: 1px solid var(--hair-2); border-radius: 999px;
  padding: 4px 11px; white-space: nowrap;
}

/* 広告リンク直下の開示。小さすぎると開示として機能しないので、本文と同程度の可読性を保つ */
.pr-tag {
  margin: 12px 0 0;
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-align: center; color: var(--gold);
}

main { max-width: 620px; margin: 0 auto; padding: 0 var(--pad) 64px; }

.view { display: none; }
.view--active { display: block; animation: rise .62s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── イントロ ─────────────────────────────────────── */
.intro { padding: clamp(40px, 13vh, 90px) 0 0; text-align: center; }

.intro__eyebrow {
  margin: 0 0 22px;
  font-family: var(--serif); font-size: 11px; letter-spacing: .3em;
  color: var(--ink-dim);
}

.intro__title {
  margin: 0 0 30px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(29px, 8.6vw, 40px); line-height: 1.62; letter-spacing: .07em;
}
.intro__title-line { display: block; }
.intro__title-line:last-child {
  background: linear-gradient(96deg, var(--sakura) 12%, var(--gold) 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.intro__lead {
  margin: 0 auto 40px; max-width: 24em;
  font-family: var(--serif); font-size: 15px; line-height: 2.15;
  color: var(--ink-soft);
}

.intro__facts {
  list-style: none; margin: 34px auto 0; padding: 0;
  max-width: 25em; text-align: left;
}
.intro__facts li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; line-height: 1.8; color: var(--ink-dim);
  padding: 5px 0;
}
.dot {
  flex: 0 0 auto; width: 5px; height: 5px; margin-top: 9px; border-radius: 50%;
  background: var(--sakura); opacity: .75;
}

/* ── ボタン ───────────────────────────────────────── */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  min-height: 56px; padding: 14px 34px;
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .09em;
  text-decoration: none; cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .28s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }

.btn--primary {
  color: #2a1420;
  background: linear-gradient(100deg, var(--sakura) 0%, #f4c9a8 100%);
  box-shadow: 0 12px 34px -10px var(--sakura-glow), 0 0 0 1px rgba(255,255,255,.12) inset;
}
.btn--primary:hover { box-shadow: 0 16px 44px -10px rgba(240,179,198,.42), 0 0 0 1px rgba(255,255,255,.2) inset; }
.btn__sub { font-size: 10.5px; font-weight: 400; letter-spacing: .14em; opacity: .68; }

.btn--ghost {
  color: var(--ink-soft); background: var(--glass);
  border: 1px solid var(--hair);
  font-size: 13.5px; font-weight: 500; min-height: 48px; padding: 12px 24px;
}
.btn--ghost:hover { background: var(--glass2); border-color: var(--hair-2); color: var(--ink); }

.btn--line {
  flex-direction: row; width: 100%;
  color: #0e2b1c; background: linear-gradient(100deg, #7fd6a8, #a8e3c2);
  font-size: 14.5px;
}

.btn--retake { display: flex; width: 100%; margin-top: 28px; }

/* ── 質問 ─────────────────────────────────────────── */
.quiz { padding: 26px 0 0; }

.quiz__bar { display: flex; align-items: center; gap: 13px; margin-bottom: 42px; }

.quiz__back {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--hair);
  color: var(--ink-soft); cursor: pointer;
  transition: opacity .25s, background .25s;
}
.quiz__back:hover { background: var(--glass2); color: var(--ink); }
.quiz__back[disabled] { opacity: .25; cursor: default; }

.progress {
  flex: 1; height: 2px; border-radius: 2px;
  background: rgba(255,255,255,.09); overflow: hidden;
}
.progress__fill {
  height: 100%; width: 12.5%;
  background: linear-gradient(90deg, var(--sakura-deep), var(--sakura), var(--gold));
  box-shadow: 0 0 12px var(--sakura-glow);
  transition: width .55s var(--ease);
}

.quiz__count {
  flex: 0 0 auto; font-family: var(--serif); font-size: 14px;
  color: var(--ink-soft); letter-spacing: .06em; min-width: 42px; text-align: right;
}
.quiz__count i { font-style: normal; font-size: 10.5px; color: var(--ink-dim); }

.qcard { animation: qin .5s var(--ease) both; }
.qcard.is-out { animation: qout .22s var(--ease) both; }

@keyframes qin  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes qout { to { opacity: 0; transform: translateY(-8px); } }

.qcard__title {
  margin: 0 0 12px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 6.2vw, 27px); line-height: 1.72; letter-spacing: .05em;
  white-space: pre-line;
}
.qcard__note { margin: 0 0 30px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.8; }

.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.opt {
  position: relative; width: 100%;
  display: block; text-align: left;
  padding: 17px 46px 17px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--hair);
  color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  cursor: pointer;
  transition: transform .24s var(--ease), background .24s, border-color .24s, box-shadow .24s;
  -webkit-tap-highlight-color: transparent;
  animation: optin .5s var(--ease) both;
  animation-delay: calc(var(--i) * 55ms);
}
@keyframes optin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* hover はポインタのある環境だけ。タッチだとタップ後に張り付いて is-picked と紛らわしい */
@media (hover: hover) {
  .opt:hover {
    background: var(--glass2);
    border-color: rgba(240,179,198,.42);
    transform: translateX(3px);
    box-shadow: -3px 0 0 0 var(--sakura), 0 10px 30px -18px rgba(0,0,0,.8);
  }
  .opt:hover .opt__arrow { opacity: 1; transform: translateY(-50%) translateX(3px); color: var(--sakura); }
}
.opt:focus-visible {
  background: var(--glass2);
  border-color: rgba(240,179,198,.42);
  box-shadow: -3px 0 0 0 var(--sakura), 0 10px 30px -18px rgba(0,0,0,.8);
}
.opt.is-picked {
  background: rgba(240,179,198,.13);
  border-color: rgba(240,179,198,.6);
  box-shadow: -3px 0 0 0 var(--sakura);
}

.opt__label { display: block; }
.opt__sub {
  display: block; margin-top: 3px;
  font-family: var(--serif); font-size: 12px; color: var(--ink-dim); letter-spacing: .04em;
}
.opt__arrow {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-dim); opacity: .5; transition: opacity .24s, transform .24s;
}

/* ── 結果 ─────────────────────────────────────────── */
.result { padding: 30px 0 0; }

.rhead { text-align: center; margin-bottom: 30px; }
.rhead__eyebrow {
  margin: 0 0 14px; font-family: var(--serif);
  font-size: 11px; letter-spacing: .3em; color: var(--ink-dim);
}
.rhead__name {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 9.4vw, 44px); line-height: 1.4; letter-spacing: .09em;
  background: linear-gradient(96deg, var(--sakura) 8%, var(--gold) 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.rhead__name::after {
  content: "型"; font-size: .5em; letter-spacing: .1em; margin-left: .18em;
  -webkit-text-fill-color: var(--ink-soft); color: var(--ink-soft);
}
.rhead__kana {
  margin: 16px 0 0; font-family: var(--serif); font-size: 14px;
  color: var(--ink-soft); letter-spacing: .08em; line-height: 1.9;
}

.letter {
  position: relative;
  margin: 0 0 30px; padding: 32px 26px 30px;
  border-radius: var(--radius);
  background: linear-gradient(168deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid var(--hair);
  font-family: var(--serif); font-size: 15px; line-height: 2.25; letter-spacing: .05em;
  color: #efe9f2;
  white-space: pre-line;
  box-shadow: 0 26px 60px -34px rgba(0,0,0,.9);
}
.letter__seal {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  font-size: 15px; border-radius: 50%;
  background: var(--night-1); border: 1px solid var(--hair-2);
}

.panel {
  position: relative;
  margin: 0 0 16px; padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--hair);
}
.panel__title {
  margin: 0 0 12px;
  font-family: var(--serif); font-weight: 400; font-size: 16.5px;
  letter-spacing: .08em; line-height: 1.7; color: var(--ink);
}
.panel__note { margin: 0 0 18px; font-size: 12px; line-height: 1.85; color: var(--ink-dim); }

.prose {
  font-family: var(--serif); font-size: 14.5px; line-height: 2.15;
  color: var(--ink-soft); white-space: pre-line; letter-spacing: .04em;
}

/* 状態マップ */
.axes { list-style: none; margin: 0; padding: 0; display: grid; gap: 17px; }
.axis__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.axis__label { font-family: var(--serif); font-size: 13.5px; letter-spacing: .06em; }
.axis__hint { display: block; font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; line-height: 1.6; }
.axis__track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.axis__fill {
  height: 100%; width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sakura-deep), var(--sakura) 62%, var(--gold));
  box-shadow: 0 0 10px var(--sakura-glow);
  transition: width 1.1s var(--ease);
}

/* do / dont */
.split { display: grid; gap: 16px; margin-bottom: 16px; }
.split .panel { margin: 0; }
.panel--do   { border-color: rgba(158,207,188,.24); background: rgba(158,207,188,.05); }
.panel--dont { border-color: rgba(230,199,141,.20); background: rgba(230,199,141,.04); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li {
  position: relative; padding-left: 24px;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-soft);
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 7px; height: 4px; border-left: 1.5px solid var(--leaf); border-bottom: 1.5px solid var(--leaf);
  transform: rotate(-45deg);
}
.ticks--x li::before {
  content: "×"; width: auto; height: auto; border: 0; transform: none;
  left: 3px; top: 0; color: var(--gold); font-size: 13px; line-height: 1.9;
}

/* 鑑定士カード */
.panel--expert { background: linear-gradient(168deg, rgba(240,179,198,.09), rgba(240,179,198,.03)); border-color: rgba(240,179,198,.26); }
.panel--haha   { background: linear-gradient(168deg, rgba(230,199,141,.09), rgba(230,199,141,.03)); border-color: rgba(230,199,141,.26); }

.ex { display: block; text-decoration: none; color: inherit; }
.ex__head { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.ex__avatar {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; color: #2a1420;
  background: linear-gradient(140deg, var(--sakura), #f4cfae);
  box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset;
}
.panel--haha .ex__avatar { background: linear-gradient(140deg, var(--gold), #f0dcb4); }
.ex__name { font-family: var(--serif); font-size: 18px; letter-spacing: .08em; }
.ex__field { display: block; font-size: 11.5px; color: var(--ink-dim); margin-top: 3px; letter-spacing: .04em; }
.ex__blurb {
  margin: 0 0 18px;
  font-family: var(--serif); font-size: 14px; line-height: 2.05; color: var(--ink-soft);
}
.ex__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .06em;
  color: #2a1420;
  background: linear-gradient(100deg, var(--sakura), #f4c9a8);
  box-shadow: 0 12px 30px -12px var(--sakura-glow);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease);
}
.panel--haha .ex__cta { background: linear-gradient(100deg, var(--gold), #f2ddb6); box-shadow: 0 12px 30px -12px rgba(230,199,141,.3); }
.ex:hover .ex__cta { transform: translateY(-2px); box-shadow: 0 18px 40px -14px var(--sakura-glow); }
.ex:active .ex__cta { transform: scale(.98); }

/* 打消し表示。強調表示より極端に小さいと打消しとして機能しない（消費者庁・打消し表示報告書） */
.fineprint { margin: 12px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); text-align: center; }

.panel--line { background: rgba(158,207,188,.06); border-color: rgba(158,207,188,.24); }

/* 相談窓口。広告より前に、静かに置く */
.panel--care { background: rgba(255,255,255,.03); border-color: var(--hair-2); }
.panel--care .fineprint { text-align: left; margin-top: 14px; }
.panel--care a { color: var(--sakura); }

/* シェア */
.share { display: grid; gap: 10px; }
.share .btn { width: 100%; }
.share .btn[disabled] { opacity: .5; pointer-events: none; }
#card-canvas { display: none; }

/* 共有シートもダウンロードも効かない環境（iOS Safari 等）で、長押し保存させるための表示 */
#card-fallback:empty { display: none; }
#card-fallback { margin-top: 16px; }
.card-img {
  display: block; width: 100%; max-width: 320px; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--hair);
  box-shadow: 0 20px 50px -28px rgba(0,0,0,.9);
}

/* ── フッター ─────────────────────────────────────── */
.footer {
  max-width: 620px; margin: 0 auto;
  padding: 34px var(--pad) max(40px, calc(env(safe-area-inset-bottom) + 24px));
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
}
.footer__disc {
  margin: 0 0 20px; font-size: 10.5px; line-height: 1.95; color: var(--ink-dim);
  text-align: left; max-width: 40em;
}
.footer__nav { display: flex; justify-content: center; gap: 22px; margin-bottom: 18px; }
.footer__nav a {
  font-size: 11.5px; color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.footer__nav a:hover { border-bottom-color: var(--hair-2); }
.footer__copy { margin: 0; font-family: var(--serif); font-size: 10.5px; letter-spacing: .24em; color: var(--ink-dim); }

/* ── 汎用ページ（about） ──────────────────────────── */
.page { max-width: 620px; margin: 0 auto; padding: 40px var(--pad) 60px; }
.page h1 {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  letter-spacing: .08em; margin: 0 0 30px;
}
.page h2 {
  font-family: var(--serif); font-weight: 400; font-size: 16px;
  letter-spacing: .08em; margin: 34px 0 12px; color: var(--sakura);
}
.page p, .page li { font-size: 13.5px; line-height: 2.05; color: var(--ink-soft); }
.page ul { padding-left: 1.2em; }
.page a { color: var(--sakura); }
.page .back { display: inline-block; margin-top: 40px; font-size: 12.5px; color: var(--ink-soft); text-decoration: none; }
.page .back:hover { color: var(--ink); }

/* ── アクセシビリティ ─────────────────────────────── */
:focus-visible { outline: 2px solid var(--sakura); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 600px) {
  .split { grid-template-columns: 1fr 1fr; }
  .share { grid-template-columns: 1fr 1fr; }
  .panel { padding: 28px 26px; }
  .letter { padding: 36px 32px; }
}
