:root {
  --bg: #fdf5fb;
  --surface: #ffffff;
  --text: #3a2e42;
  --text-muted: #8a7a94;
  --accent: #b06fd9;
  --accent2: #ff8fb0;
  --border: #f0dcf5;
  --key-bg: #f6ecfa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #221c2a;
    --surface: #2c2436;
    --text: #f2ecf6;
    --text-muted: #c2adcf;
    --border: #443a52;
    --key-bg: #362c42;
  }
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}
.hidden { display: none !important; }

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 18px 60px;
}
.screen { text-align: center; }

.kicker {
  display: inline-block;
  background: rgba(176,111,217,.12);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.title {
  font-size: 2.3rem;
  margin: 0 0 14px;
}
.title-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.8;
  margin: 0 0 22px;
}
.type-preview {
  font-size: 2rem;
  letter-spacing: 6px;
  margin-bottom: 26px;
}
.btn-primary, .btn-secondary {
  border: none;
  border-radius: 999px;
  padding: 15px 26px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(176,111,217,.35);
}
.btn-primary:active { transform: scale(.97); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  margin-top: 24px;
  width: 100%;
}
.disclaimer {
  margin-top: 18px;
  font-size: .72rem;
  color: var(--text-muted);
}

/* --- 質問画面 --- */
.progress-bar {
  height: 8px;
  background: var(--key-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width .3s ease;
}
.progress-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 26px;
}
.question-text {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 28px;
  min-height: 4.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.likert-wrap { margin-top: 8px; }
.likert-labels {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 2px;
}
.likert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.likert-dot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 42px;
  border-radius: 50%;
  border: 2px solid var(--axis-color, var(--accent));
  background: var(--surface);
  cursor: pointer;
}
.likert-dot:nth-child(1), .likert-dot:nth-child(7) { max-width: 40px; }
.likert-dot:nth-child(4) { max-width: 28px; border-color: var(--border); }
.likert-dot:active { background: var(--axis-color, var(--accent)); }

/* --- 結果画面 --- */
.result-icon {
  font-size: 4rem;
  margin: 4px 0 8px;
}
.result-name { font-size: 1.7rem; margin: 0 0 2px; }
.result-code {
  color: var(--accent);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .1em;
  margin: 0 0 20px;
}
.trait-row { margin-bottom: 14px; }
.trait-row:last-child { margin-bottom: 0; }
.trait-label { font-size: .8rem; font-weight: 700; margin-bottom: 5px; }
.trait-track {
  position: relative;
  height: 8px;
  background: var(--key-bg);
  border-radius: 999px;
  overflow: hidden;
}
.trait-fill { position: absolute; top: 0; height: 100%; border-radius: 999px; }
.trait-ends {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.result-intro {
  font-size: .92rem;
  line-height: 1.9;
  color: var(--text-muted);
  margin: 0 0 24px;
  text-align: left;
}
.result-block {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.result-block h3 { margin: 0 0 10px; font-size: .95rem; }
.result-block p { margin: 0; font-size: .88rem; line-height: 1.8; color: var(--text-muted); }
.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.7;
  font-size: .85rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strengths-list li::before { content: "✅ "; }
.weaknesses-list li::before { content: "💭 "; }
p.result-compat {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.compat-icon { font-size: 1.5rem; }

.recommend-card {
  text-align: left;
  background: linear-gradient(160deg, rgba(176,111,217,.1), rgba(255,143,176,.08));
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin: 18px 0;
}
.recommend-heading {
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.recommend-text {
  font-size: .85rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border-radius: 12px;
  padding: 6px;
  text-decoration: none;
  color: var(--text);
}
.shop-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: var(--key-bg);
}
.shop-card-title {
  font-size: .68rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-badge {
  background: var(--text-muted);
  color: var(--bg);
  font-size: .65rem;
  padding: 1px 6px;
  border-radius: 4px;
}

/* --- シェア --- */
.share-block { margin-top: 22px; }
.share-label { font-size: .78rem; color: var(--text-muted); margin: 0 0 10px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(58,46,66,.15);
}
.share-btn:active { transform: scale(.94); }
.share-x { background: #000; }
.share-line { background: #06c755; font-size: .56rem; }
.share-fb { background: #1877f2; font-size: 1.15rem; }
.share-threads { background: #000; font-size: 1.15rem; }
.share-instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  font-size: .7rem;
}
.share-copy { background: var(--text-muted); font-size: 1.05rem; }
.toast {
  margin: 14px auto 0;
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .8rem;
}

/* --- PR/クロスリンク --- */
.ad-slot {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
  margin: 26px 0 16px;
  overflow: hidden;
}
.cross-game-nav {
  text-align: center;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.cross-game-label { font-size: .78rem; color: var(--text-muted); margin: 0 0 8px; }
.cross-game-link {
  display: inline-block;
  background: var(--key-bg);
  color: var(--text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
}
.extra-offer {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}
.extra-offer-title { font-size: .85rem; font-weight: 700; margin: 6px 0 12px; color: var(--text); }
.extra-offer-banner { display: block; margin: 0 auto; max-width: 180px; width: 100%; height: auto; border-radius: 8px; }
.pr-note { font-size: .72rem; color: var(--text-muted); margin-top: 10px; }
