/* サイト共通の見た目(トップ・診断・辞典)。ヘッダーとフッターは chrome.css */
:root {
  --bg: #0b0810;
  --panel: #141018;
  --panel2: #1d1724;
  --line: #2c2436;
  --ink: #f6f0fa;
  --muted: #a99fb5;
  --neon: #ff4fa3;      /* 結果のタイプで切り替わる */
  --neon2: #b57bff;
  --warn: #ffb04f;
  --display: 'Dela Gothic One', 'Noto Sans JP', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(100% 40% at 50% -10%, #241030 0%, var(--bg) 70%) fixed;
  color: var(--ink);
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.8;
}
.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.hidden { display: none !important; }
.glow { text-shadow: 0 0 10px color-mix(in srgb, var(--neon) 80%, transparent), 0 0 30px color-mix(in srgb, var(--neon) 45%, transparent); }

/* 見出しの上の小さなラベル(参考: 番号やカテゴリを添える) */
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.eyebrow b { font-family: var(--mono); font-weight: 600; color: var(--neon); letter-spacing: 0; }

/* 診断ページの見出し(文字は左、水晶玉は右に小さく) */
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 0 0 4px; }
.page-head h1 { margin: 0; font-weight: 900; font-size: 26px; letter-spacing: -.02em; color: var(--ink); line-height: 1.35; text-shadow: none; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.hero { width: 84px; height: 84px; display: grid; place-items: center; margin: 0; }
.hero img { max-height: 84px; max-width: 84px; object-fit: contain; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--neon) 45%, transparent)); }
.hero svg { width: 80px; height: 80px; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--neon2) 55%, transparent)); }
/* 質問中は、質問と選択肢が1画面に収まるようにヘッダーを小さくする */
body.quizzing .hero, body.quizzing .lead, body.quizzing .page-head .eyebrow { display: none; }
body.quizzing .page-head h1 { font-size: 18px; }
body.quizzing .wrap { padding-top: 16px; }

/* カード(細い線だけ。影や光は控えめに) */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 18px; margin-top: 14px;
}
h2 { font-size: 16px; font-weight: 900; margin: 0 0 10px; color: var(--ink); letter-spacing: -.01em; line-height: 1.5; }
h2 .no { color: var(--neon); margin-right: 6px; }
.note { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.7; }

/* はじめの画面 */
.steps { margin: 0; padding-left: 20px; font-size: 15px; }
.steps li + li { margin-top: 4px; }
.spice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.spice label { cursor: pointer; }
.spice input { position: absolute; opacity: 0; pointer-events: none; }
.spice span {
  display: block; min-height: 52px; text-align: center; padding: 8px 4px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); font-size: 14px; font-weight: 700; line-height: 1.35;
}
.spice small { display: block; font-size: 12px; font-weight: 400; }
.spice input:checked + span {
  border-color: var(--neon); background: color-mix(in srgb, var(--neon) 18%, var(--panel2));
  box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 45%, transparent); color: #fff;
}
.spice input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.privacy { font-size: 12px; color: var(--muted); background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin-top: 14px; }
.privacy a { color: var(--neon2); }
.btn {
  width: 100%; min-height: 52px; margin-top: 16px; padding: 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(90deg, var(--neon2), var(--neon)); color: #fff;
  font: inherit; font-weight: 900; font-size: 16px; letter-spacing: .5px;
  box-shadow: 0 0 20px color-mix(in srgb, var(--neon) 40%, transparent);
}
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.sub { background: transparent; color: var(--neon); border: 1px solid var(--neon); box-shadow: none; margin-top: 10px; font-size: 14px; min-height: 48px; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.error { background: #3a1420; color: #ffb3c0; border: 1px solid #6a2336; border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.warn { background: #33250f; color: #ffd9a0; border: 1px solid #6a4a1a; border-radius: 12px; padding: 10px 12px; margin-top: 14px; font-size: 14px; }

/* 質問 */
.q-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.q-top b { color: var(--neon); font-size: 14px; }
.q-bar { height: 6px; border-radius: 6px; background: #2a1f38; overflow: hidden; margin-top: 6px; }
.q-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--neon2), var(--neon)); transition: width .25s ease-out; }
.q-text { margin: 16px 0 0; font-size: 18px; font-weight: 900; line-height: 1.6; }
.q-hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.opts { display: grid; gap: 10px; margin-top: 14px; }
.opt {
  width: 100%; min-height: 56px; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1.5;
}
.opt:active, .opt.on {
  border-color: var(--neon); background: color-mix(in srgb, var(--neon) 18%, var(--panel2));
  box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 40%, transparent);
}
.opt.na { min-height: 48px; text-align: center; font-size: 14px; color: var(--muted); background: transparent; border-style: dashed; }
.q-back {
  min-height: 48px; margin-top: 8px; padding: 0 10px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px;
}
.q-back:disabled { visibility: hidden; }

/* ローディング */
.loading { text-align: center; padding: 30px 12px; color: var(--muted); }
.orb {
  width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, var(--neon2) 28%, #3a1a6a 70%);
  box-shadow: 0 0 24px var(--neon2); animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); box-shadow: 0 0 40px var(--neon); } }

/* 結果 */
.score-card { text-align: center; padding: 22px 16px 24px; border-color: color-mix(in srgb, var(--neon) 45%, var(--line)); box-shadow: 0 0 26px color-mix(in srgb, var(--neon) 22%, transparent); }
.score-num { font-family: var(--display); font-size: 88px; line-height: 1.05; color: var(--neon); }
.score-num small { font-size: 36px; margin-left: 4px; }
/* 点数ではなく言葉で出す結果(タイプ名・「あと3日」など)。文字数に合わせて大きさを変える */
.score-num.word { font-size: min(64px, calc((min(100vw, 560px) - 92px) / var(--len, 6))); line-height: 1.25; word-break: keep-all; }
.score-num.word small { font-size: .45em; }
.score-emoji { font-size: 44px; line-height: 1.2; margin-bottom: 4px; }
.score-catch { margin: 10px 0 0; font-size: 14px; color: #dccfe8; }
.bar { height: 12px; border-radius: 12px; background: #2a1f38; overflow: hidden; margin: 14px auto 0; max-width: 420px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--neon2), var(--neon)); box-shadow: 0 0 12px var(--neon); transition: width 1s ease-out; }
.judge { margin-top: 12px; font-size: 14px; color: var(--muted); }
.judge b { color: var(--ink); font-size: 16px; }
.memo { text-align: center; border-color: color-mix(in srgb, var(--neon) 40%, var(--line)); }
.memo .label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.memo .line {
  margin: 10px 0 2px; font-weight: 900; font-size: 24px; line-height: 1.9; text-wrap: balance;
}
.memo .line span {
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--neon) 40%, transparent) 60%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 4px;
}
.items-title { margin: 28px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.item {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 10px;
}
.item.top { border-color: color-mix(in srgb, var(--neon) 60%, var(--line)); box-shadow: 0 0 16px color-mix(in srgb, var(--neon) 22%, transparent); }
.ico {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel2); border: 1px solid var(--line); color: var(--neon2);
}
.item.top .ico { color: var(--neon); border-color: var(--neon); }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.it-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.it-name { font-weight: 700; font-size: 15px; }
.it-val { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.it-word { font-size: 13px; font-weight: 700; color: var(--muted); }
.item.top .it-word { color: var(--neon); }
.it-na { font-size: 12px; color: var(--muted); }
.gauge { display: inline-flex; gap: 4px; }
.gauge i { display: block; width: 20px; height: 8px; border-radius: 4px; background: #31253f; }
.gauge i.on { background: var(--neon); box-shadow: 0 0 8px var(--neon); animation: pop .4s ease-out both; animation-delay: var(--d, 0ms); }
.gauge.lv1 i.on { opacity: .55; box-shadow: none; }
.gauge.lv2 i.on { opacity: .8; }
@keyframes pop { from { transform: scaleX(.2); opacity: 0; } to { transform: none; } }
.it-comment { font-size: 14px; margin: 6px 0 0; color: #dccfe8; }
.it-quote { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--muted); background: var(--panel2); border-radius: 10px; padding: 3px 10px; }
.review p { margin: 0; font-size: 15px; line-height: 1.9; color: #e6dcef; }
.sec p { margin: 0; font-size: 15px; }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.info .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.info .box.wide { grid-column: 1 / -1; }
.info .k { font-size: 12px; color: var(--muted); }
.info .v { font-size: 17px; font-weight: 900; margin-top: 2px; }
.info .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
ul.list { margin: 0; padding-left: 20px; font-size: 15px; color: #e6dcef; }
ul.list li + li { margin-top: 6px; }

/* 一覧(診断メニュー・辞典の言葉)。参考: 番号・名前・説明・→ を1行ずつ、細い線で区切る */
.menu, .words {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden;
}
.menu a, .words a {
  display: grid; grid-template-columns: 30px 1fr 18px; gap: 10px; align-items: center; min-height: 64px;
  padding: 14px 14px 14px 16px; color: var(--ink); text-decoration: none;
}
.menu a + a, .words a + a { border-top: 1px solid var(--line); }
.menu a:active, .words a:active { background: var(--panel2); }
.menu .no, .words .no { font-family: var(--mono); font-size: 13px; color: var(--muted); align-self: start; padding-top: 2px; }
.menu .t, .words .w { display: block; font-weight: 900; font-size: 16px; line-height: 1.5; color: var(--ink); }
.menu .t .em { margin-right: 6px; }
.menu .d, .words .s { display: block; font-size: 13px; color: var(--muted); line-height: 1.65; margin-top: 2px; }
.menu .m { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.menu .go, .words .go { color: var(--muted); font-size: 16px; text-align: right; }

/* しくみ・よくある質問(はじめの画面だけに出す) */
.about h2 { font-size: 16px; margin: 26px 0 8px; }
.about h2:first-child { margin-top: 0; }
.about p { margin: 0; font-size: 15px; color: #dccfe8; }
.about dl { margin: 0; }
.about dt { font-weight: 700; font-size: 15px; margin-top: 14px; }
.about dd { margin: 2px 0 0; font-size: 14px; color: #c9bdd6; }
.about dt b, .about li b { color: var(--neon); }
.about ol, .about ul { margin: 0; padding-left: 22px; font-size: 15px; color: #dccfe8; }
.about li + li { margin-top: 8px; }
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 28px; line-height: 1.7; }
.pr { font-size: 11px; color: var(--muted); }
/* アフィリエイト(必ず「PR」と明示する) */
.aff { display: block; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 14px; }
.aff .pr { display: inline-block; border: 1px solid var(--muted); border-radius: 6px; padding: 0 6px; margin-bottom: 6px; }
.aff img { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; }
.aff .t { font-weight: 700; font-size: 15px; }
.aff .d { font-size: 13px; color: #dccfe8; margin-top: 2px; }
.aff .go { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--neon); }

/* 区切りの見出し(左に見出し、右に件数などの小さな情報) */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 48px 0 0; }
.sec-head h2 { margin: 0; font-size: 20px; }
.sec-head .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sec-head + .note { margin-top: 6px; }

/* ---- トップページ ---- */
.top-hero h1 { margin: 0; font-weight: 900; font-size: 34px; line-height: 1.3; letter-spacing: -.03em; }
.top-hero h1 em { font-style: normal; color: var(--neon); }
.top-hero .lead { font-size: 15px; margin-top: 14px; color: #c9bdd6; }
.stats { display: flex; gap: 28px; margin: 20px 0 0; padding: 0; }
.stats div { margin: 0; }
.stats dt { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.stats dd { margin: 0; font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.3; }
.cta-big {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px; margin-top: 24px; padding: 14px 20px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(90deg, var(--neon2), var(--neon)); color: #fff;
  box-shadow: 0 0 22px color-mix(in srgb, var(--neon) 35%, transparent);
}
.cta-big b { display: block; font-size: 18px; font-weight: 900; line-height: 1.4; }
.cta-big small { display: block; font-size: 12px; opacity: .92; }
.cta-big .arrow { font-size: 22px; font-weight: 900; }
.boss { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; margin-top: 16px; }
.boss .face { font-size: 34px; line-height: 48px; text-align: center; width: 48px; height: 48px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); }
.boss .who { font-size: 12px; color: var(--muted); }
.boss p { margin: 4px 0 0; font-size: 15px; color: #dccfe8; }
.boss p b { color: var(--ink); }
/* 言葉のチップ(横にスクロール) */
.chips {
  display: flex; gap: 8px; margin: 12px calc(-1 * max(16px, env(safe-area-inset-left))) 0; padding: 0 max(16px, env(safe-area-inset-left)) 4px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.chips a[aria-current="page"] { border-color: var(--neon); color: var(--neon); }

/* ---- 辞典 ---- */
.crumb { font-size: 12px; color: var(--muted); margin: -12px 0 8px; }
.crumb a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.word-head h1 { margin: 0; font-weight: 900; font-size: 34px; letter-spacing: -.03em; color: var(--ink); line-height: 1.3; text-shadow: none; }
.word-head .yomi { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.def { border-left: 3px solid var(--neon); }
.def .label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.def .line { margin: 6px 0 0; font-weight: 900; font-size: 20px; line-height: 1.7; }
.def .note { margin-top: 10px; }
.prose p { margin: 0; font-size: 15px; color: #dccfe8; line-height: 1.9; }
.prose p + p { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .gauge i.on, .orb { animation: none; }
  .bar i, .q-bar i { transition: none; }
}

/* ---- トップの動く見本 ---- */
.top-visual { position: relative; height: 330px; margin: 28px 0 0; perspective: 900px; }
.tv-glow { position: absolute; inset: 10% 5%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255, 79, 163, .45), rgba(181, 123, 255, .25) 45%, transparent 70%); filter: blur(30px); }
.tv-orb { position: absolute; left: 50%; top: 4px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #d9b8ff 22%, #6a3cc0 62%, #2a1260 100%);
  box-shadow: 0 0 40px rgba(181, 123, 255, .7), inset -10px -14px 30px rgba(0, 0, 0, .35); }
.tv-orb i { position: absolute; inset: -16px; border-radius: 50%; border: 1px solid rgba(255, 79, 163, .55); border-top-color: transparent; border-bottom-color: transparent; }
.tv-orb i:nth-child(2) { inset: -30px; border-color: rgba(181, 123, 255, .45); border-left-color: transparent; border-right-color: transparent; }
.tv-orb i:nth-child(3) { inset: -46px; border-color: rgba(255, 255, 255, .12); border-top-color: rgba(255, 79, 163, .6); }
.tv-card { position: absolute; left: 50%; bottom: 8px; width: min(310px, 88%); margin-left: calc(min(310px, 88%) / -2); padding: 16px 18px; border-radius: 18px;
  background: rgba(20, 16, 24, .88); border: 1px solid color-mix(in srgb, var(--neon) 50%, var(--line)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 0 30px rgba(255, 79, 163, .25); text-align: center; transform-style: preserve-3d; transition: transform .2s ease-out; }
.tv-k { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.tv-score { display: block; font-family: var(--display); font-weight: 400; font-size: 56px; line-height: 1.1; color: #ff8a4f; text-shadow: 0 0 18px rgba(255, 138, 79, .7); }
.tv-score small { font-size: 24px; margin-left: 2px; }
.tv-band { display: block; font-size: 12px; color: var(--muted); }
.tv-line { margin: 8px 0 0; min-height: 3.4em; font-weight: 900; font-size: 15px; line-height: 1.7; }
.tv-chip { position: absolute; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: rgba(29, 23, 36, .92); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
.tv-chip.c1 { left: 0; top: 34px; --tilt: -3deg; }
.tv-chip.c2 { right: 0; top: 18px; --tilt: 3deg; border-color: rgba(255, 138, 79, .5); }
.tv-chip.c3 { left: 2%; top: 128px; --tilt: 2deg; border-color: rgba(181, 123, 255, .5); }
.tv-chip.c4 { right: 3%; top: 118px; --tilt: -2deg; border-color: rgba(79, 195, 255, .5); }

/* ---- 流れる帯 ---- */
.marquee { overflow: hidden; margin: 36px 0 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 79, 163, .05); }
.mq-track { display: flex; width: max-content; }
.mq-track span { flex: none; padding: 0 22px; font-weight: 900; font-size: 15px; white-space: nowrap; color: #e6dcef; }
.mq-track span::before { content: '😈'; margin-right: 10px; }

.top-grid > section > .sec-head { margin-top: 48px; }

/* ============================================================
   PC(横幅960px以上): 横幅を使って2列に並べる
   ============================================================ */
@media (min-width: 960px) {
  body { font-size: 16px; }
  .wrap { max-width: 1120px; padding: 56px 40px 40px; }

  /* トップ */
  .top-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; min-height: 500px; }
  .top-hero h1 { font-size: clamp(40px, 4.2vw, 58px); }
  .top-hero h1 .ln { white-space: nowrap; }
  .top-hero .lead { font-size: 18px; max-width: 30em; }
  .stats { gap: 44px; margin-top: 28px; }
  .stats dd { font-size: 30px; }
  .cta-big { max-width: 460px; min-height: 80px; margin-top: 32px; }
  .top-visual { height: 460px; margin: 0; }
  .tv-orb { width: 170px; height: 170px; margin-left: -85px; top: 10px; }
  .tv-card { width: 360px; margin-left: -180px; bottom: 20px; padding: 22px; }
  .tv-score { font-size: 76px; }
  .tv-line { font-size: 17px; }
  .tv-chip { font-size: 14px; padding: 8px 16px; }
  .tv-chip.c1 { top: 60px; } .tv-chip.c3 { top: 200px; left: -4%; } .tv-chip.c4 { top: 190px; right: -2%; }
  .marquee { margin-top: 24px; }
  .mq-track span { font-size: 18px; padding: 0 30px; }
  .boss { max-width: 760px; }
  .sec-head { margin-top: 72px; }
  .sec-head h2 { font-size: 28px; }
  .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 0; background: none; overflow: visible; }
  .menu a { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); min-height: 132px; padding: 22px 20px; align-items: start; }
  .menu a + a { border-top: 1px solid var(--line); }
  .menu .t { font-size: 19px; }
  .menu .d { font-size: 14px; }
  .menu .go { align-self: center; }
  .top-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
  .top-grid > section > .sec-head { margin-top: 72px; }
  .chips { flex-wrap: wrap; overflow: visible; margin: 12px 0 0; padding: 0; }

  /* 診断ページ */
  .page-head h1 { font-size: 44px; }
  .page-head .lead { font-size: 16px; }
  .hero { width: 128px; height: 128px; }
  .hero svg { width: 124px; height: 124px; }
  .hero img { max-width: 128px; max-height: 128px; }
  .diag-body { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; }
  .diag-body #about { position: sticky; top: 76px; }
  /* 質問中・結果では「しくみ」を隠して、1列を広く使う */
  .diag-body:has(#about.hidden) { grid-template-columns: minmax(0, 1fr); }
  #quiz, #loading { max-width: 720px; margin-left: auto; margin-right: auto; }
  body.quizzing .page-head { max-width: 720px; margin: 0 auto; }
  .q-text { font-size: 22px; }
  .opts { grid-template-columns: 1fr 1fr; }
  .opt.na { grid-column: 1 / -1; }
  /* 結果: 左に点数とひとこと(止まったまま)、右に内訳など */
  .res-grid { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 28px; align-items: start; }
  .res-hero { position: sticky; top: 76px; }
  .res-body > :first-child, .res-body > .hidden + * { margin-top: 14px; }
  .res-body .items-title { margin-top: 14px; }
  #moreCard .menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #result > .card, #affResult, #again { max-width: 760px; }

  /* 辞典 */
  .word-head h1 { font-size: 56px; }
  .word-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
  .word-side { position: sticky; top: 76px; }
  .word-side .sec-head:first-child { margin-top: 14px !important; }
  .word-side .sec-head h2 { font-size: 20px; }
  .word-side .menu { grid-template-columns: 1fr; }
  .word-side .menu a { min-height: 0; }
  .def .line { font-size: 26px; }
  .words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 0; background: none; overflow: visible; }
  .words a { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); min-height: 110px; }
  .words a + a { border-top: 1px solid var(--line); }
}

/* ============================================================
   ぱっと見で中身が分かるように: 色分けした入口・診断カード・辞典カード
   (--c にそれぞれの色が入る)
   ============================================================ */
/* トップ: ここでできること */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 112px;
  padding: 14px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, var(--panel)) 0%, var(--panel) 75%);
  border: 1px solid color-mix(in srgb, var(--c) 55%, var(--line));
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 22%, transparent);
}
.tile .ti-em { font-size: 28px; line-height: 1.2; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 70%, transparent)); }
.tile b { font-size: 15px; font-weight: 900; margin-top: auto; }
.tile small { font-size: 11px; color: color-mix(in srgb, var(--c) 55%, #fff); }

/* 区切り見出しの左に色の印 */
.sec-head h2 { position: relative; }

/* 診断カード: 1つずつ色を持たせる */
.menu a { position: relative; }
.menu a[style*="--c"] { background: linear-gradient(100deg, color-mix(in srgb, var(--c) 16%, var(--panel)) 0%, var(--panel) 60%); }
.menu a[style*="--c"]::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.menu a[style*="--c"] .no { color: var(--c); }
.menu .t { display: flex; align-items: center; gap: 0; }
.menu a[style*="--c"] .t .em {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 50%; font-size: 18px;
  background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent);
}
.menu a[style*="--c"] .go { color: var(--c); }
.menu a[style*="--c"] .m { color: color-mix(in srgb, var(--c) 60%, #fff); }

/* 辞典カード */
.wcards { display: grid; gap: 10px; margin-top: 12px; }
.wcard {
  position: relative; display: block; padding: 16px 16px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 18%, var(--panel)) 0%, var(--panel) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
}
.wcard::after { content: '“'; position: absolute; right: 10px; top: -14px; font-family: var(--display); font-size: 84px; line-height: 1; color: color-mix(in srgb, var(--c) 30%, transparent); pointer-events: none; }
.wc-cat { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: color-mix(in srgb, var(--c) 55%, #fff); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.wc-w { display: block; margin-top: 8px; font-size: 20px; font-weight: 900; line-height: 1.4; color: #fff; text-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.wc-d { display: block; margin-top: 4px; font-size: 14px; line-height: 1.75; color: #e6dcef; }
.wc-go { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--c); }

/* 辞典の一覧: 分類へのジャンプ */
.cat-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.cat-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 14px;
  text-decoration: none; color: var(--ink); font-weight: 900; font-size: 14px;
  background: color-mix(in srgb, var(--c) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 50%, var(--line));
}
.cat-nav small { font-family: var(--mono); font-size: 12px; color: var(--c); }
.sec-head[style*="--c"] h2 { color: color-mix(in srgb, var(--c) 35%, #fff); }

/* 言葉のページ: 用例・シェア・前後の言葉 */
.usage p { margin: 0; font-size: 15px; line-height: 1.9; color: #e6dcef; padding-left: 12px; border-left: 2px solid var(--neon2); }
.share-x { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; background: #000; border: 1px solid #444; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.pager a { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 900; font-size: 15px; }
.pager .next { text-align: right; }
.pager small { font-size: 11px; font-weight: 400; color: var(--muted); }

@media (min-width: 960px) {
  .tiles { gap: 16px; margin-top: 16px; }
  .tile { min-height: 150px; padding: 22px 20px; }
  .tile .ti-em { font-size: 40px; }
  .tile b { font-size: 22px; }
  .tile small { font-size: 13px; }
  .menu a[style*="--c"]::before { top: 18px; bottom: 18px; }
  .menu a[style*="--c"] .t .em { width: 44px; height: 44px; font-size: 22px; }
  .wcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .word-main .wcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wc-w { font-size: 24px; }
  .cat-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-grid .wcards { grid-template-columns: 1fr 1fr; }
}
@media (hover: hover) {
  .motion .tile, .motion .wcard, .motion .cat-nav a, .motion .pager a { transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .25s ease, border-color .25s ease; }
  .motion .tile:hover, .motion .wcard:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 35%, transparent); border-color: var(--c); }
  .motion .menu a[style*="--c"]:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 28%, transparent); }
  .motion .cat-nav a:hover, .motion .pager a:hover { transform: translateY(-3px); border-color: var(--neon); }
}

/* ---- 所長のキャラ画像 ---- */
.hero img { width: 84px; height: 84px; }
.orb { background: none !important; box-shadow: none !important; display: grid; place-items: center; }
.orb img { width: 64px; height: 64px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--neon2) 70%, transparent)); }
.tv-orb { background: none; box-shadow: none; }
.tv-orb img { position: absolute; inset: -6%; width: 112%; height: 112%; filter: drop-shadow(0 0 26px rgba(181, 123, 255, .65)); }
.boss .face { display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--neon2) 18%, var(--panel2)); }
.boss .face img { width: 44px; height: 44px; }
.mq-track span::before { content: ''; display: inline-block; width: 20px; height: 20px; margin-right: 10px; vertical-align: -4px; background: url(/assets/character.png) center / contain no-repeat; }
@media (min-width: 960px) {
  .hero img { width: 128px; height: 128px; }
}
