/* =========================================================
   別れたあとの反応タイプ診断
   夜空（紺）と金・明朝体の見出し（前の版のデザインを引き継ぐ）
   ========================================================= */
:root {
  --bg-1: #0d0b26;
  --bg-2: #1c1550;
  --bg-3: #34266a;
  --gold: #e8c77a;
  --gold-2: #f6e3ae;
  --text: #ece8ff;
  --muted: #b3acd6;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(232, 199, 122, 0.28);
  --radius: 18px;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, var(--bg-3) 0%, var(--bg-2) 40%, var(--bg-1) 100%) fixed;
  background-color: var(--bg-1);
  line-height: 1.85;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  line-break: strict;
}

a { color: var(--gold-2); }

/* ---------- 星空 ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stars {
  position: absolute; inset: -50%;
  background-repeat: repeat;
  animation: twinkle 4s ease-in-out infinite alternate;
}
.s1 {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, #fff, transparent),
    radial-gradient(1px 1px at 200px 160px, #fff, transparent),
    radial-gradient(1px 1px at 60px 200px, #fff, transparent);
  background-size: 240px 240px;
}
.s2 {
  background-image:
    radial-gradient(1.5px 1.5px at 50px 120px, var(--gold-2), transparent),
    radial-gradient(1.5px 1.5px at 260px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 170px 250px, #fff, transparent);
  background-size: 320px 320px;
  animation-delay: 1.3s;
}
.s3 {
  background-image:
    radial-gradient(2px 2px at 100px 100px, var(--gold), transparent),
    radial-gradient(2px 2px at 380px 300px, #fff, transparent);
  background-size: 460px 460px;
  animation-delay: 2.6s;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }

/* ---------- ヘッダー ---------- */
.header {
  position: relative; z-index: 1;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(13, 11, 38, .55);
}
.header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header .home-link {
  color: var(--gold-2);
  text-decoration: none;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .08em;
}
.header-sub { font-size: 12px; color: var(--muted); }

/* ---------- レイアウト ---------- */
.wrap {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px 32px;
}
.screen { display: none; }
.screen.is-active { display: block; animation: fadeUp .6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- 三日月（ゆっくり揺れる） ---------- */
.moon {
  width: 110px; height: 110px;
  margin: 10px auto 18px;
  border-radius: 50%;
  box-shadow: 22px -8px 0 0 var(--gold);
  transform: translateX(-11px);
  filter: drop-shadow(0 0 24px rgba(232, 199, 122, .55));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translate(-11px, -8px); } }
.moon-sm {
  width: 80px; height: 80px;
  box-shadow: 16px -6px 0 0 var(--gold);
  transform: translateX(-8px);
  animation: floatSm 3s ease-in-out infinite;
}
@keyframes floatSm { 50% { transform: translate(-8px, -8px); } }

/* ---------- ボタン ---------- */
.btn {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 26px auto 0;
  padding: 17px 24px;
  border: none;
  border-radius: 999px;
  font: 700 17px/1.4 "Noto Sans JP", sans-serif;
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-main {
  color: #2a1a00;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, #c9a24e);
  box-shadow: 0 8px 30px rgba(232, 199, 122, .35);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 8px 44px rgba(232, 199, 122, .6); } }
.btn-main.is-disabled {
  background: rgba(255, 255, 255, .1);
  color: var(--muted);
  box-shadow: none;
  animation: none;
  cursor: default;
}
.btn-ghost {
  color: var(--gold-2);
  background: transparent;
  border: 1px solid var(--card-border);
}

/* ---------- トップ ---------- */
#screen-top { text-align: center; }
.title {
  font-family: var(--mincho);
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 18px;
  background: linear-gradient(180deg, #fff 10%, var(--gold-2) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 15px; word-break: auto-phrase; }
.lead strong { color: var(--gold-2); }
.badges {
  list-style: none;
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.badges li {
  font-size: 12px;
  padding: 4px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--gold-2);
}
.top-notes {
  list-style: none;
  margin: 24px auto 0;
  max-width: 400px;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
}
.top-notes li { padding-left: 1em; text-indent: -1em; }
.top-notes li::before { content: "・"; }
.pc { display: none; }
@media (min-width: 520px) { .pc { display: inline; } }

/* ---------- 質問 ---------- */
.progress-label { font-size: 13px; color: var(--muted); text-align: right; margin-bottom: 6px; }
.progress-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .4s ease;
}
.q-text {
  font-family: var(--mincho);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  word-break: auto-phrase;
}
.q-hint { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }
.choices { margin-top: 18px; display: grid; gap: 12px; }
.choices.q-anim { animation: fadeUp .4s ease both; }
.choice {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .15);
  color: var(--text);
  font: 500 15px/1.55 "Noto Sans JP", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
}
.choice:hover { border-color: var(--gold); background: rgba(232, 199, 122, .1); }
.choice:active { transform: scale(.98); }
.choice.is-selected { border-color: var(--gold); background: rgba(232, 199, 122, .2); }
.btn-back {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 整理中 ---------- */
#screen-loading { text-align: center; padding: 70px 0; }
.loading-text { font-family: var(--mincho); font-size: 17px; color: var(--gold-2); }

/* ---------- 結果 ---------- */
.result-hero { text-align: center; }
.result-kicker { font-family: var(--mincho); font-size: 15px; color: var(--muted); }
.result-letter { margin-top: 10px; }
.result-letter span {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(232, 199, 122, .15);
  color: var(--gold-2);
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 21px;
}
.result-name {
  margin-top: 12px;
  font-family: var(--mincho);
  font-size: 25px;
  line-height: 1.5;
  font-weight: 700;
  word-break: auto-phrase;
  background: linear-gradient(180deg, #fff 10%, var(--gold-2) 70%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-tendency { margin-top: 12px; font-size: 15px; text-align: left; }
.result-caution { margin-top: 8px; font-size: 11px; color: var(--muted); text-align: left; }

.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mincho);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}
.sec-icon { font-size: 17px; }
.result-body { font-size: 15px; }
.result-body p + p { margin-top: 10px; }

.list { list-style: none; display: grid; gap: 12px; font-size: 15px; }
.list li { position: relative; padding-left: 1.5em; }
.list li::before { position: absolute; left: 0; color: var(--gold); }
.list-step li::before { content: "☾"; }
.list-avoid li::before { content: "−"; color: var(--muted); }

/* ---------- 相談の案内・PR枠 ---------- */
.aff {
  position: relative;
  margin-top: 18px;
  padding: 24px 18px 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(232, 199, 122, .14), rgba(106, 75, 196, .18));
  border: 1px solid var(--gold);
}
.aff-pr {
  position: absolute;
  top: 10px; right: 12px;
  padding: 0 7px;
  border: 1px solid var(--gold-2);
  border-radius: 4px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.7;
}
.aff-name { font-family: var(--mincho); font-weight: 700; font-size: 19px; padding-right: 40px; }
.aff-desc { margin-top: 4px; font-size: 14px; }
.aff-terms {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(13, 11, 38, .45);
  font-size: 13px;
}
.aff-terms p + p { margin-top: 4px; }
.aff .btn { max-width: none; margin-top: 16px; padding: 15px 12px; font-size: 15px; letter-spacing: .02em; animation: none; }
.aff-note { margin-top: 10px; font-size: 11px; color: var(--muted); }
.aff-pixel { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---------- 注意 ---------- */
.safety {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  font-size: 14px;
}
.safety strong { color: var(--gold-2); }
.safety-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.safety-sub:empty { display: none; }

/* ---------- 関連記事 ---------- */
.related-list { list-style: none; display: grid; gap: 8px; }
.related-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .15);
  text-decoration: none;
  font-size: 14px;
}
.related-list a::after { content: " →"; }

/* ---------- 締め ---------- */
.closing { margin-top: 36px; text-align: center; }
.closing-main {
  font-family: var(--mincho);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--gold-2);
  word-break: auto-phrase;
}
.closing-sub { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- シェア ---------- */
.share { margin-top: 36px; text-align: center; }
.share-title { font-size: 13px; color: var(--muted); }
.share-text {
  margin: 8px auto 0;
  max-width: 360px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--card-border);
  font-size: 13px;
  white-space: pre-line;
}
.share-btns { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.share-btn {
  flex: 1;
  max-width: 120px;
  padding: 11px 0;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.share-btn.threads { background: #000; border: 1px solid #444; }
.share-btn.x { background: #000; border: 1px solid #444; }
.share-btn.line { background: #06c755; }

.result-actions { margin-top: 8px; }
.result-actions .btn { margin-top: 14px; }

/* ---------- フッター ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 24px auto 0;
  padding: 24px 16px 40px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  text-align: center;
}
.footer a { color: var(--muted); }
.footer-note { margin: 0 auto 6px; text-align: left; }
.footer-links { margin-top: 12px; }
.copy { margin-top: 6px; }
@media (min-width: 520px) { .footer-note { text-align: center; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
