/* =====================================================================
 * 心の相談方法診断 Ver.1 — style.css
 * 色・角丸・余白は :root の変数で一元管理しています
 * ===================================================================== */
:root {
  --pink: #F4DDE5;      /* 淡いピンク */
  --beige: #FAEDE5;     /* ベージュ */
  --white: #FFFFFF;
  --rose: #B77C91;      /* くすみローズ（アクセント） */
  --rose-dark: #9E6479; /* ホバー用 */
  --text: #645B60;      /* 文字色 */
  --text-light: #8E8489;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 6px 24px rgba(183, 124, 145, 0.12);
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--pink) 0%, var(--beige) 45%, var(--beige) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.8;
  font-size: 16px;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

/* ---------- 共通 ---------- */
.screen.is-entering { animation: fadeUp .45s ease both; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card p { margin: 0 0 .6em; }
.card p:last-child { margin-bottom: 0; }

.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--rose); color: var(--white); box-shadow: 0 6px 16px rgba(183,124,145,.35); }
.btn--primary:hover { background: var(--rose-dark); }
.btn--large { min-height: 56px; font-size: 17px; }
.btn--ghost {
  background: transparent;
  color: var(--rose);
  border: 2px solid var(--rose);
  margin-top: 8px;
}
.btn--ghost:hover { background: rgba(255,255,255,.6); }

.note { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 12px; }

/* ---------- スタート画面 ---------- */
.card--hero { text-align: center; padding: 36px 22px 28px; }
.badge {
  display: inline-block;
  background: var(--pink);
  color: var(--rose);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 16px !important;
}
.hero-title { font-size: 26px; line-height: 1.5; margin: 0 0 16px; color: var(--rose); }
.hero-title__sub { display: block; font-size: 16px; color: var(--text); margin-bottom: 8px; font-weight: 500; }
.hero-copy { font-size: 15px; margin-bottom: 20px !important; }
.meta {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 0 0 24px;
  font-size: 14px;
}
.meta li { background: var(--beige); padding: 6px 14px; border-radius: 999px; }

/* ---------- 質問画面 ---------- */
.progress-head { display: flex; justify-content: flex-end; font-size: 14px; margin-bottom: 6px; }
.progress-count { font-weight: 700; color: var(--rose); }
.progress {
  height: 10px;
  background: var(--white);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--rose);
  border-radius: 999px;
  transition: width .4s ease;
}

.card--question { padding: 28px 18px; }
.card--question.slide-next { animation: slideInRight .35s ease both; }
.card--question.slide-prev { animation: slideInLeft .35s ease both; }
.q-number { font-size: 14px; font-weight: 700; color: var(--rose); margin-bottom: 4px !important; }
.q-text { font-size: 20px; line-height: 1.6; margin: 0 0 20px; }

.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--beige);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .choice:hover { border-color: var(--pink); } } /* スマホでホバーが残らないように */
.choice:active { transform: scale(.98); }
.choice__key {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  color: var(--rose);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.choice.is-selected { background: var(--pink); border-color: var(--rose); font-weight: 700; }
.choice.is-selected .choice__key { background: var(--rose); color: var(--white); }

/* ---------- 結果画面 ---------- */
.card--result-head { text-align: center; padding: 32px 22px; }
.result-label { font-size: 14px; color: var(--text-light); }
.result-emoji { font-size: 44px; line-height: 1.2; margin: 4px 0 !important; }
.result-name { font-size: 23px; line-height: 1.5; color: var(--rose); margin: 0 0 16px; }
.result-desc { text-align: left; font-size: 15px; background: var(--beige); border-radius: var(--radius-sm); padding: 16px; }

.section-title { font-size: 17px; margin: 0 0 12px; }
.sub-title { font-size: 14px; color: var(--rose); margin: 16px 0 4px; }
.method-title { font-weight: 700; font-size: 16px; background: var(--pink); border-radius: var(--radius-sm); padding: 12px 14px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 6px; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--rose); font-weight: 700; }

.card--message { background: var(--pink); }
.message { font-weight: 500; }

.pr-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  border: 1px solid var(--text-light);
  border-radius: 4px;
  padding: 0 6px;
  line-height: 1.6;
  margin: 0 0 8px !important;
}

.cta-block { margin: 8px 0 20px; text-align: center; }
.cta-group { display: flex; flex-direction: column; gap: 10px; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--rose);
  transition: background .2s, transform .1s;
}
.cta:active { transform: scale(.98); }
.cta--primary { background: var(--rose); color: var(--white); box-shadow: 0 6px 16px rgba(183,124,145,.3); }
.cta--primary:hover { background: var(--rose-dark); }
.cta--secondary { background: var(--white); color: var(--rose); }
/* リンク未設定（準備中）の状態 */
.cta.is-disabled {
  background: #EDE7EA;
  color: #A79DA2;
  border-color: #E0D8DC;
  box-shadow: none;
  cursor: not-allowed;
}

.services { display: grid; gap: 14px; }
.service-card {
  border: 2px solid var(--pink);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--white);
}
.service-card.is-main { border-color: var(--rose); }
.service-card__tag { font-size: 12px; color: var(--rose); font-weight: 700; margin-bottom: 0 !important; }
.service-card__name { font-size: 20px; margin: 0 0 6px; }
.service-card__desc { font-size: 14px; margin-bottom: 12px !important; }

/* ---------- 広告枠（A8.netコードはタグを改変せず、外側の枠と文字色だけ整える） ---------- */
.ad-slot {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
}
.ad-slot--live { background: var(--beige); }
.ad-slot__label { font-size: 12px; color: var(--text-light); margin: 0 0 4px !important; }
.ad-slot__code a { color: var(--rose); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.ad-slot__code a:hover { color: var(--rose-dark); }
.ad-slot__code img { display: block; width: 1px; height: 1px; margin: 0 auto; } /* 計測用画像（表示上は目立たない） */
/* 広告OFF時 */
.ad-slot--disabled { background: #EDE7EA; color: #A79DA2; font-weight: 700; }
/* localhost確認用ダミー */
.ad-slot--dummy { border: 2px dashed var(--rose); color: var(--rose); font-size: 13px; }

.support {
  margin-top: 24px;
  font-size: 13px;
  background: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.support p { margin: 0 0 6px; }
.support a { color: var(--rose); word-break: break-all; }

.debug { font-size: 11px; font-family: monospace; background: #fff; padding: 8px; border-radius: 8px; word-break: break-all; }

.footer { text-align: center; font-size: 12px; color: var(--text-light); padding: 8px 16px 32px; }
.footer p { margin: 0 0 4px; }
.footer__copy { margin-top: 8px !important; }

/* ---------- アニメーション ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- タブレット・PC ---------- */
@media (min-width: 768px) {
  .app { padding-top: 48px; }
  .card { padding: 32px 32px; }
  .hero-title { font-size: 30px; }
  .q-text { font-size: 22px; }
  .services { grid-template-columns: 1fr 1fr; }
  .services:has(.service-card:only-child) { grid-template-columns: 1fr; }
  .cta-group { flex-direction: row; justify-content: center; }
  .cta-group .cta { flex: 1; max-width: 320px; }
}
