:root {
  --bg: #fff8ef;
  --ink: #3b2f2a;
  --sub: #8a7a70;
  --card: #ffffff;
  --line: #f0e3d4;
  --accent: #ff8a5b;
  --c: #ff8a5b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
[hidden] { display: none !important; }

/* ---------- 画像(未設置なら絵文字で代用) ---------- */
.pic {
  position: relative;
  aspect-ratio: 1;
  border-radius: 28%;
  background: color-mix(in srgb, var(--c) 22%, white);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic .emo { display: none; font-size: 3em; line-height: 1; }
.pic.noimg img { display: none; }
.pic.noimg .emo { display: block; }
.pic-xs { width: 44px; font-size: 9px; }
.pic-sm { width: 72px; font-size: 14px; }
.pic-lg { width: min(260px, 70vw); font-size: 40px; margin: 8px auto 16px; border-radius: 32%; box-shadow: 0 12px 32px color-mix(in srgb, var(--c) 35%, transparent); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.05); }
.btn-main { background: var(--accent); color: #fff; min-width: 240px; box-shadow: 0 6px 0 #e06a3d; }
.btn-text { background: none; border: 0; color: var(--sub); font: inherit; cursor: pointer; margin-top: 16px; }

/* ---------- トップ ---------- */
.screen { text-align: center; min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border-radius: 999px; background: #ffe6d6; color: #c8572d; font-size: 13px; font-weight: 700; }
.logo { font-size: clamp(32px, 9vw, 44px); font-weight: 800; margin: 0; letter-spacing: .02em; line-height: 1.3; }
.logo-sm { font-size: 28px; text-align: center; margin-bottom: 24px; }
.lead { color: var(--sub); margin: 8px 0 24px; }
.parade { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.note { color: var(--sub); font-size: 13px; }

/* ---------- 質問 ---------- */
.progress { width: 100%; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }
.count { color: var(--sub); font-weight: 700; margin: 24px 0 4px; }
.qtext { font-size: 24px; margin: 0 0 28px; line-height: 1.5; }
.choices { display: grid; gap: 14px; width: 100%; }
.choice {
  width: 100%; padding: 20px 16px; border-radius: 20px;
  background: var(--card); border: 2px solid var(--line);
  font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.choice:hover { border-color: var(--accent); background: #fff3ec; }
.choice:active { transform: scale(.98); }
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 結果 ---------- */
.hero { text-align: center; padding-top: 8px; }
.you { margin: 0; color: var(--sub); font-weight: 700; }
.type-title { margin: 0; font-weight: 800; color: var(--c); font-size: 18px; }
.type-name { margin: 0; font-size: 44px; line-height: 1.3; }
.type-name small { font-size: 20px; margin-left: 4px; }
.catch { font-weight: 700; margin: 8px 0 20px; }
.axes { display: grid; gap: 8px; background: var(--card); border-radius: 20px; padding: 16px; }
.axis { display: grid; grid-template-columns: 4.5em 1fr 4.5em; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); }
.axis span.on { color: var(--ink); font-weight: 800; }
.track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: var(--p); background: var(--c); border-radius: 999px; }

.share { text-align: center; margin: 28px 0; }
.share-label { font-weight: 800; margin: 0 0 10px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btns .btn { padding: 12px 18px; font-size: 14px; }
.btn-x { background: #111; color: #fff; }
.btn-line { background: #06c755; color: #fff; }
.btn-copy { background: var(--card); color: var(--ink); border: 2px solid var(--line); }

.card { background: var(--card); border-radius: 24px; padding: 20px; margin: 16px 0; }
.h2 { font-size: 20px; margin: 0 0 12px; }
.h3 { font-size: 15px; margin: 12px 0 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list { margin: 0; padding-left: 1.2em; }
.list.good li::marker { content: "◎ "; color: #3aa76d; }
.list.bad li::marker { content: "△ "; color: #d7894a; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px; border-radius: 18px; background: var(--bg); text-decoration: none; font-size: 13px; line-height: 1.4; }
.match-item strong { font-size: 17px; }
.match-item span:last-child { color: var(--sub); }
.badge { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; color: #fff; }
.badge-best { background: #ff7aa2; }
.badge-rival { background: #6c8ed9; }

.pic-md { width: 96px; font-size: 18px; flex: none; }
.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--c) 15%, white); border: 1.5px solid color-mix(in srgb, var(--c) 40%, white); }
.best { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: #fff0f4; text-decoration: none; }
.best.rival { background: #eef2fb; }
.best p { margin: 0; line-height: 1.6; }
.best-name { margin-top: 4px !important; font-size: 13px; color: var(--sub); }
.best-name strong { font-size: 18px; color: var(--ink); margin-right: 4px; }
.best-reason { font-size: 14px; }
.card .h3 { margin-top: 20px; margin-bottom: 8px; }

.cta { text-align: center; margin: 32px 0; }

/* ---------- 一覧 ---------- */
.section { margin-top: 40px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini { display: flex; flex-direction: column; align-items: center; text-decoration: none; text-align: center; line-height: 1.3; padding: 6px 2px; border-radius: 14px; }
.mini .pic { width: 100%; max-width: 80px; }
.mini.is-current { background: #ffe6d6; }
.mini-name { font-weight: 800; font-size: 13px; margin-top: 4px; }
.mini-title { font-size: 10px; color: var(--sub); }
.rows { display: grid; gap: 12px; }
.row { display: flex; gap: 14px; align-items: center; background: var(--card); padding: 14px; border-radius: 20px; text-decoration: none; }
.row .pic { flex: none; }
.row p { margin: 0; line-height: 1.5; }
.row-title { font-size: 12px; color: var(--c); font-weight: 800; }
.row-name { font-size: 18px; font-weight: 800; }
.row-catch { font-size: 13px; color: var(--sub); }

.footer { text-align: center; color: var(--sub); font-size: 13px; padding: 24px 16px 40px; }
.footer p { margin: 4px 0 0; }

@media (max-width: 340px) {
  .two, .match { grid-template-columns: 1fr; }
  .grid { gap: 6px; }
}

/* ---------- 文書ページ ---------- */
.doc .h2 { font-size: 17px; margin-top: 24px; }
.doc .h2:first-child { margin-top: 0; }
.doc p { font-size: 14px; }

/* ---------- おすすめアイテム ---------- */
.pr { font-size: 11px; font-weight: 700; color: var(--sub); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; vertical-align: middle; }
.items { display: grid; gap: 10px; }
.item { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--bg); text-decoration: none; line-height: 1.6; border: 1.5px solid transparent; transition: border-color .15s; }
.item:hover { border-color: var(--c); }
.item strong { font-size: 16px; }
.item span { font-size: 13px; color: var(--sub); }
.item em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--c); justify-self: end; }
