/* =====================================================================
 * viral-shindan — styles.css  (V2 / UI only)
 *
 * コンセプト: 「シンプルで今っぽい」+「ちょっとふざけている」+「スクショしたくなる」
 *  - 余白を活かしたクリーンな白ベース。背景・カード・見出し・ボタンで遊び心を足す。
 *  - 診断ごとのテーマ色は [data-theme] で切替（<html> と、カード/次の検査セクション単位の両方）。
 *  - 派生色（--accent-ink / --tint など）は「:root, [data-theme]」で宣言するため、
 *    どの要素にテーマを付けても、その要素の --color-accent から再計算される。
 *  - 絵文字は結果タイトルの1個だけ。装飾はCSSのみ（画像素材なし）。
 *  - アニメは100〜300ms程度。prefers-reduced-motion では無効化。
 * ===================================================================== */

/* ---------- デザイントークン ---------- */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #17171a;
  --text: #1c1c1e;
  --text-sub: #65656b;
  --line: #e7e5e0;
  --line-strong: #d6d3cb;
  --track: #ecebe6;

  --color-accent: #6d5efc;
  --color-accent-dark: #4f3fd1;
  --color-accent-soft: #ece9ff;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --sh-1: 0 1px 2px rgba(23, 23, 26, 0.05), 0 8px 20px -10px rgba(23, 23, 26, 0.14);
  --sh-2: 0 2px 4px rgba(23, 23, 26, 0.06), 0 18px 34px -16px rgba(23, 23, 26, 0.22);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Segoe UI", Meiryo, sans-serif;
}

/* テーマから派生する色。テーマ要素ごとに再計算される。 */
:root,
[data-theme] {
  --accent-ink: color-mix(in srgb, var(--color-accent-dark) 84%, #000);
  --tint: color-mix(in srgb, var(--color-accent) 8%, #fff);
  --tint-2: color-mix(in srgb, var(--color-accent) 17%, #fff);
  --edge: color-mix(in srgb, var(--color-accent) 30%, #fff);
  --glow: color-mix(in srgb, var(--color-accent) 20%, transparent);
  --glow-strong: color-mix(in srgb, var(--color-accent) 48%, transparent);
}

/* ---------- 診断ごとのテーマ ----------
   新しい診断は [data-theme="診断ID"] ブロックを1つ足すだけで対応できる。 */
[data-theme="inkya"] { --color-accent: #5b4fe0; --color-accent-dark: #3b2fb0; --color-accent-soft: #e8e4ff; }
[data-theme="paripi"] { --color-accent: #e8871e; --color-accent-dark: #b96b12; --color-accent-soft: #fff1dc; }
[data-theme="commu"] { --color-accent: #2f8fd1; --color-accent-dark: #1f6ba3; --color-accent-soft: #e3f2fb; }
[data-theme="renainou"] { --color-accent: #e8543f; --color-accent-dark: #c23f2c; --color-accent-soft: #ffe4de; }
[data-theme="menhera"] { --color-accent: #8e4fc9; --color-accent-dark: #6c3aa0; --color-accent-soft: #f2e6fb; }
[data-theme="kaeruka"] { --color-accent: #5fa15a; --color-accent-dark: #3f7d3c; --color-accent-soft: #eef7e3; }
[data-theme="izon"] { --color-accent: #4a4fd1; --color-accent-dark: #34379e; --color-accent-soft: #e7e6fb; }
[data-theme="sns-kanshi"] { --color-accent: #0ea5b7; --color-accent-dark: #143a5c; --color-accent-soft: #e2f6fa; }
[data-theme="youkya"] { --color-accent: #2ea8d1; --color-accent-dark: #1c7fa3; --color-accent-soft: #fff6d9; }
[data-theme="jirai"] { --color-accent: #a8557d; --color-accent-dark: #7c3b5c; --color-accent-soft: #f5e6ee; }
[data-theme="oji"] { --color-accent: #c97a3d; --color-accent-dark: #2c3a52; --color-accent-soft: #f2e8da; }
[data-theme="netmin"] { --color-accent: #17a2b8; --color-accent-dark: #2b2f36; --color-accent-soft: #e4f4f7; }
[data-theme="otaku"] { --color-accent: #6f5fd8; --color-accent-dark: #4a3aa0; --color-accent-soft: #ece8fb; }
/* ドパガキ度診断テーマ（ネオンライム系。蛍光色ベタ塗りにはしない） */
[data-theme="dopagaki"] { --color-accent: #8bc34a; --color-accent-dark: #5c8a1e; --color-accent-soft: #eef6dc; }

/* ---------- ベース ---------- */

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-family);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 背景: テーマ色の非常に薄い光。全面を派手な色にはしない。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(110% 55% at 50% -12%, var(--glow), transparent 62%),
    radial-gradient(60% 40% at 105% 38%, color-mix(in srgb, var(--color-accent) 7%, transparent), transparent 70%);
}

/* トップページだけは複数色のやわらかい光（診断シリーズ全体のブランド感） */
body[data-page="list"]::before {
  background:
    radial-gradient(70% 36% at 12% -4%, rgba(91, 79, 224, 0.16), transparent 66%),
    radial-gradient(60% 34% at 92% 4%, rgba(232, 135, 30, 0.15), transparent 66%),
    radial-gradient(70% 40% at 50% 100%, rgba(95, 161, 90, 0.10), transparent 70%);
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 18px 16px 56px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  min-height: 100dvh;
}

body[data-page="list"] #app {
  max-width: 940px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.35;
  font-feature-settings: "palt";
}

p {
  overflow-wrap: anywhere;
}

/* 日本語の1文字だけの孤立行（「る？」等）を避ける */
.next-diagnosis-text,
.share-teaser,
.result-catch,
.start-subcopy,
.list-subcopy,
.pr-text,
.pr-catch,
.question-text,
.result-body {
  text-wrap: balance;
}

.result-body,
.pr-text {
  text-wrap: pretty;
}

/* ---------- 共通ボタン（チャンキー：押すと沈む） ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease), background 0.14s ease;
}

.btn:active {
  transform: translateY(3px) scale(0.99);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.18s var(--ease);
}

@media (hover: hover) {
  .btn:hover .btn-arrow {
    transform: translateX(3px);
  }
}

.btn-primary {
  background: var(--accent-ink);
  color: #fff;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent-ink) 62%, #000), 0 16px 26px -14px var(--glow-strong);
}

.btn-primary:active {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent-ink) 62%, #000), 0 8px 14px -10px var(--glow-strong);
}

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 color-mix(in srgb, var(--accent-ink) 62%, #000), 0 20px 30px -14px var(--glow-strong);
  }
  .btn-primary:active {
    transform: translateY(3px) scale(0.99);
  }
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line-strong);
}

/* X シェア = 最優先CTA（黒） */
.btn-share {
  min-height: 60px;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 4px 0 #000, 0 18px 28px -14px rgba(0, 0, 0, 0.5);
}

.btn-share:active {
  box-shadow: 0 1px 0 #000, 0 8px 14px -10px rgba(0, 0, 0, 0.5);
}

@media (hover: hover) {
  .btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000, 0 22px 32px -14px rgba(0, 0, 0, 0.55);
  }
  .btn-share:active {
    transform: translateY(3px) scale(0.99);
  }
}

.btn-x-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

/* 友達に送る = 2番手（アウトライン） */
.btn-native-share {
  min-height: 50px;
  margin-top: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line-strong);
  font-size: 15px;
  font-weight: 700;
}

@media (hover: hover) {
  .btn-native-share:hover {
    border-color: var(--text);
  }
}

/* もう一度 = 3番手（テキストリンク相当） */
.btn-tertiary {
  width: auto;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 16px;
  background: none;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .btn-tertiary:hover {
    color: var(--text);
  }
}

.btn-pr {
  width: auto;
  min-width: 180px;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 22px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--line-strong);
  font-size: 13px;
  font-weight: 700;
}

@media (hover: hover) {
  .btn-pr:hover {
    border-color: var(--text-sub);
  }
}

/* ホバーで translateY して浮く要素は、ポインタが「下端の数px」に乗った瞬間に
   浮く→ポインタが外れる→ホバー解除→戻る→…と往復してチラつく。
   それを防ぐため、動く量より大きい透明の当たり判定を下側へ足す（見た目は変わらない）。
   隣の要素との間隔（gap 8〜14px）を超えない大きさにしている。 */
.choice-card,
.btn-primary,
.btn-share,
.btn-next-diagnosis {
  position: relative;
}

.choice-card::after,
.btn-primary::after,
.btn-share::after,
.btn-next-diagnosis::after {
  content: "";
  position: absolute;
  inset: -3px 0 -6px;
}

.diagnosis-card-link::after {
  content: "";
  position: absolute;
  inset: 0 0 -6px;
}

.diagnosis-card-small .diagnosis-card-link::after {
  bottom: -3px;
}

/* ---------- 画面切替アニメ ---------- */

.screen {
  animation: screen-in 0.24s var(--ease) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 共通：小さなラベル類 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b4fe0, #e8871e);
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-chips li {
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- トップページ ---------- */

.list-header {
  text-align: center;
  padding: clamp(20px, 6vh, 56px) 0 26px;
}

.list-title {
  margin: 0 0 12px;
  font-size: clamp(31px, 9.4vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.list-title-blank {
  padding: 0 0.04em 0.06em;
  background: linear-gradient(transparent 84%, #e8871e 84% 96%, transparent 96%);
}

.list-subcopy {
  margin: 0 0 16px;
  font-size: clamp(14px, 3.9vw, 17px);
  font-weight: 600;
  color: var(--text-sub);
}

.diagnosis-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagnosis-card {
  position: relative;
  border-radius: var(--r-lg);
}

.diagnosis-card-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  height: 100%;
  min-height: 148px;
  padding: 14px 14px 12px;
  color: var(--text);
  text-decoration: none;
  background:
    radial-gradient(90% 70% at 0% 0%, var(--tint-2), transparent 72%),
    var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s ease;
}

@media (hover: hover) {
  .diagnosis-card-link:hover {
    transform: translateY(-4px);
    border-color: var(--edge);
    box-shadow: var(--sh-2), 0 14px 30px -18px var(--glow-strong);
  }
}

.diagnosis-card-link:active {
  transform: translateY(0) scale(0.985);
  box-shadow: var(--sh-1);
}

.diagnosis-card-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  background: var(--color-accent);
  border-radius: 11px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.diagnosis-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.diagnosis-card-title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text);
}

.diagnosis-card-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-sub);
  text-wrap: pretty;
}

.diagnosis-card-start-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-ink);
}

.diagnosis-card-start-hint .arrow {
  display: inline-block;
  transition: transform 0.18s var(--ease);
}

@media (hover: hover) {
  .diagnosis-card-link:hover .arrow {
    transform: translateX(4px);
  }
}

.diagnosis-card-comingsoon {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  color: var(--text-sub);
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

.diagnosis-card-badge-soon {
  align-self: flex-start;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-sub);
  background: var(--track);
  border-radius: 999px;
}

/* タブレット: 2列（13診断は同格。特定の診断だけを大きくしない） */
@media (min-width: 768px) {
  body[data-page="list"] .diagnosis-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  body[data-page="list"] .diagnosis-card-link {
    min-height: 168px;
    padding: 18px 18px 14px;
  }
  body[data-page="list"] .diagnosis-card-title {
    font-size: 17px;
  }
}

/* PC: 3列。13件目だけ余ってもよい（埋めるために特定カードを巨大化しない） */
@media (min-width: 1024px) {
  body[data-page="list"] .diagnosis-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- スタート画面 ---------- */

.screen-start {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
}

.start-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 22px 26px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--tint-2), transparent 70%),
    var(--surface);
  border: 1.5px solid var(--edge);
  border-radius: 32px;
  box-shadow: var(--sh-2), 0 30px 60px -36px var(--glow-strong);
}

/* CSSだけの装飾（画像素材なし） */
.start-hero::before,
.start-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.start-hero::before {
  top: -60px;
  right: -50px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle at 30% 30%, var(--glow-strong), transparent 70%);
  opacity: 0.55;
}

.start-hero::after {
  bottom: -70px;
  left: -60px;
  width: 200px;
  height: 200px;
  border: 22px solid var(--tint-2);
  opacity: 0.7;
}

.start-hero > * {
  position: relative;
  z-index: 1;
}

.start-label {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1.5px solid var(--edge);
  border-radius: 999px;
  transform: rotate(-2deg);
}

.start-title {
  margin: 0 0 14px;
  font-size: clamp(38px, 12vw, 58px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.start-subcopy {
  max-width: 24em;
  margin: 0 0 28px;
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
}

.btn-start {
  max-width: 340px;
  min-height: 62px;
  font-size: 19px;
}

.start-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.start-meta li {
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.start-note {
  max-width: 26em;
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #85858b;
}

.start-back {
  align-self: center;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-decoration: none;
}

@media (hover: hover) {
  .start-back:hover {
    color: var(--text);
    text-decoration: underline;
  }
}

/* ---------- 質問画面 ---------- */

.screen-question {
  padding-top: 4px;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.progress-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
}

.q-badge {
  display: inline-block;
  padding: 3px 11px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent-ink);
  border-radius: 999px;
  transform: rotate(-2deg);
}

.btn-back {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

@media (hover: hover) {
  .btn-back:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
  }
}

.progress-bar {
  height: 10px;
  margin: 2px 0 14px;
  overflow: hidden;
  background: var(--track);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
  height: 100%;
  min-width: 10px;
  background: linear-gradient(90deg, var(--color-accent), var(--accent-ink));
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}

.question-card {
  position: relative;
  margin: 0 0 14px;
  padding: 22px 18px 22px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--tint-2), var(--surface) 78%);
  border: 1.5px solid var(--edge);
  border-radius: var(--r-xl);
}

.question-watermark {
  position: absolute;
  right: 10px;
  bottom: -30px;
  font-size: 128px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--color-accent) 11%, transparent);
  pointer-events: none;
  user-select: none;
}

.question-text {
  position: relative;
  margin: 0;
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px 14px 14px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 1px 0 rgba(23, 23, 26, 0.04), 0 8px 16px -10px rgba(23, 23, 26, 0.22);
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s ease,
    background 0.16s ease, opacity 0.2s ease;
}

.choice-key {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 900;
  color: var(--accent-ink);
  background: var(--tint-2);
  border-radius: 9px;
  transition: transform 0.18s var(--ease), background 0.16s ease, color 0.16s ease;
}

.choice-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .choice-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    box-shadow: 0 2px 0 var(--tint-2), 0 16px 26px -14px var(--glow-strong);
  }
}

.choice-card:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 1px 0 rgba(23, 23, 26, 0.04);
}

.choice-card-selected,
.choice-card-selected:hover {
  color: var(--text);
  background: var(--tint);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--tint-2);
}

.choice-card-selected .choice-key {
  color: #fff;
  background: var(--accent-ink);
  transform: scale(1.12);
}

.choice-list.is-locked .choice-card:not(.choice-card-selected) {
  opacity: 0.45;
}

/* ---------- 結果画面 ---------- */

.screen-result > * {
  animation: screen-in 0.28s var(--ease) both;
}
.screen-result > :nth-child(2) { animation-delay: 0.05s; }
.screen-result > :nth-child(3) { animation-delay: 0.09s; }
.screen-result > :nth-child(4) { animation-delay: 0.13s; }
.screen-result > :nth-child(n + 5) { animation-delay: 0.16s; }

/* 結果TOP = スクショ前提の1枚カード */
.result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
  padding: 22px 18px 20px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(110% 60% at 50% 0%, var(--tint-2), transparent 72%),
    var(--surface);
  border: 2px solid var(--edge);
  border-radius: 32px;
  box-shadow: var(--sh-2), 0 34px 64px -36px var(--glow-strong);
}

.result-card::before {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border: 26px solid var(--tint);
  border-radius: 50%;
  pointer-events: none;
}

.result-card > * {
  position: relative;
  z-index: 1;
}

.result-card-eyebrow {
  order: 1;
  margin: 0 0 10px;
  padding: 4px 13px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1.5px solid var(--edge);
  border-radius: 999px;
}

.result-rank-title {
  order: 2;
  margin: 0 0 4px;
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.005em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* h1: ラベル + 特大の % */
.result-score-heading {
  order: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0 0 6px;
}

.result-score-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-sub);
}

.result-score-value {
  font-size: clamp(92px, 30vw, 136px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  text-shadow: 0 5px 0 color-mix(in srgb, var(--color-accent) 24%, transparent);
  white-space: nowrap;
}

.result-score-unit {
  margin-left: 0.04em;
  font-size: 0.46em;
  letter-spacing: 0;
}

.result-gauge {
  order: 4;
  width: min(100%, 300px);
  height: 12px;
  margin: 2px 0 14px;
  overflow: hidden;
  background: var(--track);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.result-gauge-fill {
  width: 0;
  height: 100%;
  min-width: 12px;
  background: linear-gradient(90deg, var(--color-accent), var(--accent-ink));
  border-radius: 999px;
  transition: width 0.7s var(--ease) 0.15s;
}

.is-in .result-gauge-fill {
  width: var(--w);
}

.result-catch {
  order: 5;
  max-width: 22em;
  margin: 0 0 14px;
  font-size: clamp(15px, 4.2vw, 17px);
  font-weight: 800;
  line-height: 1.6;
  color: var(--text);
}

.axis-chip-row {
  order: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.axis-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1.5px solid var(--edge);
  border-radius: 999px;
}

.axis-chip-value {
  font-weight: 900;
}

.result-card-foot {
  order: 7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  width: 100%;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--edge);
}

.result-hashtag {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-ink);
}

.result-brand {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-sub);
}

/* ---------- 結果画面：説明 ---------- */

.result-body {
  margin: 0 0 22px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.85;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
}

.result-section {
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15.5px;
  font-weight: 900;
  color: var(--text);
}

.section-heading::before {
  content: "";
  flex: none;
  width: 5px;
  height: 1.05em;
  background: var(--color-accent);
  border-radius: 3px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 12px 14px 12px 40px;
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: var(--color-accent);
  border-radius: 7px;
}

.arukaru-list li::before {
  content: "”";
  font-size: 15px;
  padding-top: 5px;
  color: var(--accent-ink);
  background: var(--tint-2);
}

.status-section {
  padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
}

.status-row {
  margin-bottom: 14px;
}

.status-row:last-child {
  margin-bottom: 0;
}

.status-row-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.status-label {
  font-weight: 700;
  color: var(--text-sub);
}

.status-value {
  font-weight: 900;
  color: var(--accent-ink);
}

.status-bar {
  height: 10px;
  overflow: hidden;
  background: var(--track);
  border-radius: 999px;
}

.status-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--accent-ink));
  border-radius: 999px;
}

/* ---------- シェア（最優先CTA） ---------- */

.share-action-row {
  margin: 8px 0 30px;
  padding: 20px 16px 12px;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
}

.share-teaser {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--text);
}

.share-microcopy {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

/* ---------- 次の検査（続きがあるゲーム的カード。関連診断より強く、シェアより下） ---------- */

.next-diagnosis-section {
  position: relative;
  margin-bottom: 34px;
  padding: 20px 18px 18px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 100% 0%, var(--tint-2), transparent 70%),
    var(--tint);
  border: 2px solid var(--color-accent);
  border-radius: var(--r-xl);
  box-shadow: 0 6px 0 var(--edge);
}

/* 重なったカード = 「まだ続きがある」 */
.next-diagnosis-section::before,
.next-diagnosis-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14px;
  right: 14px;
  border: 2px solid var(--edge);
  border-radius: var(--r-xl);
  background: var(--surface);
}

.next-diagnosis-section::before {
  bottom: -14px;
  height: 30px;
}

.next-diagnosis-section::after {
  bottom: -22px;
  left: 28px;
  right: 28px;
  height: 30px;
  opacity: 0.6;
}

.next-diagnosis-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.next-flag {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--accent-ink);
  border-radius: 6px;
  transform: rotate(-3deg);
}

.next-steps {
  display: inline-flex;
  gap: 4px;
}

.next-steps i {
  width: 18px;
  height: 6px;
  background: var(--edge);
  border-radius: 999px;
}

.next-steps i:first-child {
  background: var(--accent-ink);
}

.next-diagnosis-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
}

.next-diagnosis-text {
  margin: 0 0 12px;
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1.6;
  color: var(--text);
}

.next-diagnosis-target-title {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1.5px solid var(--edge);
  border-radius: 999px;
}

.btn-next-diagnosis {
  min-height: 56px;
  color: #fff;
  background: var(--accent-ink);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent-ink) 62%, #000);
}

@media (hover: hover) {
  .btn-next-diagnosis:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 color-mix(in srgb, var(--accent-ink) 62%, #000);
  }
  .btn-next-diagnosis:active {
    transform: translateY(3px) scale(0.99);
  }
}

.btn-next-diagnosis:active {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent-ink) 62%, #000);
}

/* ---------- 関連診断（次の検査より弱く） ---------- */

.related-section {
  margin-top: 40px;
}

.related-section .section-heading {
  font-size: 14px;
  color: var(--text-sub);
}

.related-section .section-heading::before {
  background: var(--line-strong);
}

.related-card-list {
  grid-template-columns: 1fr;
  gap: 8px;
}

.diagnosis-card-small .diagnosis-card-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
  min-height: 0;
  padding: 12px 14px;
  background: var(--surface);
  border-width: 1px;
  border-radius: 16px;
  box-shadow: none;
}

.diagnosis-card-small .diagnosis-card-tile {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: none;
  opacity: 0.92;
}

.diagnosis-card-small .diagnosis-card-title {
  font-size: 14px;
}

.diagnosis-card-small .diagnosis-card-desc {
  font-size: 12px;
}

.diagnosis-card-small .diagnosis-card-start-hint {
  grid-column: 2;
  margin-top: 0;
  font-size: 11.5px;
}

@media (hover: hover) {
  .diagnosis-card-small .diagnosis-card-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-1);
  }
}

@media (min-width: 720px) {
  .related-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .diagnosis-card-small .diagnosis-card-link {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 14px;
  }
  .diagnosis-card-small .diagnosis-card-tile {
    grid-row: auto;
  }
  .diagnosis-card-small .diagnosis-card-start-hint {
    grid-column: 1;
  }
}

.all-diagnoses-row {
  margin: 14px 0 0;
  text-align: center;
}

.all-diagnoses-link {
  display: inline-block;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- PR（診断コンテンツと明確に分離・控えめ） ---------- */

.pr-section {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.pr-section-heading {
  justify-content: center;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
}

.pr-section-heading::before {
  display: none;
}

.pr-box {
  position: relative;
  padding: 20px 16px 16px;
  text-align: center;
  background: #f3f2ee;
  border-radius: var(--r-md);
}

.pr-badge {
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--text-sub);
  border-radius: 6px;
}

.pr-catch {
  margin: 2px 0 4px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.pr-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* ---------- 診断未公開ページ ---------- */

.screen-unavailable {
  padding-top: 16vh;
  text-align: center;
}

.unavailable-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.unavailable-text {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-sub);
}

.result-error-text {
  margin: 40px 0 20px;
  text-align: center;
  color: var(--text-sub);
}

/* ---------- アクセシビリティ ---------- */

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
}

/* ---------- レスポンシブ ---------- */

/* PC: 上部だけに寄らないよう、質問画面も縦方向の重心を少し下げる（引き伸ばしはしない） */
@media (min-width: 720px) {
  #app {
    padding-top: 32px;
  }
  .screen-question {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100dvh - 120px);
  }
  .question-card {
    padding: 30px 28px 30px;
  }
  .question-text {
    font-size: 26px;
  }
  .choice-card {
    padding: 16px 20px 16px 16px;
    font-size: 16px;
  }
  .start-hero {
    padding: 56px 40px 32px;
  }
  .result-card {
    padding: 28px 28px 24px;
  }
}

/* 広いPC: 中身を少し大きく（画面いっぱいには引き伸ばさない） */
@media (min-width: 1024px) {
  body:not([data-page="list"]) #app {
    max-width: 680px;
  }
  .question-text {
    font-size: 28px;
  }
  .choice-card {
    padding: 18px 22px 18px 18px;
    font-size: 17px;
  }
  .choice-key {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .start-title {
    font-size: 64px;
  }
}

@media (max-width: 360px) {
  #app {
    padding-left: 12px;
    padding-right: 12px;
  }
  .start-hero {
    padding: 38px 16px 22px;
  }
  .choice-card {
    padding: 12px 12px 12px 10px;
    gap: 10px;
    font-size: 15px;
  }
  .question-card {
    padding: 18px 14px;
  }
  .result-card {
    padding: 20px 12px 18px;
  }
  .diagnosis-card-link {
    padding: 12px 12px 10px;
  }
}
