/* tw-style:quiz_friendly@1 kind:diagnosis｜親しみやすく、迷わず進める（運営の型＝色・書体・余白の約束。作品の styles.css の頭にこの印ごと写して var(--tw-…) で使う） */
:root {
  --tw-bg: #f4f7fb; --tw-surface: #ffffff; --tw-text: #1d2733; --tw-muted: #576474;
  --tw-primary: #1d6fa5; --tw-on-primary: #ffffff; --tw-accent: #c8562a; --tw-line: #dbe3ec;
  --tw-font-heading: "Hiragino Maru Gothic ProN","Zen Maru Gothic","M PLUS Rounded 1c","Hiragino Sans","Yu Gothic","Noto Sans JP",sans-serif;
  --tw-font-body: "Hiragino Maru Gothic ProN","Zen Maru Gothic","M PLUS Rounded 1c","Hiragino Sans","Yu Gothic","Noto Sans JP",sans-serif;
  --tw-weight-heading: 800; --tw-weight-body: 500;
  --tw-fs-small: 14px; --tw-fs-body: 17px; --tw-fs-lead: 19px; --tw-fs-h3: 21px;
  --tw-fs-h2: clamp(25px, calc(25px + 8 * (100vw - 390px) / 1050), 33px); --tw-fs-h1: clamp(30px, calc(30px + 22 * (100vw - 390px) / 1050), 52px);
  --tw-lh-body: 1.75; --tw-lh-heading: 1.35;
  --tw-space-1: 4px; --tw-space-2: 8px; --tw-space-3: 12px; --tw-space-4: 16px; --tw-space-5: 24px; --tw-space-6: 32px; --tw-space-7: 48px; --tw-space-8: 64px;
  --tw-section: 80px; --tw-max: 720px; --tw-radius: 16px; --tw-shadow: 0 8px 28px rgba(0,0,0,.08);
}
@media (max-width: 767px) { :root { --tw-section: 48px; } }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tw-bg); color: var(--tw-text); font-family: var(--tw-font-body); font-weight: var(--tw-weight-body); font-size: var(--tw-fs-body); line-height: var(--tw-lh-body); letter-spacing: .02em; }
h1, h2, h3 { font-family: var(--tw-font-heading); font-weight: var(--tw-weight-heading); line-height: var(--tw-lh-heading); letter-spacing: .02em; font-feature-settings: "palt"; word-break: auto-phrase; line-break: strict; text-wrap: balance; }
p, li, dd { line-break: strict; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--tw-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ===== ここから作品（白地・落ち着いた青・目立つ色は LINE のボタンだけ） ===== */
:root {
  --page: #ffffff;
  --soft: var(--tw-bg);
  --primary-dark: #175a87;
  --pick: #eef5fb;
  --mark: rgba(29, 111, 165, .17);
  --line-green: #06a64a;          /* LINE の緑より少し濃く＝白い太字が読める濃さ */
  --line-green-hover: #05963f;
  --line-green-press: #048438;
  --head-h: 57px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); }
body {
  background: var(--page);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1 0 auto; overflow-x: hidden; overflow-x: clip; }
button { font: inherit; color: inherit; }
a { color: var(--tw-primary); text-underline-offset: .22em; }
svg { flex-shrink: 0; }
h4 { font-family: var(--tw-font-heading); font-weight: var(--tw-weight-heading); line-height: var(--tw-lh-heading); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap {
  width: 100%; max-width: var(--tw-max); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.nw { display: inline-block; max-width: 100%; }  /* 言葉の切れ目でだけ折り返す */
.noscript { padding-top: 24px; padding-bottom: 24px; font-weight: 700; }
[hidden] { display: none !important; }

/* ヘッダー */
.site-head { padding-top: env(safe-area-inset-top); background: var(--page); border-bottom: 1px solid var(--tw-line); }
.site-head .wrap { display: flex; align-items: center; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-family: var(--tw-font-heading); font-weight: 800; font-size: 16px; letter-spacing: .06em; }
.brand svg { width: 28px; height: 28px; color: var(--tw-primary); }

/* ボタンの共通 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 2px solid var(--tw-primary); border-radius: var(--tw-radius);
  background: var(--tw-primary); color: var(--tw-on-primary);
  font-family: var(--tw-font-heading); font-weight: 800; font-size: 18px; letter-spacing: .06em;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
  -webkit-user-select: none; user-select: none;
}
.btn svg { width: 22px; height: 22px; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--page); color: var(--tw-primary); }
@media (hover: hover) {
  .btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
  .btn-ghost:hover { background: var(--pick); color: var(--primary-dark); border-color: var(--primary-dark); }
}

/* ===== スタート ===== */
.start {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  min-height: clamp(540px, calc(100vh - var(--head-h)), 860px);
  min-height: clamp(540px, calc(100svh - var(--head-h)), 860px);
  padding-top: 24px; padding-bottom: 40px;
}
.start-illust { display: block; width: min(300px, 82%); height: auto; aspect-ratio: 320 / 190; margin: 0 auto 18px; }
.start h1 { margin: 0; font-size: var(--tw-fs-h1); }
.start-sub { margin: 12px 0 0; font-family: var(--tw-font-heading); font-weight: 700; font-size: var(--tw-fs-lead); line-height: 1.6; color: var(--tw-muted); }
.facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 22px 0 0; padding: 0; color: var(--tw-text); font-size: 15px; font-weight: 700; }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 20px; height: 20px; color: var(--tw-primary); }
.btn-start { width: min(100%, 360px); min-height: 62px; margin-top: 28px; font-size: 19px; box-shadow: 0 8px 20px rgba(29, 111, 165, .22); }
.start-note { margin: 16px 0 0; font-size: 16px; color: var(--tw-muted); }

/* ===== 質問 ===== */
.quiz { padding-top: 20px; padding-bottom: 48px; }
.q-card { max-width: 640px; margin: 0 auto; }
.q-top { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.prog { flex: 1 1 auto; height: 8px; border-radius: 99px; background: var(--tw-line); overflow: hidden; }
.prog span { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--tw-primary); transition: width .3s ease; }
.count { flex: 0 0 auto; margin: 0; font-family: var(--tw-font-heading); font-weight: 800; font-size: 16px; color: var(--tw-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.count b { font-size: 22px; color: var(--tw-primary); }
.q-stage { padding-top: 22px; }
.q-stage.in-r { animation: slide-in-r .25s ease-out both; }
.q-stage.in-l { animation: slide-in-l .25s ease-out both; }
@keyframes slide-in-r { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-l { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.q-tag { display: inline-block; margin: 0 0 10px; padding: 3px 12px; border-radius: 99px; background: var(--soft); color: var(--tw-primary); font-family: var(--tw-font-heading); font-weight: 800; font-size: 14px; letter-spacing: .06em; }
.q-lead { margin: 0 0 8px; font-size: 16px; color: var(--tw-muted); }
.q-text { margin: 0; font-size: clamp(21px, calc(21px + 5 * (100vw - 390px) / 1050), 26px); line-height: 1.5; outline: none; }
.q-note { margin: 8px 0 0; font-size: 16px; color: var(--tw-muted); }
.opts { display: grid; gap: 12px; margin-top: 22px; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 60px; padding: 12px 16px 12px 14px;
  border: 1.5px solid var(--tw-line); border-radius: var(--tw-radius);
  background: var(--page); color: var(--tw-text);
  text-align: left; font-size: 17px; font-weight: 600; line-height: 1.5; letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(29, 39, 51, .05);
  cursor: pointer; touch-action: manipulation;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .1s;
}
.opt-key {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--soft); color: var(--tw-primary);
  font-family: var(--tw-font-heading); font-weight: 800; font-size: 15px;
  transition: background-color .15s, color .15s;
}
.opt-label { flex: 1 1 auto; min-width: 0; word-break: auto-phrase; }
.opt:active { transform: scale(.985); }
.opt.is-selected { border-color: var(--tw-primary); background: var(--pick); }
.opt.is-selected .opt-key { background: var(--tw-primary); color: var(--tw-on-primary); }
@media (hover: hover) {
  .opt:hover { border-color: #8fb3d3; box-shadow: 0 4px 14px rgba(29, 111, 165, .1); }
  .opt.is-selected:hover { border-color: var(--tw-primary); }
}
.kbd-hint { display: none; margin: 14px 0 0; font-size: 14px; color: var(--tw-muted); }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: block; } }
.q-bottom { margin-top: 22px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 18px 0 10px;
  border: 0; border-radius: 12px; background: transparent; color: var(--tw-muted);
  font-weight: 700; font-size: 16px; cursor: pointer; touch-action: manipulation;
}
.btn-back svg { width: 20px; height: 20px; }
@media (hover: hover) { .btn-back:hover { background: var(--soft); color: var(--tw-text); } }

/* ===== 結果 ===== */
.result { padding-top: 22px; padding-bottom: 48px; }
.r-main {
  --type: var(--tw-primary);
  margin: 0; padding: 26px 20px 24px;
  border: 1px solid var(--tw-line); border-top: 5px solid var(--type);
  border-radius: var(--tw-radius); background: var(--page); box-shadow: var(--tw-shadow);
  text-align: center;
  animation: rise .35s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.r-label { margin: 0; font-family: var(--tw-font-heading); font-weight: 800; font-size: 14px; letter-spacing: .12em; color: var(--tw-muted); }
.r-illust { display: block; width: 104px; height: 104px; margin: 12px auto 8px; color: var(--type); }
.r-lead { margin: 0; font-family: var(--tw-font-heading); font-weight: 700; font-size: 16px; color: var(--tw-muted); }
.r-name { margin: 6px 0 0; font-size: clamp(25px, 7vw, 40px); line-height: 1.32; outline: none; }
.r-name .r-name-sub { display: block; margin-top: 4px; font-size: .56em; color: var(--tw-muted); }
.r-why { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--tw-line); text-align: left; }
.r-why p { margin: 0 0 .7em; word-break: auto-phrase; } .r-why p:last-child { margin-bottom: 0; }
.r-why mark { padding: 0 1px; background: linear-gradient(transparent 58%, var(--mark) 58%); color: inherit; font-weight: 700; }

.r-sec { margin-top: 32px; }
.r-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: var(--tw-fs-h3); }
.r-sec h3 svg { width: 36px; height: 36px; padding: 7px; border-radius: 11px; background: var(--soft); color: var(--tw-primary); }
.r-body p { margin: 0 0 .8em; } .r-body p:last-child { margin-bottom: 0; }
.r-pit { padding: 20px 20px 20px 18px; border-left: 4px solid var(--tw-accent); border-radius: 0 var(--tw-radius) var(--tw-radius) 0; background: #fbf5f1; }
.r-pit h3 svg { background: var(--page); color: var(--tw-accent); }
.r-step { padding: 20px; border-radius: var(--tw-radius); background: var(--soft); }
.r-step h3 svg { background: var(--page); }
.r-ref { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--tw-line); font-size: 16px; }
.r-ref a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; }
.r-ref svg { width: 18px; height: 18px; }

.r-extra { margin-top: 24px; padding: 20px; border: 1.5px solid var(--tw-line); border-radius: var(--tw-radius); background: var(--page); }
.r-extra h3 { margin: 0 0 10px; font-size: 19px; }
.r-extra p { margin: 0 0 .7em; } .r-extra p:last-child { margin-bottom: 0; }
.sq { position: relative; padding-left: 22px; }
.sq::before { content: ""; position: absolute; left: 0; top: .42em; width: 13px; height: 13px; border-radius: 3px; background: var(--tw-primary); }

/* LINE への誘導 */
.r-line { margin-top: 40px; padding: 26px 20px 24px; border: 2px solid var(--tw-line); border-radius: 20px; background: var(--page); box-shadow: var(--tw-shadow); scroll-margin-top: 16px; }
.r-line h3 { margin: 0; font-size: 18px; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 10px 0 16px; }
.code { margin: 0; font-family: var(--tw-font-heading); font-weight: 800; font-size: clamp(42px, 12vw, 58px); line-height: 1.1; letter-spacing: .06em; font-variant-numeric: tabular-nums; -webkit-user-select: all; user-select: all; }
.btn-copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 168px; min-height: 48px; padding: 0 18px;
  border: 2px solid var(--tw-primary); border-radius: 12px;
  background: var(--page); color: var(--tw-primary);
  font-weight: 800; font-size: 16px; cursor: pointer; touch-action: manipulation;
  transition: background-color .15s, color .15s;
}
.btn-copy svg { width: 20px; height: 20px; }
.btn-copy.is-done { background: var(--tw-primary); color: var(--tw-on-primary); }
@media (hover: hover) { .btn-copy:hover { background: var(--pick); } .btn-copy.is-done:hover { background: var(--tw-primary); } }
.copy-msg { margin: -4px 0 16px; font-size: 16px; font-weight: 700; color: var(--tw-primary); }
.copy-msg:empty { display: none; }
.line-text { margin: 0 0 1em; word-break: auto-phrase; }
.line-text strong { font-weight: 800; }
.tri { position: relative; margin: 22px 0 10px; padding-left: 22px; font-size: 18px; }
.tri::before { content: ""; position: absolute; left: 1px; top: .5em; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid var(--tw-primary); }
.how { list-style: none; counter-reset: how; display: grid; gap: 10px; margin: 0 0 24px; padding: 0; }
.how li { counter-increment: how; position: relative; min-height: 30px; padding-left: 42px; font-weight: 700; }
.how li::before {
  content: counter(how);
  position: absolute; left: 0; top: -1px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--soft); color: var(--tw-primary);
  font-family: var(--tw-font-heading); font-weight: 800; font-size: 15px;
}
.how strong { font-weight: 800; letter-spacing: .04em; }
.btn-line {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 64px; padding: 12px 20px;
  border-radius: var(--tw-radius); background: var(--line-green); color: #fff;
  font-family: var(--tw-font-heading); font-weight: 800; font-size: 20px; letter-spacing: .05em; line-height: 1.3;
  text-decoration: none; box-shadow: 0 8px 20px rgba(6, 166, 74, .28);
  transition: background-color .15s, transform .1s;
  touch-action: manipulation;
}
.btn-line svg { width: 22px; height: 22px; }
@media (hover: hover) { .btn-line:hover { background: var(--line-green-hover); } }
.btn-line:active { background: var(--line-green-press); transform: translateY(1px); }
.line-note { margin: 10px 0 0; text-align: center; font-size: 16px; color: var(--tw-muted); }

.r-after { margin-top: 28px; text-align: center; }
.r-after .btn { min-width: min(100%, 280px); }

/* 結果ごとの色（絵と上の線だけ） */
.t01 { --type: #2a8577; } .t02 { --type: #2c6e9e; } .t03 { --type: #3a6aa3; } .t04 { --type: #a87316; }
.t05 { --type: #5b8a35; } .t06 { --type: #55708f; } .t07 { --type: #a0573f; } .t08 { --type: #8a6534; }
.t09 { --type: #2b84a3; } .t10 { --type: #76634f; } .t11 { --type: #3f8a68; } .t12 { --type: #b5731a; }
.t13 { --type: #c7860e; }

/* フッター */
.site-foot { margin-top: auto; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--tw-line); background: var(--soft); color: var(--tw-muted); font-size: 16px; line-height: 1.75; }
.site-foot p { margin: 0 0 .6em; } .site-foot p:last-child { margin-bottom: 0; }

/* パソコン */
@media (min-width: 768px) {
  .start-illust { width: 340px; margin-bottom: 22px; }
  .quiz { padding-top: 40px; padding-bottom: 72px; }
  .q-stage { padding-top: 28px; }
  .result { padding-top: 40px; padding-bottom: 72px; }
  .r-main { padding: 36px 44px 32px; }
  .r-illust { width: 120px; height: 120px; }
  .r-sec { margin-top: 40px; }
  .r-pit, .r-step { padding: 24px 28px; }
  .r-extra { padding: 24px 28px; }
  .r-line { padding: 34px 40px 30px; }
  .btn-line { max-width: 460px; margin: 0 auto; }
}
