/* ==========================================================
   月詠タロット — ダーク＆神秘トーン
   ========================================================== */
:root {
  --bg-0: #0b0817;
  --bg-1: #131028;
  --bg-2: #1c1738;
  --panel: rgba(28, 23, 56, 0.72);
  --line: rgba(212, 175, 55, 0.28);
  --gold: #d4af37;
  --gold-soft: #e8c96a;
  --purple: #8d78d9;
  --text: #e9e4f4;
  --text-dim: #a89fc4;
  --danger: #e06a7a;
  --danger-bg: rgba(224, 106, 122, 0.10);
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  background: radial-gradient(ellipse at 50% -10%, var(--bg-2) 0%, var(--bg-1) 45%, var(--bg-0) 100%) fixed;
  color: var(--text);
  line-height: 1.8;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* 星空の背景 */
.stars-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 38%, rgba(232,201,106,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 62%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 55%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 18% 85%, rgba(141,120,217,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 78%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 8%, rgba(255,255,255,.55) 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

main { max-width: 480px; margin: 0 auto; padding: 0 20px 64px; }

/* ============ ヘッダー ============ */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(11, 8, 23, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; color: var(--text);
}
.brand-moon { color: var(--gold-soft); font-size: 20px; }
.brand-name { font-family: var(--serif); font-size: 17px; letter-spacing: .12em; font-weight: 600; }
.nav-link {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold-soft); font-size: 13px; padding: 6px 16px; cursor: pointer;
  font-family: var(--sans);
}

/* ============ 画面切り替え ============ */
.screen { display: none; padding-top: 32px; }
.screen.active { display: block; animation: fadein .45s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ ヒーロー ============ */
.hero { text-align: center; padding: 16px 0 40px; }
.hero-art { display: flex; justify-content: center; margin-bottom: 20px; }
.hero-art svg { width: 150px; height: auto; filter: drop-shadow(0 0 24px rgba(212,175,55,.35)); }
.hero-eyebrow { color: var(--gold-soft); font-size: 12px; letter-spacing: .3em; margin-bottom: 14px; }
.hero-title {
  font-family: var(--serif); font-size: 34px; font-weight: 600;
  letter-spacing: .1em; line-height: 1.5; margin-bottom: 18px;
  background: linear-gradient(180deg, #f3ecd8 20%, var(--gold-soft) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-lead { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }
.hero-note { color: var(--text-dim); font-size: 11.5px; margin-top: 12px; }

/* ============ ボタン ============ */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--sans); font-weight: 600; text-align: center;
  border-radius: 999px; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, #c9a437, #e8c96a 55%, #c9a437);
  color: #221a06;
  box-shadow: 0 4px 22px rgba(212, 175, 55, 0.35);
}
.btn-lg { font-size: 16px; padding: 16px 40px; width: 100%; max-width: 340px; }
.btn-ghost {
  background: transparent; color: var(--gold-soft);
  border: 1px solid var(--line); font-size: 14px; padding: 12px 28px;
}
.btn-block { width: 100%; }

/* ============ 特徴・声 ============ */
.features { display: grid; gap: 14px; margin-bottom: 44px; }
.feature {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 18px;
}
.feature-icon { font-size: 22px; color: var(--gold-soft); margin-bottom: 6px; }
.feature h3 { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text-dim); }

.section-title {
  font-family: var(--serif); font-size: 18px; text-align: center;
  letter-spacing: .15em; margin-bottom: 18px; color: var(--gold-soft);
}
.voices { margin-bottom: 44px; }
.voice-card {
  background: var(--panel); border: 1px solid rgba(141,120,217,.25);
  border-radius: 14px; padding: 18px; margin-bottom: 12px;
}
.voice-card p { font-size: 13.5px; color: var(--text); }
.voice-meta { display: block; margin-top: 8px; font-size: 11.5px; color: var(--text-dim); }
.cta-block { text-align: center; padding-bottom: 24px; }

/* ============ フォーム ============ */
.form-progress {
  height: 4px; background: rgba(255,255,255,.08); border-radius: 2px;
  margin-bottom: 28px; overflow: hidden;
}
.form-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--gold-soft));
  border-radius: 2px; transition: width .35s ease;
}
.form-step { animation: fadein .35s ease; }
.form-step-label { font-size: 12px; color: var(--gold-soft); letter-spacing: .2em; margin-bottom: 8px; }
.form-question {
  font-family: var(--serif); font-size: 20px; line-height: 1.6;
  letter-spacing: .05em; margin-bottom: 22px;
}
.option-list { display: grid; gap: 10px; margin-bottom: 24px; }
.option-btn {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); font-family: var(--sans);
  font-size: 14.5px; text-align: left; padding: 15px 18px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option-btn:active, .option-btn.selected {
  border-color: var(--gold); background: rgba(212, 175, 55, 0.12);
}
.form-back {
  background: none; border: none; color: var(--text-dim);
  font-size: 13px; cursor: pointer; padding: 8px 0; font-family: var(--sans);
}
textarea.free-text {
  width: 100%; min-height: 150px; resize: vertical;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: var(--sans); font-size: 15px;
  padding: 14px 16px; line-height: 1.7; margin-bottom: 8px;
}
textarea.free-text:focus { outline: none; border-color: var(--gold); }
.free-text-note { font-size: 11.5px; color: var(--text-dim); margin-bottom: 20px; }

/* ============ シャッフル ============ */
.shuffle-wrap { text-align: center; padding: 40px 0 60px; }
.shuffle-text { font-family: var(--serif); font-size: 16px; letter-spacing: .1em; margin-bottom: 36px; min-height: 1.8em; }
.shuffle-hint { color: var(--gold-soft); font-size: 13px; margin-top: 28px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

.shuffle-deck { position: relative; height: 240px; }
.deck-card {
  position: absolute; left: 50%; top: 0;
  width: 120px; height: 200px; margin-left: -60px;
  border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 42%, rgba(212,175,55,.25) 0%, transparent 45%),
    repeating-linear-gradient(45deg, #1c1738 0 8px, #201b40 8px 16px);
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  transition: transform .5s cubic-bezier(.22,.8,.36,1);
  display: flex; align-items: center; justify-content: center;
}
.deck-card::after {
  content: "☾"; color: var(--gold-soft); font-size: 34px;
  text-shadow: 0 0 14px rgba(232,201,106,.6);
}
.deck-card.shuffling { animation: shuffleMove 0.9s ease-in-out infinite alternate; }
@keyframes shuffleMove {
  from { transform: translateX(calc(var(--sx) * -1)) rotate(calc(var(--r) * -1)); }
  to   { transform: translateX(var(--sx)) rotate(var(--r)); }
}

/* ============ 結果画面 ============ */
.result-wrap { padding-bottom: 24px; }
.result-card-art { display: flex; justify-content: center; margin: 8px 0 20px; }
.result-card-art svg {
  width: 190px; height: auto; border-radius: 12px;
  box-shadow: 0 0 40px rgba(212,175,55,.28), 0 10px 34px rgba(0,0,0,.6);
  animation: cardReveal .9s cubic-bezier(.22,.8,.36,1);
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px) rotateY(70deg); }
  to   { opacity: 1; transform: none; }
}
.result-card-name {
  text-align: center; font-family: var(--serif); font-size: 24px;
  letter-spacing: .18em; color: var(--gold-soft); margin-bottom: 4px;
}
.result-card-en { text-align: center; font-size: 11px; letter-spacing: .35em; color: var(--text-dim); margin-bottom: 24px; }

.result-section {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 18px; margin-bottom: 14px;
}
.result-section h3 {
  font-family: var(--serif); font-size: 15px; letter-spacing: .12em;
  color: var(--gold-soft); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.result-section p { font-size: 14px; }

/* 安全に関する警告（無料枠で必ず表示） */
.safety-warning {
  background: var(--danger-bg); border: 1px solid rgba(224,106,122,.5);
  border-radius: 14px; padding: 18px; margin-bottom: 14px;
}
.safety-warning h3 { color: var(--danger); font-size: 15px; margin-bottom: 8px; }
.safety-warning p { font-size: 13.5px; }
.safety-warning a { color: var(--danger); }

/* ロックされたセクション */
.locked-area { position: relative; margin-bottom: 14px; }
.locked-content { filter: blur(7px); pointer-events: none; user-select: none; }
.locked-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 20px;
  background: linear-gradient(180deg, rgba(11,8,23,.25), rgba(11,8,23,.82) 70%);
  border-radius: 14px;
}
.locked-overlay .lock-icon { font-size: 26px; color: var(--gold-soft); }
.locked-overlay p { font-family: var(--serif); font-size: 15px; letter-spacing: .05em; }
.locked-overlay .price-tag { font-size: 12.5px; color: var(--text-dim); font-family: var(--sans); }

.result-actions { display: grid; gap: 12px; margin-top: 22px; text-align: center; justify-items: center; }

/* シェアセクション */
.share-wrap { text-align: center; }
.share-wrap h3 { justify-content: center; }
.share-note { font-size: 12px !important; color: var(--text-dim) !important; margin-bottom: 14px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold-soft); font-family: var(--sans);
  font-size: 13px; font-weight: 600; padding: 10px 18px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.share-btn:active { transform: scale(.96); background: rgba(212, 175, 55, 0.18); }
.share-btn:disabled { opacity: .6; cursor: default; }
.share-hint { font-size: 11px !important; color: var(--text-dim) !important; margin-top: 12px; }

/* ============ 料金表 ============ */
.page-title {
  font-family: var(--serif); font-size: 24px; text-align: center;
  letter-spacing: .18em; color: var(--gold-soft); margin-bottom: 10px;
}
.page-lead { text-align: center; font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
#pricing-cards { display: grid; gap: 16px; }
.price-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 20px; position: relative;
}
.price-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(212,175,55,.18);
}
.price-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #c9a437, #e8c96a);
  color: #221a06; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 3px 14px; white-space: nowrap;
}
.price-plan-name { font-family: var(--serif); font-size: 17px; letter-spacing: .1em; color: var(--gold-soft); margin-bottom: 2px; }
.price-plan-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.price-regular {
  font-size: 12.5px; color: var(--text-dim);
  text-decoration: line-through; margin-bottom: 2px;
}
.price-amount { font-family: var(--serif); font-size: 32px; color: var(--text); }
.price-amount small { font-size: 13px; color: var(--text-dim); margin-left: 4px; }
.price-off {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  color: #221a06; background: linear-gradient(135deg, #c9a437, #e8c96a);
  border-radius: 999px; padding: 3px 10px;
}
.pay-summary .row.discount { color: var(--gold-soft); }
.price-features { list-style: none; margin: 14px 0 18px; }
.price-features li {
  font-size: 13px; padding: 6px 0 6px 22px; position: relative;
  border-bottom: 1px dashed rgba(255,255,255,.07);
}
.price-features li::before { content: "✦"; position: absolute; left: 2px; color: var(--gold-soft); font-size: 11px; }
.pricing-note { text-align: center; font-size: 11.5px; color: var(--text-dim); margin-top: 20px; }

/* ============ モーダル ============ */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 3, 12, 0.78); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  position: relative; width: 100%; max-width: 480px;
  max-height: 88dvh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 30px 24px 40px;
  animation: slideUp .35s cubic-bezier(.22,.8,.36,1);
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-dim);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.modal h2 { font-family: var(--serif); font-size: 19px; letter-spacing: .1em; color: var(--gold-soft); margin-bottom: 6px; }
.modal .modal-sub { font-size: 12.5px; color: var(--text-dim); margin-bottom: 20px; }
.modal label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.modal input[type="email"] {
  width: 100%; background: rgba(11,8,23,.6); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 16px;
  padding: 13px 14px; margin-bottom: 16px; font-family: var(--sans);
}
.modal input[type="email"]:focus { outline: none; border-color: var(--gold); }
.agree-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-dim); margin-bottom: 20px; }
.agree-row input { margin-top: 3px; }
.agree-row a { color: var(--gold-soft); }
.pay-summary {
  background: rgba(11,8,23,.5); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px; font-size: 13.5px;
}
.pay-summary .row { display: flex; justify-content: space-between; padding: 3px 0; }
.pay-summary .row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; color: var(--gold-soft); }
.stripe-note { font-size: 11.5px; color: var(--text-dim); text-align: center; margin-top: 12px; }
.demo-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  border: 1px dashed rgba(141,120,217,.5); font-size: 12px; color: var(--purple);
}
.demo-note button {
  margin-top: 8px; width: 100%;
  background: rgba(141,120,217,.15); border: 1px solid rgba(141,120,217,.5);
  color: var(--purple); border-radius: 8px; padding: 9px; font-size: 12.5px;
  cursor: pointer; font-family: var(--sans);
}

/* ============ フッター ============ */
.app-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 28px 20px 40px; text-align: center;
  max-width: 480px; margin: 0 auto;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 14px; }
.footer-links a { color: var(--text-dim); font-size: 11.5px; text-decoration: none; }
.footer-disclaimer { font-size: 10.5px; color: rgba(168,159,196,.7); margin-bottom: 12px; }
.footer-copy { font-size: 10.5px; color: rgba(168,159,196,.5); letter-spacing: .1em; }

@media (min-width: 600px) {
  .hero-title { font-size: 40px; }
  .modal-overlay { align-items: center; }
  .modal { border-radius: 22px; border-bottom: 1px solid var(--line); }
}
