/* こどもタイプ診断 共通スタイル */
:root {
  --bg: #f6f1ea;
  --paper: #fffdf9;
  --ink: #3d3530;
  --sub: #8a7f77;
  --faint: #c3b8ad;
  --line: #ece3d9;
  --coral: #f08a74;
  --coral-dark: #d96a53;
  --coral-soft: #fde3dc;
  --mint: #4fa894;
  --mint-soft: #dcf1ec;
  --lav: #8f7fd1;
  --lav-soft: #ebe6f8;
  --gold: #d99a2b;
  --gold-soft: #fbefd6;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(61, 53, 48, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.75;
  /* 文節の途中で改行しない。切れ目は <wbr> で入れる */
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
a { color: var(--coral-dark); }
img { max-width: 100%; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー・フッター */
.site-head { padding: 14px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 900; font-size: 15px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.brand-mark { font-size: 20px; }
.head-link { font-size: 13px; color: var(--sub); text-decoration: none; font-weight: 700; }
.site-foot { margin-top: 48px; padding: 28px 0 40px; border-top: 2px solid var(--line); font-size: 12px; color: var(--sub); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.site-foot a { color: var(--sub); }

/* 共通パーツ */
.btn {
  display: block; width: 100%; border: 0; border-radius: 16px; padding: 15px 16px;
  font: inherit; font-weight: 900; font-size: 16px; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.35; cursor: default; transform: none; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 16px rgba(240, 138, 116, 0.35); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); border: 2px solid var(--line); }
.btn-small { padding: 10px 12px; font-size: 14px; border-radius: 12px; }

.card { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.sec-title { font-size: 18px; font-weight: 900; margin: 36px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title .ico { font-size: 22px; }
.lead { font-size: 14px; color: var(--sub); margin: -4px 0 14px; }
.note { font-size: 11.5px; color: var(--sub); line-height: 1.8; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 12px; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 8px 0 8px 26px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.list li:last-child { border-bottom: 0; }
.list li::before { content: "●"; position: absolute; left: 4px; top: 8px; font-size: 10px; color: var(--coral); }
.list.check li::before { content: "✓"; font-size: 14px; top: 7px; color: var(--mint); font-weight: 900; }
.list.star li::before { content: "★"; font-size: 13px; top: 8px; color: var(--gold); }

/* トップ */
.hero-top { text-align: center; padding: 28px 0 8px; }
.hero-top .kicker { font-size: 13px; font-weight: 700; color: var(--coral-dark); }
.hero-top h1 { font-size: 30px; font-weight: 900; line-height: 1.45; margin: 8px 0 10px; }
.hero-top p { font-size: 15px; margin: 0 0 20px; }
.hero-emojis { font-size: 30px; letter-spacing: 6px; margin: 4px 0 14px; }
.badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.badges span { font-size: 12px; font-weight: 700; background: var(--paper); border-radius: 999px; padding: 4px 12px; color: var(--sub); }
.know { display: grid; gap: 10px; }
.know .card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.know .num { font-size: 26px; line-height: 1; }
.know h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 900; }
.know p { margin: 0; font-size: 13.5px; color: var(--sub); }
.axes-intro { display: grid; gap: 8px; }
.axes-intro .card { padding: 12px 16px; font-size: 14px; }
.axes-intro b { font-weight: 900; }

/* タイプ一覧 */
.group-block { margin-bottom: 18px; }
.group-head { font-weight: 900; font-size: 15px; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.group-head small { font-weight: 500; font-size: 12px; color: var(--sub); }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.type-tile { display: block; text-decoration: none; color: var(--ink); border-radius: 16px; padding: 14px 10px; text-align: center; transition: transform 0.15s; }
.type-tile:hover { transform: translateY(-2px); }
.type-tile .emo { font-size: 34px; line-height: 1.2; }
.type-tile .nm { font-weight: 900; font-size: 14.5px; margin-top: 4px; }
.type-tile .ct { font-size: 11.5px; color: #5d534c; line-height: 1.6; margin-top: 2px; }

/* 質問画面 */
.quiz-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--sub); margin-top: 6px; }
.progress { height: 10px; background: var(--line); border-radius: 999px; margin: 8px 0 18px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--coral)); border-radius: 999px; transition: width 0.3s; }
.q-card { background: var(--paper); border-radius: 24px; padding: 22px 18px 20px; box-shadow: var(--shadow); }
.q-hint { font-size: 12px; color: var(--sub); background: var(--bg); border-radius: 10px; padding: 5px 10px; display: inline-block; }
.q-text { font-size: 20px; font-weight: 900; line-height: 1.65; margin: 16px 0 24px; min-height: 100px; }
.q-ends { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.q-ends .l { color: var(--mint); }
.q-ends .r { color: var(--coral-dark); }
.lever2 { position: relative; height: 56px; margin: 8px 4px 0; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.lever2 .track {
  position: absolute; left: 0; right: 0; top: 50%; height: 16px; transform: translateY(-50%); border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), #efe7dd 50%, var(--coral));
}
.lever2 .thumb {
  position: absolute; top: 50%; width: 42px; height: 42px; margin-left: -21px; transform: translateY(-50%);
  border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); transition: left 0.12s;
}
.lever2 .hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 11.5px; font-weight: 700; color: var(--sub); background: rgba(255, 255, 255, 0.92); border-radius: 999px; padding: 2px 10px; pointer-events: none;
}
.lever2.untouched .thumb { display: none; }
.lever2:not(.untouched) .hint { display: none; }
.lever2:focus-visible .track { box-shadow: 0 0 0 4px rgba(240, 138, 116, 0.35); }
.ticks { position: relative; height: 32px; margin: 2px 4px 0; }
.ticks button {
  position: absolute; top: 0; transform: translateX(-50%); border: 0; background: none; font: inherit; font-size: 12px;
  color: var(--sub); width: 26px; height: 28px; border-radius: 8px; cursor: pointer; padding: 0;
}
.ticks button.on { background: var(--ink); color: #fff; font-weight: 900; }
.q-picked { text-align: center; font-size: 14px; font-weight: 900; min-height: 24px; margin-top: 6px; }
.q-picked.wait { color: var(--faint); font-weight: 700; }
.q-nav { display: flex; gap: 10px; margin-top: 22px; }
.q-nav .btn { flex: 1; }
.q-nav .btn-back { flex: 0 0 34%; }

.setup h2 { font-size: 20px; font-weight: 900; margin: 6px 0 4px; }
.field { margin-top: 18px; }
.field label { display: block; font-weight: 900; font-size: 14px; margin-bottom: 8px; }
.field .opt { font-weight: 500; font-size: 12px; color: var(--sub); }
.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grades button {
  border: 2px solid var(--line); background: var(--paper); border-radius: 12px; padding: 11px 0;
  font: inherit; font-weight: 900; font-size: 15px; cursor: pointer; color: var(--ink);
}
.grades button.on { border-color: var(--coral); background: var(--coral-soft); }
.text-input {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; background: #fff;
}
.text-input:focus { outline: none; border-color: var(--coral); }

/* 結果画面 */
.r-hero { text-align: center; border-radius: 26px; padding: 26px 16px 22px; margin-top: 6px; }
.r-hero .who { font-size: 14px; font-weight: 700; color: var(--sub); }
.r-hero .emo { font-size: 72px; line-height: 1.15; margin: 6px 0; }
.r-hero h1 { font-size: 27px; font-weight: 900; margin: 0; line-height: 1.4; }
.r-hero h1 small { font-size: 16px; }
.r-hero .catch { font-size: 14.5px; margin-top: 8px; line-height: 1.75; }
.r-hero .chip { margin-top: 10px; color: #fff; }
.r-summary { font-size: 15px; margin: 18px 2px 0; }
.warn { background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; margin-top: 14px; }

.axis { margin-bottom: 16px; }
.axis .lab { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.axis .lab .on { color: var(--ink); }
.axis .lab .off { color: var(--faint); }
.bar { height: 14px; background: var(--line); border-radius: 999px; position: relative; overflow: hidden; }
.bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.bar .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, 0.9); }
.pct { font-size: 12.5px; color: var(--sub); margin-top: 4px; }
.pct b { color: var(--ink); font-weight: 900; }
.gap-note { font-size: 13px; background: var(--lav-soft); border-radius: 12px; padding: 9px 12px; margin-top: 8px; }

details.facets { margin-top: 6px; }
details.facets summary { cursor: pointer; font-size: 13.5px; font-weight: 900; color: var(--coral-dark); padding: 6px 0; list-style: none; }
details.facets summary::-webkit-details-marker { display: none; }
details.facets summary::after { content: " ＋"; }
details.facets[open] summary::after { content: " −"; }
.facet { margin: 10px 0; }
.facet .fl { font-size: 12px; font-weight: 900; margin-bottom: 3px; }
.facet .lab { display: flex; justify-content: space-between; font-size: 11px; color: var(--sub); margin-bottom: 3px; }
.facet .bar { height: 9px; }

.aruaru { display: grid; gap: 8px; }
.aruaru div { background: var(--paper); border-radius: 14px; padding: 11px 14px 11px 40px; position: relative; font-size: 14.5px; box-shadow: var(--shadow); }
.aruaru div::before { content: "💬"; position: absolute; left: 12px; top: 10px; }

.box-label { font-size: 12.5px; font-weight: 900; color: var(--sub); margin: 14px 0 4px; }
.box-label:first-child { margin-top: 0; }
.words { display: grid; gap: 10px; }
.word { background: var(--paper); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; }
.word .ng { color: var(--sub); text-decoration: line-through; text-decoration-color: rgba(217, 106, 83, 0.6); }
.word .ok { font-weight: 900; margin-top: 4px; }
.word .ok::before { content: "→ "; color: var(--mint); }

.style-row { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.style-row.best { border-color: var(--coral); background: #fff8f5; }
.style-row .mark { font-size: 22px; font-weight: 900; min-width: 28px; text-align: center; line-height: 1.4; }
.style-row .mk-best { color: var(--coral); }
.style-row .mk-good { color: var(--mint); }
.style-row .mk-low { color: var(--faint); }
.style-row .t { font-weight: 900; font-size: 15px; }
.style-row .d { font-size: 13.5px; }
.tip { font-size: 13.5px; background: var(--mint-soft); border-radius: 14px; padding: 11px 14px; margin-top: 10px; }

.services { margin-top: 14px; }
.services .pr-note { font-size: 11.5px; color: var(--sub); margin-bottom: 8px; }
.svc { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.svc .nm { font-weight: 900; font-size: 14px; }
.svc .go { flex-shrink: 0; background: var(--coral); color: #fff; font-weight: 900; font-size: 12.5px; border-radius: 10px; padding: 7px 10px; }
.svc .pr { font-size: 10px; font-weight: 900; color: var(--coral-dark); border: 1px solid var(--coral); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.svc.placeholder { opacity: 0.55; box-shadow: none; border: 2px dashed var(--line); }
.svc.placeholder .go { background: var(--faint); }

.mama { background: linear-gradient(160deg, var(--coral-soft), var(--lav-soft)); border-radius: var(--radius); padding: 18px; font-size: 15px; }
.mama .from { font-size: 12.5px; font-weight: 900; color: var(--coral-dark); margin-bottom: 4px; }

.share { text-align: center; }
.share canvas { width: 100%; max-width: 320px; border-radius: 16px; box-shadow: var(--shadow); display: block; margin: 0 auto 12px; background: #fff; }
.share-opts { font-size: 13px; margin: 6px 0 12px; }
.share-btns { display: grid; gap: 8px; }
.copied { font-size: 12.5px; color: var(--mint); min-height: 18px; margin-top: 6px; font-weight: 700; }

.again { display: grid; gap: 8px; margin-top: 28px; }

@media (min-width: 640px) {
  .hero-top h1 { font-size: 34px; }
  .type-grid { grid-template-columns: repeat(4, 1fr); }
}
