/* 診断ページ（好きなタイプ診断・出会い方の診断）2026-11-22。home.css の色と部品の上に足す。
   アプリの画面と同じ：グレーの地・白い平らなカード・オレンジは要所だけ */
.quiz { padding: 24px 0 8px; }
.q-wrap { max-width: calc(560px + var(--gut) * 2); }
.q-wrap + .q-wrap { margin-top: 28px; }
[hidden] { display: none !important; }

/* ---------- はじめる ---------- */
.q-intro { padding: 28px 0 8px; }
/* 入口のイラスト（アプリの診断の入口と同じ絵。2026-11-26） */
.q-hero-box { display: flex; justify-content: center; align-items: flex-end; margin-bottom: 22px; padding: 22px 16px 0;
  border-radius: var(--r-md); background: var(--brand); overflow: hidden; }
.q-hero { display: block; width: 100%; max-width: 340px; height: auto; max-height: 260px; object-fit: contain; object-position: center bottom; }
.q-intro .label { margin-bottom: 8px; }
.q-title { font-size: clamp(32px, 7vw, 44px); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.q-lead { margin-top: 14px; color: #333; }
.q-start { margin-top: 26px; width: 100%; }
.q-note { margin-top: 14px; font-size: 13px; color: var(--mute); }
/* ---------- 進み具合・もどる ---------- */
.q-progress { margin-bottom: 16px; }
.q-progress .label { margin-bottom: 8px; }
.q-progress-bar { display: flex; gap: 4px; }
.q-progress-bar span { flex: 1; height: 5px; border-radius: 999px; background: var(--paper-deep); transition: background .25s ease; }
.q-progress-bar span.on { background: var(--brand); }
.q-back { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 44px; margin-top: 8px;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--mute); cursor: pointer; }
.q-back svg { width: 16px; height: 16px; }
.q-back.is-hidden { visibility: hidden; }

/* ---------- 好きなタイプ診断：カード ---------- */
.tq-stack { display: grid; padding-bottom: 22px; }
.tq-card {
  grid-area: 1 / 1; position: relative; padding: 24px 18px; border-radius: 26px; background: var(--surface);
  box-shadow: 0 4px 12px rgba(0,0,0,.08); transform-origin: 50% 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .45s cubic-bezier(.2,.8,.25,1), opacity .35s ease, visibility 0s linear 0s;
}
.tq-card::after { /* 引っぱっている側をほんのりオレンジに */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--pull, 0);
  background: linear-gradient(90deg, rgba(255,92,43,.22), rgba(255,92,43,0) 50%);
}
.tq-card[data-side="r"]::after { background: linear-gradient(270deg, rgba(255,92,43,.22), rgba(255,92,43,0) 50%); }
.tq-card.dragging { transition: none; cursor: grabbing; }
.tq-card[data-state="d0"] { z-index: 4; }
.tq-card[data-state="d1"] { z-index: 3; transform: translateY(11px) scale(.95); box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.tq-card[data-state="d2"] { z-index: 2; transform: translateY(22px) scale(.9); box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.tq-card[data-state="d3"] { z-index: 1; transform: translateY(22px) scale(.9); opacity: 0; visibility: hidden; transition-delay: 0s, 0s, .35s; }
.tq-card[data-state="d1"] > *, .tq-card[data-state="d2"] > *, .tq-card[data-state="d3"] > * { visibility: hidden; }
.tq-card[data-state="gone-l"], .tq-card[data-state="gone-r"] { z-index: 5; visibility: hidden; pointer-events: none; transition-delay: 0s, 0s, .45s; }
.tq-card[data-state="gone-l"] { transform: translate(calc(-100% - 160px), 40px) rotate(-16deg); }
.tq-card[data-state="gone-r"] { transform: translate(calc(100% + 160px), 40px) rotate(16deg); }

.tq-q { font-size: 13px; font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.tq-text { font-size: 26px; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; outline: none; }
.tq-sides { display: flex; gap: 16px; margin-top: 36px; font-size: 17px; font-weight: 700; line-height: 1.45; }
.tq-sides span { flex: 1; transition: color .15s; }
.tq-sides .r { text-align: right; }
.tq-sides .on { color: var(--brand); }
.tq-dots { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 14px; }
.tq-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tq-dot .c { display: grid; place-items: center; width: 40px; height: 40px; margin: 12px 0; border-radius: 50%;
  background: rgba(255,92,43,.08); box-shadow: inset 0 0 0 2.5px rgba(255,92,43,.55); color: #fff; transition: background .15s, box-shadow .15s, transform .15s; }
.tq-dot.big .c { width: 58px; height: 58px; margin: 3px 0; }
.tq-dot .c svg { width: 15px; height: 15px; opacity: 0; transition: opacity .12s; }
.tq-dot.big .c svg { width: 21px; height: 21px; }
.tq-dot .cap { font-size: 12px; font-weight: 600; color: var(--mute); }
.tq-dot:hover .c { background: rgba(255,92,43,.16); }
.tq-dot.sel .c, .tq-dot.pre .c { background: var(--brand); box-shadow: inset 0 0 0 2.5px var(--brand); }
.tq-dot.sel .c svg, .tq-dot.pre .c svg { opacity: 1; }
.tq-dot.pre .c { transform: scale(1.1); }
.tq-dot.sel .cap, .tq-dot.pre .cap { color: var(--brand); }
.tq-dot:focus-visible { outline: none; }
.tq-dot:focus-visible .c { outline: 2px solid var(--ink); outline-offset: 3px; }
.tq-stamp { position: absolute; top: 14px; left: 50%; transform: translateX(-50%) scale(.7); opacity: 0; padding: 4px 14px; border-radius: 999px;
  border: 2px solid var(--brand); background: rgba(255,92,43,.12); color: var(--brand); font-size: 14px; font-weight: 800; white-space: nowrap; transition: opacity .18s, transform .18s; }
.tq-stamp.on { opacity: 1; transform: translateX(-50%) scale(1); }
.tq-stamp.strong { background: var(--brand); color: #fff; }

/* ---------- 結果（共通） ---------- */
.q-result { display: grid; gap: 14px; }
.q-panel { padding: 18px; border-radius: 24px; background: var(--surface); }
.q-summary { font-size: 15px; line-height: 1.7; }
.q-summary + .q-row { margin-top: 14px; }
.q-row { display: flex; gap: 12px; align-items: flex-start; }
.q-row + .q-row { margin-top: 12px; }
.q-row-ico { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--brand); }
.q-row-ico svg, .q-row-ico img { width: 22px; height: 22px; object-fit: contain; }
.q-row-label { font-size: 12px; font-weight: 600; color: var(--mute); line-height: 1.5; }
.q-row-value { font-size: 15px; font-weight: 700; line-height: 1.55; }
.q-kicker { font-size: 13px; font-weight: 700; color: var(--brand); }
.q-actions { display: grid; gap: 14px; }
.q-wide { width: 100%; }
.btn svg { width: 19px; height: 19px; }
.q-share { display: grid; gap: 10px; }
.q-share-alt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.q-share-link { display: flex; align-items: center; justify-content: center; height: 46px; border: 0; border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; cursor: pointer; }
.q-share-msg { min-height: 1em; font-size: 13px; font-weight: 700; color: var(--green); text-align: center; }
.q-share-msg:empty { display: none; }
/* 押せる行はやわらかい影（アプリと同じ：影＝押せる） */
.q-link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: 24px; background: var(--surface);
  box-shadow: var(--soft); font-size: 15px; font-weight: 600; text-decoration: none; }
.q-link-row::after { content: "›"; font-size: 22px; line-height: 1; color: #B5B5B3; }
.q-retake { min-height: 44px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }

/* ---------- 好きなタイプ診断：結果 ---------- */
.tq-hero { padding: 22px; border-radius: 24px; background: #FFF1EB; color: var(--ink); }
.tq-art { position: relative; display: block; width: 100%; height: 220px; margin: 10px 0 4px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tq-hero > .tq-art:first-child, .tq-hero > div.tq-art { cursor: default; }
.tq-art img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; }
.tq-art.is-bounce img { animation: tq-bounce .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes tq-bounce { 0% { transform: scale(1); } 20% { transform: scale(1.12); } 45% { transform: scale(.97); } 100% { transform: scale(1); } }
.tq-bubble { position: absolute; right: 2px; top: -18px; padding: 9px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 3px 8px rgba(0,0,0,.12);
  font-size: 15px; font-weight: 700; white-space: nowrap; opacity: 0; transform: scale(.5); transform-origin: 0 100%; transition: opacity .25s, transform .32s cubic-bezier(.3,1.5,.5,1); pointer-events: none; }
.tq-bubble::after { content: ""; position: absolute; left: 18px; bottom: -9px; border: 7px solid transparent; border-top: 10px solid var(--surface); border-bottom: 0; }
.tq-art.is-talking .tq-bubble { opacity: 1; transform: none; }
.tq-name { font-size: 30px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; outline: none; }
.tq-catch { margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--mute); }
.tq-headline { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; color: var(--brand); }
.tq-headline .n { font-size: 14px; font-weight: 700; }
.tq-headline b { font-size: 46px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.tq-headline .pct { font-size: 20px; font-weight: 800; margin-left: -4px; }
.tq-bars { display: grid; gap: 12px; }
.tq-bar-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.tq-track { position: relative; height: 14px; border-radius: 999px; background: var(--paper-deep); }
.tq-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; background: rgba(107,107,105,.35); }
.tq-knob { position: absolute; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--brand); }
.tq-ends { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--mute); line-height: 1.4; }
.tq-ends .on { font-size: 13px; font-weight: 800; color: var(--brand); }

/* ---------- 出会い方の診断 ---------- */
.q-question { font-size: 28px; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; outline: none; }
.q-sub { margin: -12px 0 16px; font-size: 14px; color: var(--mute); }
.ms-choices { display: grid; gap: 10px; }
.ms-choice { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px transparent; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer;
  transition: box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.ms-choice > span:first-of-type { flex: 1; }
.ms-choice:active { transform: scale(.985); }
.ms-choice.sel { box-shadow: inset 0 0 0 1.5px var(--brand); }
.ms-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ms-check { display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; }
.ms-check svg, .ms-box svg { width: 13px; height: 13px; }
.ms-choice.sel .ms-check { display: grid; }
.ms-place { min-height: 60px; gap: 14px; }
.ms-place img { width: 30px; height: 30px; object-fit: contain; }
.ms-box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(107,107,105,.45); color: transparent; }
.ms-choice.sel .ms-box { background: var(--brand); box-shadow: none; color: #fff; }
.ms-finish { margin-top: 12px; }
.ms-finish:disabled { opacity: .4; cursor: default; filter: none; transform: none; }
.ms-screen.enter-next { animation: ms-in-next .32s cubic-bezier(.2,.8,.25,1); }
.ms-screen.enter-back { animation: ms-in-back .32s cubic-bezier(.2,.8,.25,1); }
@keyframes ms-in-next { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes ms-in-back { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

.ms-hero { padding: 22px; border-radius: 24px; background: var(--brand); color: #fff; }
.ms-kicker { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); }
.ms-big { display: flex; align-items: baseline; gap: 2px; line-height: 1.05; }
.ms-big b { font-size: 72px; font-weight: 800; letter-spacing: -.03em; }
.ms-big span { font-size: 30px; font-weight: 800; }
.ms-level { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.92); margin-bottom: 8px; }
.ms-name { font-size: 30px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; outline: none; }
.ms-tagline { margin-top: 2px; font-size: 14px; font-weight: 700; color: rgba(255,255,255,.92); }
.ms-summary { margin-top: 4px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.92); line-height: 1.65; }
.ms-hero > .ms-kicker + .ms-name { margin-top: 6px; }
.ms-bars { display: grid; gap: 12px; }
.ms-bar-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.ms-bar-head b { color: var(--brand); font-weight: 800; }
.ms-track { height: 8px; margin-top: 5px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.ms-track span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.ms-ends { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--mute); }

/* 質問に答えているあいだは、アプリの案内を出さない（気が散らないように） */
body:has(#stage:not([hidden])) .q-cta { display: none; }

/* ---------- アプリの案内（トップのダウンロードと同じ淡いオレンジのカード） ---------- */
.q-cta { margin-top: 12px; padding: 26px 22px; border-radius: var(--r-md); background: var(--banner); color: var(--banner-ink); box-shadow: var(--soft); }
.q-cta-icon { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 6px 16px rgba(74,18,6,.18); margin-bottom: 14px; }
.q-cta-title { font-size: 24px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.q-cta-text { margin: 8px 0 18px; font-size: 14px; color: var(--banner-mute); line-height: 1.7; }
.q-cta .store-row img { height: 44px; }
.q-cta-note { margin-top: 12px; font-size: 12px; color: var(--banner-mute); }

@media (max-width: 760px) {
  /* 小さい画面でも 診断 2つのリンクは出す（文字を小さく） */
  .nav.nav-doc { display: flex; margin: 0 0 0 auto; padding: 3px; }
  .nav.nav-doc a { padding: 5px 9px; font-size: 11px; }
  .nav.nav-doc + .btn-small { display: none; }
}
@media (max-width: 400px) {
  .tq-text, .q-question { font-size: 23px; }
  .tq-sides { font-size: 15px; }
  .tq-dot { width: 56px; }
  .tq-name, .ms-name { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .tq-card { transition: opacity .25s ease, visibility 0s linear 0s; }
  .tq-card[data-state] { transform: none !important; }
  .tq-card[data-state="d1"], .tq-card[data-state="d2"] { opacity: 0; visibility: hidden; }
  .tq-card[data-state="gone-l"], .tq-card[data-state="gone-r"] { opacity: 0; transition-delay: 0s, .25s; }
  .tq-stack { padding-bottom: 0; }
  .ms-screen.enter-next, .ms-screen.enter-back { animation: none; }
  .tq-art.is-bounce img { animation: none; }
  .q-progress-bar span, .tq-bubble { transition: none; }
}

/* シェア：X と Instagram を並べる（2026-11-22） */
.q-share-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-share-main .btn { width: 100%; gap: 8px; text-decoration: none; }
.q-share-x { background: var(--ink); }
.q-share-ig { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); border: 0; }
.q-share-main:has(> :only-child) { grid-template-columns: 1fr; }
.q-share-alt:not(:has([data-save])) { grid-template-columns: repeat(2, 1fr); }

/* アプリの案内：濃いオレンジの地に腕組みのソウタ（2026-11-22） */
.q-cta { background: var(--brand); color: #fff; position: relative; overflow: hidden; }
.q-cta-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: -8px -6px 0 0; }
.q-cta-icon { box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(74,18,6,.25); }
.q-cta-title { color: #fff; font-size: 26px; }
.q-cta-souta { flex: none; width: 150px; margin-bottom: -6px; filter: drop-shadow(0 8px 14px rgba(74,18,6,.2)); }
.q-cta-text, .q-cta-note { color: rgba(255,255,255,.92); }
@media (max-width: 360px) { .q-cta-souta { width: 120px; } }
