/* ==========================================================================
   投資家適性テスト
   通常時は落ち着いた診断サイト風。誘導質問（.question.hl）だけ意図的に過剰装飾する。
   ========================================================================== */

:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #667085;
  --line: #e2ddd2;
  --agree: #2f6fde;
  --agree-soft: #e4edfc;
  --disagree: #d9622b;
  --disagree-soft: #fbe9e0;
  --neutral: #98a2b3;
  --gold: #d4a017;
  --gold-bright: #ffd84a;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 8px 24px rgba(29, 36, 51, .06);
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font-family: inherit; }

.site-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}
.site-name { font-weight: 700; letter-spacing: .12em; font-size: 14px; }

.container { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }

/* 免責事項（ジョークである旨は書かない。真面目な診断サイトの体裁を保つ） */
.site-footer {
  padding: 8px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
}

.eyebrow {
  color: var(--agree);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible, .dot:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-primary { background: var(--agree); color: #fff; }
.btn-primary:hover { background: #255ec4; }
.btn-primary:disabled { background: #c4cad6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(29, 36, 51, .05); }
.btn-large { padding: 16px 40px; font-size: 17px; min-width: 240px; }

/* ---------------------------------------------------------------- illustration slot */

.illust {
  width: min(320px, 80%);
  aspect-ratio: 1 / 1;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.illust img { width: 100%; height: 100%; object-fit: contain; display: block; }
.illust.noimg {
  border: 2px dashed var(--line);
  background: repeating-linear-gradient(45deg, rgba(29, 36, 51, .03) 0 12px, transparent 12px 24px);
}
.illust-ph {
  padding: 16px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- title screen */

.hero { text-align: center; padding: 32px 0 8px; }
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 8vw, 48px);
  letter-spacing: .08em;
  margin: 8px 0 16px;
  line-height: 1.3;
}
.hero-lead { color: var(--muted); max-width: 30em; margin: 0 auto 24px; }
.nb { display: inline-block; } /* 句の途中で折り返さない */
.hero-facts {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 32px;
  flex-wrap: wrap;
}
.hero-facts li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 96px;
}
.hero-facts strong { font-size: 24px; margin-right: 2px; }
.hero-facts span { font-size: 13px; color: var(--muted); }

/* タイプ分類の説明（トップページ） */
.type-guide { margin-top: 40px; padding: 24px 16px; }
.type-guide-title { font-size: 18px; text-align: center; letter-spacing: .04em; margin-bottom: 10px; }
.type-guide-lead { font-size: 14px; color: var(--muted); max-width: 36em; margin: 0 auto 16px; }
.type-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.type-table thead th { font-size: 12.5px; letter-spacing: .08em; padding: 8px 6px; border-bottom: 2px solid var(--line); color: var(--muted); }
.type-table thead .th-investor { color: var(--agree); }
.type-table thead .th-human { color: var(--disagree); }
.type-table tbody th, .type-table tbody td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: center; }
.type-table tbody tr:last-child th, .type-table tbody tr:last-child td { border-bottom: none; }
.type-axis { width: 38%; text-align: left !important; font-weight: 400; }
.type-axis-name { display: block; font-weight: 700; font-size: 15px; }
.type-axis-desc { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.type-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 32px; margin-right: 6px;
  border: 2px solid currentColor; border-radius: 6px;
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace; font-weight: 800; font-size: 17px;
}
.td-investor .type-letter { color: var(--agree); }
.td-human .type-letter { color: var(--disagree); }
.type-word { font-weight: 700; }
.type-en { display: block; font-size: 11.5px; color: var(--muted); }

/* デバッグメニュー（?debug-z=1 のときだけ出る。見た目は最低限） */
.debug-panel { margin-top: 40px; padding: 16px; border: 2px dashed var(--danger); border-radius: 12px; text-align: left; background: #fff; }
.debug-panel h2 { font-size: 14px; color: var(--danger); margin-bottom: 4px; }
.debug-status { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.debug-panel h3 { font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: .08em; }
.debug-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.debug-btn { font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #faf8f3; color: var(--ink); cursor: pointer; }
.debug-btn:hover { background: var(--agree-soft); border-color: var(--agree); }

/* ---------------------------------------------------------------- trait screen */

.trait-card { text-align: center; }
.trait-heading { font-size: 16px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.trait-name {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 700;
  line-height: 1.4;
  margin: 12px 0 4px;
}
.trait-reason { text-align: left; max-width: 34em; margin: 0 auto 24px; }
.guide-box {
  text-align: left;
  background: var(--agree-soft);
  border-left: 4px solid var(--agree);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 auto 28px;
  max-width: 36em;
}
.guide-box p { white-space: pre-line; } /* 文面中の \n を改行として表示する */
.guide-box h3 { font-size: 14px; letter-spacing: .1em; color: var(--agree); margin-bottom: 6px; }

/* ---------------------------------------------------------------- quiz */

.progress-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 10px 0 12px;
}
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.progress-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--agree); border-radius: 99px; transition: width .3s ease; }

.quiz-list { display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }

.question {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.q-body { position: relative; z-index: 2; padding: 28px 16px 24px; }
.q-text { font-size: 18px; font-weight: 700; text-align: center; line-height: 1.7; margin-bottom: 24px; text-wrap: balance; word-break: auto-phrase; }
.q-no {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 4px;
}

.scale-wrap { position: relative; max-width: 440px; margin: 0 auto; }
.scale { display: flex; align-items: center; justify-content: space-between; }
.scale-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-weight: 700; }
.lbl-agree { color: var(--agree); }
.lbl-disagree { color: var(--disagree); }

.dot {
  appearance: none;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid var(--neutral);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.dot.size-3 { width: 48px; height: 48px; }
.dot.size-2 { width: 41px; height: 41px; }
.dot.size-1 { width: 35px; height: 35px; }
.dot.size-0 { width: 29px; height: 29px; }
.dot.side-agree { border-color: var(--agree); }
.dot.side-disagree { border-color: var(--disagree); }
.dot:hover { transform: scale(1.08); }
.dot.side-agree:hover { background: var(--agree-soft); }
.dot.side-disagree:hover { background: var(--disagree-soft); }
.dot.side-neutral:hover { background: #eef0f3; }
.dot.selected.side-agree { background: var(--agree); }
.dot.selected.side-disagree { background: var(--disagree); }
.dot.selected.side-neutral { background: var(--neutral); }

@media (max-width: 420px) {
  .dot.size-3 { width: 42px; height: 42px; }
  .dot.size-2 { width: 36px; height: 36px; }
  .dot.size-1 { width: 31px; height: 31px; }
  .dot.size-0 { width: 26px; height: 26px; }
  .q-text { font-size: 17px; }
}

.quiz-nav { text-align: center; margin-top: 28px; }

/* ==========================================================================
   誘導質問の過剰装飾（ここだけ意図的にやりすぎている）
   ========================================================================== */

.question.hl {
  border: 4px solid var(--gold);
  background: #fffbea;
  animation: hl-glow 1.1s ease-in-out infinite alternate;
  margin: 8px 0;
}
@keyframes hl-glow {
  from { box-shadow: 0 0 0 0 rgba(255, 216, 74, .0), 0 0 18px 2px rgba(212, 160, 23, .45); border-color: var(--gold); }
  to   { box-shadow: 0 0 0 6px rgba(255, 216, 74, .45), 0 0 46px 12px rgba(255, 196, 0, .75); border-color: var(--gold-bright); }
}

/* 回転する集中線 */
.hl-rays {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 220%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(212, 160, 23, .26) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 14deg);
  animation: hl-spin 16s linear infinite;
  pointer-events: none;
}
@keyframes hl-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 流れる帯 */
.hl-banner {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #b8860b 0 14px, #e0b12c 14px 28px);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .14em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  border-bottom: 3px solid var(--gold-bright);
}
.hl-banner-track {
  display: flex;
  width: max-content;
  padding: 7px 0;
  animation: hl-marquee 14s linear infinite;
}
.hl-banner-track span { padding: 0 24px; white-space: nowrap; }
@keyframes hl-marquee { to { transform: translateX(-50%); } }

/* 四隅のきらめき */
.hl-spark {
  position: absolute;
  z-index: 3;
  width: 26px;
  height: 26px;
  background: var(--gold-bright);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: hl-twinkle 1.2s ease-in-out infinite;
  pointer-events: none;
}
.hl-spark.tl { top: 44px; left: 10px; }
.hl-spark.tr { top: 50px; right: 12px; animation-delay: .3s; width: 20px; height: 20px; }
.hl-spark.bl { bottom: 12px; left: 14px; animation-delay: .6s; width: 18px; height: 18px; }
.hl-spark.br { bottom: 10px; right: 10px; animation-delay: .9s; }
@keyframes hl-twinkle {
  0%, 100% { transform: scale(.4) rotate(0deg); opacity: .35; }
  50% { transform: scale(1.15) rotate(45deg); opacity: 1; }
}

.question.hl .q-text { font-size: 19px; text-shadow: 0 0 10px #fff, 0 0 10px #fff; }
.question.hl .q-no { color: #9a7400; }
.question.hl .scale-wrap { padding-top: 62px; }

/* 「投資家ならここ」の矢印 */
.hl-pointer {
  position: absolute;
  z-index: 4;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: hl-bounce .55s ease-in-out infinite alternate;
  pointer-events: none;
}
.hl-pointer.left { left: -6px; }
.hl-pointer.right { right: -6px; }
.hl-pointer-label {
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 6px;
  border: 2px solid var(--gold-bright);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(192, 57, 43, .5);
}
.hl-pointer-arrow {
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 16px solid var(--danger);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3));
}
@keyframes hl-bounce { from { transform: translateY(-7px); } to { transform: translateY(5px); } }

/* 投資家向きの丸は巨大化して脈動、逆側は小さく薄く */
.question.hl .dot.target {
  border-color: var(--gold);
  border-width: 4px;
  animation: hl-pulse .8s ease-in-out infinite alternate;
  position: relative;
  z-index: 3;
}
.question.hl .dot.target.selected { background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 70%); }
@keyframes hl-pulse {
  from { transform: scale(1.12); box-shadow: 0 0 0 0 rgba(255, 216, 74, .9), 0 0 12px 2px rgba(212, 160, 23, .6); }
  to   { transform: scale(1.32); box-shadow: 0 0 0 12px rgba(255, 216, 74, 0), 0 0 26px 8px rgba(255, 196, 0, .9); }
}
.question.hl .dot.discouraged { opacity: .3; transform: scale(.72); border-style: dashed; }
.question.hl .dot.discouraged:hover { opacity: .6; transform: scale(.8); }
.question.hl .dot.discouraged.selected { opacity: 1; transform: scale(1); border-style: solid; }

/* 念押しのうえ拒否したあと：装飾が一気に色を失う */
.question.hl.rejected {
  animation: none;
  border-color: #9aa0a8;
  background: #eceef0;
  box-shadow: none;
  filter: grayscale(1);
}
.question.hl.rejected .hl-rays,
.question.hl.rejected .hl-spark,
.question.hl.rejected .hl-pointer { display: none; }
.question.hl.rejected .hl-banner { background: #6f767f; border-bottom-color: #9aa0a8; }
.question.hl.rejected .hl-banner-track { animation: none; }
.question.hl.rejected .scale-wrap { padding-top: 0; }
.question.hl.rejected .dot.target { animation: none; border-width: 3px; }
.question.hl.rejected .dot.discouraged { opacity: 1; transform: none; border-style: solid; }

/* ---------------------------------------------------------------- modal / toast */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 28, .6); }
.modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  animation: modal-in .18s ease-out;
}
@keyframes modal-in { from { transform: translateY(12px) scale(.97); opacity: 0; } }
.modal-title { font-size: 14px; letter-spacing: .14em; color: var(--danger); margin-bottom: 8px; }
.modal-text { font-size: 17px; font-weight: 700; line-height: 1.8; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1 1 150px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 120;
  background: rgba(20, 24, 36, .92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  max-width: calc(100% - 32px);
  text-align: center;
}

/* ==========================================================================
   リザルト
   ========================================================================== */

.r-hero { text-align: center; padding: 16px 0 8px; }
.r-kicker { font-size: 13px; font-weight: 800; letter-spacing: .2em; color: var(--muted); }

/* 化け物判定の冒頭の一文（ここだけは惜しむ調子） */
.r-opening {
  font-family: var(--font-serif);
  font-size: clamp(17px, 4.4vw, 21px);
  line-height: 1.8;
  max-width: 24em;
  margin: 14px auto 4px;
  text-wrap: balance;
  word-break: auto-phrase;
}

.type-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 10px;
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
}
.code-letter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 54px;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-size: 30px;
  font-weight: 800;
}
.code-sep { opacity: .5; font-size: 22px; }
.code-suffix { font-family: var(--font); font-size: 16px; font-weight: 700; margin-left: 4px; }

/* 自己矛盾が起きた軸の文字は、2つの文字が重なって壊れる */
.code-letter.broken { border-style: dashed; animation: code-shake .28s steps(2) infinite; }
.code-letter.broken span { position: absolute; }
.code-letter.broken .l1 { color: #39e6ff; animation: code-flip 1.3s steps(1) infinite; }
.code-letter.broken .l2 { color: #ff3ea5; animation: code-flip 1.3s steps(1) infinite reverse; transform: translate(3px, 2px); }
@keyframes code-flip { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes code-shake { 0% { transform: translate(0, 0); } 50% { transform: translate(-1.5px, 1px); } 100% { transform: translate(1.5px, -1px); } }

.r-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 6.4vw, 40px);
  line-height: 1.45;
  letter-spacing: .04em;
  margin: 6px auto 10px;
  max-width: 17em;
  text-wrap: balance;
  word-break: auto-phrase;
}
.r-lead { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.r-catch { color: var(--muted); font-size: 16px; }
.r-trait { font-size: 13px; color: var(--muted); }

/* まっとうな人からの辛辣な一言 */
.retort {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 12px 20px 14px;
  background: #fff;
  color: #1d2433;
  border: 2px solid #1d2433;
  border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
  text-align: left;
}
.retort::after {
  content: "";
  position: absolute;
  left: 32px;
  bottom: -11px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 2px solid #1d2433;
  border-bottom: 2px solid #1d2433;
  transform: rotate(45deg);
}
.retort-text { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.6; text-wrap: balance; word-break: auto-phrase; }
.retort.small { margin: 8px 0 18px; padding: 8px 14px 10px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .3); }
.retort.small .retort-text { font-size: 14px; }

.r-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-top: 20px;
}
.r-section p + p { margin-top: 12px; }
.r-heading {
  font-size: 19px;
  letter-spacing: .06em;
  padding-left: 12px;
  border-left: 5px solid var(--agree);
  margin-bottom: 14px;
  line-height: 1.4;
}
.r-subheading { font-size: 15px; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
.r-caption { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.r-note {
  margin-top: 16px !important;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-weight: 700;
}
.r-list li { position: relative; padding-left: 1.2em; }
.r-list li + li { margin-top: 4px; }
.r-list li::before { content: ""; position: absolute; left: .2em; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
.r-list.lacking { margin-top: 12px; font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 4px 24px; }
@media (min-width: 600px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col .r-subheading { margin-top: 4px; }

/* 診断サマリー */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat dt { font-size: 11.5px; color: var(--muted); line-height: 1.4; min-height: 2.8em; display: flex; align-items: center; justify-content: center; }
.stat dd { font-size: 24px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-sub { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* レーダーチャート（性格8種の投資家度） */
.radar-box { --radar: var(--agree); }
body.theme-monster .radar-box { --radar: #ff5cb3; }
body.theme-investor .radar-box { --radar: #b8860b; }
.radar { position: relative; max-width: 440px; margin: 0 auto; }
.radar svg { display: block; width: 100%; height: auto; overflow: visible; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-ideal { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 5 4; }
.radar-shape { fill: var(--radar); fill-opacity: .22; stroke: var(--radar); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--radar); stroke: var(--card); stroke-width: 2; }
.radar-presented { fill: none; stroke: var(--gold); stroke-width: 2.5; }
.radar-label { font-size: 13px; font-weight: 700; fill: var(--ink); }
.radar-pct { font-size: 11.5px; font-weight: 500; fill: var(--muted); font-variant-numeric: tabular-nums; }
.radar-hit { fill: transparent; cursor: pointer; outline: none; }
.radar-hit:focus-visible { stroke: var(--gold); stroke-width: 2; }
.radar-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  background: rgba(20, 24, 36, .94);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}
.radar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.radar-legend li { display: flex; align-items: center; gap: 6px; }
.radar-legend .key { display: inline-block; width: 18px; height: 0; }
.key-shape { border-top: 3px solid var(--radar); }
.key-ideal { border-top: 2px dashed var(--gold); }
.radar-legend .key-presented { width: 12px; height: 12px; border: 2.5px solid var(--gold); border-radius: 50%; }

/* 根拠となった回答 */
.evidence { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 12px; }
.evidence-row { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.evidence-no { grid-row: span 2; font-weight: 800; font-size: 13px; color: var(--muted); padding-top: 3px; }
.evidence-q { font-weight: 700; line-height: 1.6; }
.evidence-a { font-size: 14px; color: var(--disagree); font-weight: 700; }
.evidence-note { font-size: 13px; color: var(--muted); margin-top: 10px !important; }

/* 性格軸バー */
.axis-row + .axis-row { margin-top: 20px; }
.axis-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.pole-investor { color: var(--agree); }
.pole-human { color: var(--disagree); text-align: right; }
.axis-name { font-size: 12px; color: var(--muted); letter-spacing: .2em; }
.axis-bar { position: relative; height: 14px; border-radius: 99px; background: var(--disagree); }
.axis-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--agree); border-radius: 99px 0 0 99px; border-right: 3px solid var(--card); }
.axis-note { font-size: 13px; text-align: center; margin-top: 6px; font-weight: 700; }

.axis-row:not(.broken) .axis-bar { overflow: hidden; }
.axis-row.broken .axis-bar { animation: bar-shake .22s steps(2) infinite; }
.axis-row.broken .axis-fill { border-right: none; }
.axis-tear {
  position: absolute;
  top: -5px;
  bottom: -5px;
  background: repeating-linear-gradient(115deg, #14101c 0 5px, #ff3ea5 5px 7px, #14101c 7px 12px, #39e6ff 12px 14px);
  clip-path: polygon(0 18%, 6% 0, 12% 30%, 20% 4%, 28% 26%, 36% 0, 45% 22%, 55% 2%, 64% 28%, 73% 0, 82% 24%, 91% 4%, 100% 20%, 100% 80%, 93% 100%, 85% 74%, 76% 100%, 66% 72%, 57% 98%, 47% 76%, 38% 100%, 29% 74%, 20% 98%, 11% 72%, 5% 100%, 0 82%);
}
.axis-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #ff3ea5;
  box-shadow: 0 0 10px rgba(255, 62, 165, .8);
}
.axis-row.broken .axis-note { color: #ff3ea5; }
@keyframes bar-shake { 0% { transform: translateX(-1px); } 100% { transform: translateX(1px); } }

/* 併発している自己矛盾 */
.sub-monster + .sub-monster { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.sub-monster-title { font-family: var(--font-serif); font-size: 19px; line-height: 1.5; }
.sub-monster-catch { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }

/* 共有 */
.share-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: inherit;
  background: transparent;
  resize: none;
}
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.share-actions .btn { flex: 1 1 160px; }
.r-again { text-align: center; margin-top: 32px; }

/* ---------------------------------------------------------------- theme: monster */

body.theme-monster {
  --bg: #120e1a;
  --card: #1c1628;
  --ink: #efe9fb;
  --muted: #a79bbd;
  --line: #352b49;
  --agree: #5b8cff;
  --disagree: #ff7a45;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 62, 165, .18), transparent 60%),
    var(--bg);
}
body.theme-monster .site-header { background: #0d0a14; }
body.theme-monster .r-kicker { color: #ff3ea5; }
body.theme-monster .r-heading { border-left-color: #ff3ea5; }
body.theme-monster .evidence-a { color: #ff9a6e; }
body.theme-monster .illust.noimg { border-color: #4a3d66; background: repeating-linear-gradient(45deg, rgba(255, 62, 165, .07) 0 12px, transparent 12px 24px); }
body.theme-monster .btn-ghost { color: var(--ink); }
body.theme-monster .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
body.theme-monster .axis-fill { border-right-color: var(--card); }

/* タイトルのグリッチ */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.glitch::before { color: #39e6ff; animation: glitch-a 2.6s steps(1) infinite; mix-blend-mode: screen; }
.glitch::after { color: #ff3ea5; animation: glitch-b 3.1s steps(1) infinite; mix-blend-mode: screen; }
@keyframes glitch-a {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  8%  { clip-path: inset(12% 0 60% 0); transform: translate(-4px, 0); }
  12% { clip-path: inset(64% 0 8% 0); transform: translate(3px, 0); }
  16% { clip-path: inset(0 0 100% 0); }
  54% { clip-path: inset(40% 0 36% 0); transform: translate(5px, 0); }
  58% { clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  22% { clip-path: inset(52% 0 20% 0); transform: translate(4px, 1px); }
  26% { clip-path: inset(6% 0 78% 0); transform: translate(-5px, 0); }
  30% { clip-path: inset(0 0 100% 0); }
  72% { clip-path: inset(24% 0 52% 0); transform: translate(-3px, -1px); }
  76% { clip-path: inset(0 0 100% 0); }
}

/* ---------------------------------------------------------------- theme: investor (CLEAR) */

body.theme-investor {
  --bg: #fbf6e4;
  --line: #e8d9a6;
  --agree: #b8860b;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 216, 74, .55), transparent 60%),
    var(--bg);
}
body.theme-investor .r-kicker {
  display: block;
  width: fit-content;
  margin: 0 auto;
  color: #fff;
  background: linear-gradient(90deg, #b8860b, #e6b422, #b8860b);
  background-size: 200% 100%;
  padding: 6px 22px;
  border-radius: 999px;
  font-size: 15px;
  animation: clear-shine 2.4s linear infinite;
}
@keyframes clear-shine { to { background-position: -200% 0; } }
body.theme-investor .type-code { color: #8a6500; }
body.theme-investor .code-letter { background: linear-gradient(160deg, #fff6c9, #f1cf5b); border-color: #b8860b; }
body.theme-investor .r-title { color: #6b4e00; }
body.theme-investor .r-heading { border-left-color: var(--gold); }
body.theme-investor .btn-primary { background: #b8860b; }
body.theme-investor .btn-primary:hover { background: #9a7009; }
body.theme-investor .axis-fill { background: linear-gradient(90deg, #b8860b, #e6b422); }
body.theme-investor .axis-bar { background: #e9e2c8; }
body.theme-investor .pole-investor { color: #8a6500; }

/* ---------------------------------------------------------------- theme: human */

body.theme-human {
  --bg: #eef3ee;
  --line: #d5dfd5;
  --agree: #4b7f5c;
}
body.theme-human .r-kicker { color: #4b7f5c; }
body.theme-human .r-lead { color: var(--danger); }

/* ---------------------------------------------------------------- reduced motion */

/*
 * OS側で「アニメーション効果」を切っている環境（Windows の 設定 > アクセシビリティ > 視覚効果 など）では、
 * ブラウザが prefers-reduced-motion: reduce を返すため、下のルールが効いて動きがすべて止まる。
 * 動かない代わりに、誘導質問の過剰装飾が静止画のまま派手に見えるよう、ここで作り直す。
 *
 * html[data-motion="always"] が付いているときは、この打ち消しを効かせない（＝動く）。
 * 付ける条件は js/config.js の forceAnimation: true、または URL の ?motion=on。
 */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="always"]) *,
  html:not([data-motion="always"]) *::before,
  html:not([data-motion="always"]) *::after { animation: none !important; transition: none !important; }

  /* 誘導質問：光り続ける代わりに、強い金色の光を出しっぱなしにする */
  html:not([data-motion="always"]) .question.hl {
    border-color: var(--gold-bright);
    box-shadow: 0 0 0 6px rgba(255, 216, 74, .45), 0 0 40px 10px rgba(255, 196, 0, .6);
  }
  html:not([data-motion="always"]) .question.hl .dot.target {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(255, 216, 74, .35), 0 0 22px 6px rgba(255, 196, 0, .85);
  }
  html:not([data-motion="always"]) .hl-spark { opacity: 1; transform: scale(1) rotate(22deg); }
  html:not([data-motion="always"]) .hl-pointer { transform: translateY(0); }
  html:not([data-motion="always"]) .question.hl.rejected .dot.target { transform: none; box-shadow: none; }

  /* グリッチ：止まると色違いの文字が丸ごと重なって読みにくくなるので、消す */
  html:not([data-motion="always"]) .glitch::before,
  html:not([data-motion="always"]) .glitch::after { display: none; }

  /* 動きを出す設定のときも、視界全体が回り続ける集中線だけは止める（酔いやすいため） */
  html[data-motion="always"] .hl-rays { animation: none !important; }
}
