/* 香り診断（2026-11-10 改修版M）。shindan-v2.css の後に読む。
   部品はすべて .qa- の名前にして、本番の .quiz- の見た目と混ざらないようにした */

.qa-page { --us: 1vh; }
@supports (height: 1svh) { .qa-page { --us: 1svh; } }

/* ---------- 地の色（Q1の答えで変わる） ---------- */
.qa-stage {
  --qa-bg: #f3eee4; --qa-ink: #2b2723; --qa-sub: #5c534a; --qa-line: #d8cdb9;
  --qa-field: #ebe3d4; --qa-accent: #a03e28;
}
.qa-stage[data-theme="asa"] { --qa-bg: #f8f2e5; --qa-field: #efe5cf; --qa-line: #e0d3b6; }
.qa-stage[data-theme="hiru"] { --qa-bg: #eeefe9; --qa-field: #dfe2d8; --qa-line: #cfd2c6; --qa-sub: #50544c; }
.qa-stage[data-theme="kyu"] { --qa-bg: #f0e5d1; --qa-field: #e5d4b6; --qa-line: #d6c3a1; --qa-sub: #5a4f42; }
.qa-stage[data-theme="yoru"] { --qa-bg: #1f1c1a; --qa-ink: #efe7da; --qa-sub: #c4baab; --qa-line: #4a433c; --qa-field: #2c2824; --qa-accent: #e39274; }
.qa-stage[data-scene="pause"] { --qa-bg: #1c1a18; --qa-ink: #efe7da; --qa-sub: #b9afa1; --qa-line: #4a433c; --qa-accent: #e39274; }
.qa-stage .sd-main { background: var(--qa-bg); color: var(--qa-ink); transition: background-color 0.6s ease, color 0.6s ease; }
.qa-wrap { max-width: 640px; margin: 0 auto; }
.qa-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qa-h1 { font-family: var(--font-min); font-weight: 500; font-size: 1.4rem; }

/* 診断中は専用の場にする（下の説明・パンくず・フッターを隠し、画面いっぱいに） */
body.qa-focus .sx-crumb, body.qa-focus .sd-sec, body.qa-focus .site-foot { display: none; }
body.qa-focus .qa-stage .sd-main { min-height: calc(var(--us) * 100 - 62px); }

@media (max-width: 959px) {
  .qa-stage .sd-aside { display: none; }
  .qa-stage .sd-main { padding: 0.9rem 20px 2.4rem; }
  body.qa-res .sx-crumb { display: none; }
}

/* ---------- 進み具合：答えの言葉が残っていく ---------- */
.qa-trail { list-style: none; display: flex; justify-content: flex-start; align-items: center; flex-wrap: nowrap; margin: 0 0 1rem; padding: 0; min-height: 28px; font-family: var(--font-min); font-size: 0.84rem; letter-spacing: 0.06em; color: var(--qa-sub); }
.qa-trail li { display: flex; align-items: center; white-space: nowrap; }
.qa-trail li + li::before { content: ""; width: 12px; height: 1px; background: var(--qa-line); margin: 0 6px; flex: none; }
.qa-trail .is-done { color: var(--qa-ink); }
.qa-trail .is-new { animation: qaInk 0.6s ease both; }
.qa-trail.is-kept .is-new, .qa-trail .is-landed { animation: none; }
.qa-trail .is-wait { opacity: 0; }
.qa-trail .is-now { color: var(--qa-accent); }
.qa-trail .is-next span { display: block; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--qa-sub); opacity: 0.7; }
.qa-trail.is-result { justify-content: flex-start; margin: 0 0 0.8rem; font-size: 0.82rem; }
@keyframes qaInk { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---------- 問い（共通） ---------- */
@keyframes qaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qa-q { font-family: var(--font-min); font-weight: 500; font-size: clamp(1.3rem, 5.4vw, 1.8rem); line-height: 1.6; letter-spacing: 0.06em; margin: 0 0 1.1rem; color: var(--qa-ink); word-break: auto-phrase; text-wrap: balance; line-break: strict; }
.qa-q-kicker { margin: 0.2rem 0 0.2rem; font-family: var(--font-min); font-size: 0.95rem; letter-spacing: 0.14em; color: var(--qa-accent); }
.qa-opts { display: grid; }
.qa-opt { position: relative; display: flex; flex-direction: column; align-items: stretch; min-height: 44px; padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: 0; cursor: pointer; transition: opacity 0.36s ease; -webkit-tap-highlight-color: transparent; }
.qa-opt:focus-visible { outline: 2px solid var(--qa-accent); outline-offset: 3px; }
.qa-opts.has-pick .qa-opt:not(.is-picked) { opacity: 0.28; }
.qa-opt-t { display: block; font-family: var(--font-min); font-size: 0.98rem; line-height: 1.55; letter-spacing: 0.03em; }
.qa-opt small { display: block; margin-top: 0.2rem; font-size: 0.74rem; line-height: 1.65; color: var(--qa-sub); }
.qa-opt-t, .qa-opt small, .qa-why, .qa-card-txt, .qa-rx, .qa-rx-s, .qa-voice p, .qa-line .quiz-line-body, .qa-line .quiz-line-note, .qa-note, .qa-pause-text p, .qa-pick-catch { word-break: auto-phrase; text-wrap: pretty; line-break: strict; }
.qa-opt.is-picked .qa-opt-t, .qa-opt.is-picked .qa-strip-k { color: var(--qa-accent); }
.qa-opt.was-picked .qa-opt-t::after, .qa-opt.was-picked .qa-strip-k::after { content: "・前回"; font-family: var(--font-goth); font-size: 0.68rem; color: var(--qa-accent); }

.qa-back { display: inline-block; min-height: 44px; margin-top: 0.8rem; padding: 0.6rem 0; font: inherit; font-size: 0.86rem; color: var(--qa-sub); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.3em; }
.qa-last { margin: 0.6rem 0 0; font-size: 0.86rem; }
.qa-last a { display: inline-block; padding: 0.7rem 0; color: var(--qa-sub); text-underline-offset: 0.3em; }

/* ---------- 問一：砂紋の帯＋縦長の写真4枚（下書きB） ---------- */
.qa-q1-band { position: relative; margin: -0.9rem -20px 0.9rem; padding: 1.15rem 20px 1.05rem; background: url(../images/web/hero-karesansui-sp.webp) 50% 62% / cover no-repeat; }
.qa-q1-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(243, 238, 228, 0.92), rgba(243, 238, 228, 0.78) 60%, rgba(243, 238, 228, 0.25)); }
.qa-q1-band > * { position: relative; }
.qa-q1-title { margin: 0 0 0.45rem; font-family: var(--font-min); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.1em; color: var(--qa-sub); }
.qa-q1-title span { margin-left: 0.8em; font-family: var(--font-goth); font-size: 0.74rem; letter-spacing: 0.06em; }
.qa-q1-band .qa-q { margin: 0; font-size: clamp(1.45rem, 6.4vw, 2rem); letter-spacing: 0.08em; }
.qa-strips { display: flex; gap: 8px; }
.qa-strip { flex: 1 1 0; min-width: 0; align-items: center; }
.qa-strip-img { position: relative; display: block; width: 100%; height: clamp(220px, calc(var(--us) * 34), 300px); background-size: cover; transition: box-shadow 0.4s ease; }
.qa-strip-k { margin: 0.75rem 0 0.5rem; font-family: var(--font-min); font-size: 1.45rem; line-height: 1; letter-spacing: 0.04em; white-space: nowrap; }
.qa-strip-t { writing-mode: vertical-rl; font-family: var(--font-min); font-size: 0.84rem; letter-spacing: 0.16em; line-height: 1.4; color: var(--qa-sub); min-height: 8.6em; }
@media (hover: hover) { .qa-strip:hover .qa-strip-img { box-shadow: 0 10px 24px -14px rgba(43, 39, 35, 0.6); } }


/* ---------- 問二：写真2×2（4つとも写真） ---------- */
.qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 12px; }
.qa-opt-media { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--qa-field); transition: box-shadow 0.3s ease; }
.qa-opt-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.qa-opt-txt { display: block; padding-top: 0.55rem; }
@media (hover: hover) {
  .qa-opt:hover .qa-opt-media img { transform: scale(1.04); }
  .qa-opt:hover .qa-opt-t { color: var(--qa-accent); }
}

.qa-stage[data-theme="yoru"] .qa-opt-media img { filter: brightness(0.92); }

/* ---------- 問三：大きな煙3本（下書きB） ---------- */
.qa-smokes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.qa-smoke-col { align-items: center; text-align: center; padding: 0 2px 10px; }
.qa-smoke { display: block; width: 100%; height: clamp(230px, calc(var(--us) * 34), 300px); fill: none; stroke: var(--qa-ink); stroke-linecap: round; }
.qa-stick { stroke: var(--qa-sub); stroke-width: 2.4; }
.qa-ember { fill: #c4583a; stroke: none; }
.qa-base { stroke: var(--qa-line); stroke-width: 1.4; }
.qa-plume { stroke-width: 1.5; opacity: 0.85; }
.qa-p2 { stroke-width: 1.1; opacity: 0.55; }
.qa-p3 { stroke-width: 1; opacity: 0.4; }
.qa-faint { stroke-width: 1.2; stroke-dasharray: 2 5; opacity: 0.75; }
.qa-smoke-col .qa-opt-t { margin-top: 0.6rem; font-size: 0.9rem; line-height: 1.6; letter-spacing: 0; }
.qa-smoke-col small { font-size: 0.72rem; }
.qa-plume { transition: stroke 0.35s ease; }
.qa-smoke-col.is-picked .qa-plume { stroke: var(--qa-accent); opacity: 1; }
@media (hover: hover) { .qa-smoke-col:hover .qa-plume { stroke: var(--qa-accent); } }
@media (prefers-reduced-motion: no-preference) {
  /* 問三：煙は線香の先から上へ描かれる（列ごとに120msずつ遅らせる） */
  .qa-plume { stroke-dasharray: 420; stroke-dashoffset: 420; animation: qaDraw 1.1s cubic-bezier(.4, .1, .3, 1) calc(var(--i, 0) * 120ms + 80ms) forwards; }
  .qa-faint { stroke-dasharray: 2 5; stroke-dashoffset: 0; animation: qaIn 1.2s ease calc(var(--i, 0) * 120ms + 80ms) both; }
  .qa-p2 { animation-delay: calc(var(--i, 0) * 120ms + 230ms); } .qa-p3 { animation-delay: calc(var(--i, 0) * 120ms + 380ms); }
}
@keyframes qaDraw { to { stroke-dashoffset: 0; } }

/* ---------- 問四：写真の横組み（下書きA） ---------- */
.qa-rows { grid-template-columns: 1fr; gap: 0; }
.qa-rows .qa-opt { display: grid; grid-template-columns: 42% minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--qa-line); }
.qa-rows .qa-opt:first-child { padding-top: 0; }
.qa-rows .qa-opt:last-child { border-bottom: 0; }
.qa-rows .qa-opt-txt { padding-top: 0; }

/* ---------- 結果の前の間（下書きBの暗い画面） ---------- */
.qa-pause { min-height: calc(var(--us) * 100 - 100px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem 0 2rem; }
.qa-pause-smoke { width: 46px; height: 170px; fill: none; stroke: var(--qa-ink); margin-bottom: 1.6rem; }
.qa-pause-smoke line { stroke: var(--qa-sub); stroke-width: 2.2; }
.qa-pause-smoke circle { fill: #e07a5a; stroke: none; }
.qa-rise { stroke-width: 1.3; opacity: 0.85; }
@media (prefers-reduced-motion: no-preference) { .qa-rise { stroke-dasharray: 200; stroke-dashoffset: 200; animation: qaDraw 1.0s cubic-bezier(.4, .1, .3, 1) 0.05s forwards; } }
.qa-pause-text p { margin: 0; font-family: var(--font-min); font-size: clamp(1.02rem, 4.3vw, 1.3rem); line-height: 2.1; letter-spacing: 0.06em; opacity: 0; animation: qaInk 0.7s ease var(--d) forwards; }
.qa-pause-foot { margin: 1.5rem 0 0; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--qa-sub); opacity: 0; animation: qaInk 0.6s ease var(--d) forwards; }

/* ---------- 結果の1画面目：大きな写真に縦書きの名前 ---------- */
.qa-result { color: var(--ink); }
.qa-hero { margin: -0.9rem -20px 0; background: var(--qa-bg); color: var(--qa-ink); }
.qa-visual { position: relative; overflow: hidden; }
.qa-visual img { display: block; width: 100%; height: clamp(330px, calc(var(--us) * 47), 430px); object-fit: cover; object-position: 50% 42%; }
.qa-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(247, 243, 236, 0.72), rgba(247, 243, 236, 0.35) 38%, rgba(247, 243, 236, 0) 52%); pointer-events: none; }
/* タイプ名（主役）：写真の左の空きに縦書き。字の大きさは写真の高さ÷1行の字数（上限 2.75rem） */
.qa-visual { --ph: clamp(330px, calc(var(--us) * 47), 430px); }
.qa-visual img { height: var(--ph); }
.qa-vtype { position: absolute; z-index: 1; top: 18px; left: 14px; margin: 0; display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 0.1rem; font-family: var(--font-min); font-weight: 500; color: #2b2723; }
.qa-vtype > span { writing-mode: vertical-rl; display: block; white-space: nowrap; }
.qa-vtype-lead { margin-left: 0.15rem; font-size: 0.86rem; letter-spacing: 0.3em; color: #4e463e; }
.qa-vtype-c { font-size: min(2.75rem, calc((var(--ph) - 40px) / (var(--tn) * 1.04))); line-height: 1.3; letter-spacing: 0.04em; }
.qa-vtype-c2 { padding-top: 1em; }
.qa-kk { color: var(--gold, #a8894f); }
.qa-pick-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.7em; margin: 0; }
.qa-pick-lead { font-family: var(--font-min); font-size: 0.8rem; letter-spacing: 0.16em; color: var(--qa-sub); }
.qa-pick-name { font-family: var(--font-min); font-weight: 500; font-size: 1.6rem; line-height: 1.35; letter-spacing: 0.08em; }
.qa-pc-type { display: none; }
.qa-hero-body { padding: 1rem 20px 1.4rem; }
.qa-pick-catch { margin: 0.1rem 0 0; font-family: var(--font-min); font-size: 1.02rem; line-height: 1.7; letter-spacing: 0.05em; }
.qa-why { margin: 0.6rem 0 0; font-size: 0.88rem; line-height: 1.9; letter-spacing: 0.02em; color: var(--qa-ink); }
.qa-why-k { margin-right: 0.6em; font-family: var(--font-min); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--qa-accent); }
.qa-buy { display: flex; align-items: center; gap: 14px; margin-top: 0.85rem; }
.qa-pick-price { margin: 0; flex: none; font-family: var(--font-min); font-size: 1.45rem; line-height: 1.2; font-variant-numeric: lining-nums; }
.qa-pick-price small { display: block; font-family: var(--font-goth); font-size: 0.68rem; color: var(--qa-sub); }
.qa-buy .btn { flex: 1 1 auto; }
.qa-sub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.2rem; margin: 0.3rem 0 0; }
.qa-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.84rem; color: var(--qa-sub); text-underline-offset: 0.3em; }

/* ---------- 結果の続き（下書きA） ---------- */
.qa-result > div:not(.qa-hero), .qa-result > blockquote, .qa-result > details { color: var(--ink); }
.qa-h3 { margin: 0 0 0.8rem; font-family: var(--font-min); font-weight: 500; font-size: 1.15rem; letter-spacing: 0.05em; line-height: 1.6; }
.qa-line.quiz-line-offer { margin: 1.6rem 0 0; padding: 1.4rem 1.3rem; background: #e4dccd; border: 0; border-radius: 0; box-shadow: none; text-align: left; }
.qa-line .quiz-line-lead { text-align: left; font-size: 1.08rem; margin-bottom: 0.4rem; }
.qa-line .quiz-line-body, .qa-line .quiz-line-note { text-align: left; }
.qa-line .quiz-line-body { margin-bottom: 0.9rem; }
.qa-line .btn { white-space: normal; width: 100%; }
.qa-typebox { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.qa-rx { margin: 0; font-family: var(--font-min); font-size: 1.04rem; line-height: 1.8; }
.qa-rx-k { display: block; font-size: 0.78rem; letter-spacing: 0.16em; color: var(--accent-text); }
.qa-rx-s { margin: 0.3rem 0 0; font-size: 0.88rem; line-height: 1.9; color: var(--ink-soft); }
.qa-voice { margin: 1.6rem 0 0; padding: 0.1rem 0 0.1rem 1rem; border-left: 2px solid var(--gold-text); }
.qa-voice p { margin: 0; font-family: var(--font-min); font-size: 0.98rem; line-height: 1.95; }
.qa-voice footer { margin-top: 0.3rem; font-size: 0.76rem; color: var(--ink-soft); }
/* 相性と香りマップの札（11/13）：閉じていても中身が分かるよう、見出し・説明・上位2つの棒・「開いて見る」を札の中に置く */
.qa-detail { margin-top: 1.6rem; background: #fffdf8; border: 1px solid var(--line); }
.qa-detail summary { display: block; padding: 16px 18px 0; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s ease; }
.qa-detail summary::-webkit-details-marker { display: none; }
.qa-detail summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
/* キーボードで選んだときだけ、札全体を1つの箱として囲む（見出しだけ囲むと箱が2つに割れて見える） */
@supports selector(:has(*)) {
  .qa-detail summary:focus-visible { outline: none; }
  .qa-detail:has(> summary:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
}
.qa-detail summary:active { background: #f4eee2; }
@media (hover: hover) { .qa-detail summary:hover { background: #faf6ee; } .qa-detail summary:hover .qa-detail-cue { background: #f4ede1; } }
.qa-detail-h { display: block; font-family: var(--font-min); font-weight: 500; font-size: 1.06rem; line-height: 1.5; letter-spacing: 0.04em; color: var(--ink); }
.qa-detail-s { display: block; margin-top: 0.15rem; font-size: 0.78rem; line-height: 1.6; color: var(--ink-soft); }
.qa-detail-peek { display: block; margin-top: 0.55rem; }
.qa-detail-cue { display: flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 48px; margin: 0.75rem -18px 0; border-top: 1px solid var(--line); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.12em; color: var(--accent-text); transition: background-color 0.2s ease; }
.qa-detail-chev { flex: none; }
.qa-cue-close, .qa-detail[open] .qa-cue-open, .qa-detail[open] .qa-detail-peek { display: none; }
.qa-detail[open] .qa-cue-close { display: inline; }
.qa-detail[open] .qa-detail-cue .qa-detail-chev, .qa-detail-close .qa-detail-chev { transform: rotate(180deg); }
.qa-detail[open] .qa-detail-cue { border-bottom: 1px solid var(--line); }
.qa-detail-in { padding: 0.9rem 18px 0; }
.qa-detail-close { display: flex; align-items: center; justify-content: center; gap: 0.4em; width: calc(100% + 36px); min-height: 48px; margin: 1rem -18px 0; padding: 0; font: inherit; font-size: 0.86rem; letter-spacing: 0.12em; color: var(--ink-soft); background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.qa-detail-close:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
@media (hover: hover) { .qa-detail-close:hover { background: #faf6ee; color: var(--accent-text); } }
/* スマホ：香りマップを札の幅いっぱいに広げ、香りの名前を12px以上に（viewBox 640 を 318px に縮めても 25単位 ≒ 12.4px） */
@media (max-width: 599px) {
  .qa-detail .qa-map { margin-left: -18px; margin-right: -18px; }
  .qa-detail .qa-map .qa-note { padding: 0 18px; }
  .qa-detail .qa-map svg text { font-size: 22px; }
  .qa-detail .qa-map svg text[data-k] { font-size: 25px; }
  /* 字を大きくした分、近い名前どうしが触れないように少しずらす（檜とホワイトティー、パロサントと白檀） */
  .qa-detail .qa-map svg text[data-k="hinoki"] { transform: translateY(-12px); }
  .qa-detail .qa-map svg text[data-k="palosanto"] { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: no-preference) {
  .qa-detail-chev { transition: transform 0.3s ease; }
  .qa-detail[open] .qa-detail-in { animation: qaDetailIn 0.4s cubic-bezier(.2, .7, .2, 1) both; }
  .qa-detail[open] .qa-detail-in .qa-match-bar i { transform-origin: left center; animation: qaGrow 0.7s cubic-bezier(.3, .1, .3, 1) 0.1s both; }
}
@keyframes qaDetailIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes qaGrow { from { transform: scaleX(0); } to { transform: none; } }
.qa-match-row { display: grid; grid-template-columns: 7.4em minmax(0, 1fr) 5.8em; align-items: center; gap: 0.6rem; padding: 0.32rem 0; font-size: 0.86rem; }
.qa-match-name { white-space: nowrap; font-size: 0.84rem; }
.qa-match-bar { height: 4px; background: var(--line); }
.qa-match-bar i { display: block; height: 100%; }
.qa-match-row.top .qa-match-name, .qa-match-row.top .qa-match-pct { color: var(--accent-text); }
.qa-match-pct { text-align: right; font-size: 0.78rem; font-variant-numeric: lining-nums; white-space: nowrap; }
.qa-note { margin: 0.5rem 0 0; font-size: 0.74rem; line-height: 1.7; color: var(--ink-soft); }
.qa-map { margin-top: 1rem; }
.qa-map svg { display: block; width: 100%; height: auto; }

.qa-next { margin-top: 1.8rem; }
.qa-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qa-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; background: #fffdf8; border: 1px solid var(--line); }
.qa-card.is-trial { background: #f1eadc; }
.qa-card-img { width: 100%; height: 130px; object-fit: contain; }
.qa-card-body { display: flex; flex-direction: column; flex: 1; }
.qa-card-k { margin: 0; font-size: 0.74rem; letter-spacing: 0.12em; color: var(--accent-text); }
.qa-card-name { margin: 0.1rem 0 0; font-family: var(--font-min); font-size: 1.08rem; letter-spacing: 0.04em; line-height: 1.5; }
.qa-card-txt { flex: 1; margin: 0.25rem 0 0; font-size: 0.76rem; line-height: 1.7; color: var(--ink-soft); }
.qa-card-price { margin: 0.35rem 0 0; font-family: var(--font-min); font-size: 1.05rem; font-variant-numeric: lining-nums; }
.qa-card-price small { font-family: var(--font-goth); font-size: 0.7rem; color: var(--ink-soft); }
.qa-card-btn { margin-top: 0.6rem; width: 100%; min-height: 44px; padding: 0.4em 0.6em; font-size: 0.76rem; letter-spacing: 0.06em; white-space: normal; }
.qa-card-link { align-self: flex-start; display: inline-block; min-height: 44px; padding: 0.75rem 0 0.4rem; font-size: 0.78rem; color: var(--ink-soft); text-underline-offset: 0.3em; }

.qa-share { margin-top: 1.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.qa-share-img { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.qa-share-img img { width: 54px; height: 96px; object-fit: cover; }
.qa-share-img span { font-size: 0.78rem; line-height: 1.7; color: var(--ink-soft); }
.qa-share-img strong { display: block; font-weight: 500; font-size: 0.9rem; color: var(--ink); }
.qa-share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.9rem; }
.qa-chipbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1em; font: inherit; font-size: 0.8rem; color: var(--ink); text-decoration: none; background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.qa-restart { margin-top: 1rem; }
.qa-restart button { min-height: 44px; padding: 0.6rem 0; font: inherit; font-size: 0.86rem; color: var(--ink-soft); background: none; border: 0; text-decoration: underline; text-underline-offset: 0.3em; cursor: pointer; }
.qa-shared { margin: 0 0 1.2rem; padding: 1.1rem 1.2rem; background: #e4dccd; }
.qa-shared p { margin: 0 0 0.6rem; font-size: 0.88rem; }
.qa-shared .btn { border: 0; }

/* ---------- PC ---------- */
@media (min-width: 960px) {
  .qa-stage .sd-aside img { transition: opacity 0.4s ease; }
  .qa-stage .sd-aside img.is-swap { opacity: 0.35; }
  .qa-aside-n { color: #a03e28; margin-bottom: 0.4em; display: inline-block; }
  .qa-stage[data-theme="yoru"]:not(.is-result) .sd-aside::after { background: linear-gradient(to right, rgba(31, 28, 26, 0.72), rgba(31, 28, 26, 0) 44%); }
  .qa-stage[data-theme="yoru"]:not(.is-result) .sd-title { color: #efe7da; }
  .qa-stage[data-scene="pause"] .sd-aside::after { background: rgba(28, 26, 24, 0.55); }
  .qa-stage[data-scene="pause"] .sd-title { color: #efe7da; }
  /* 結果：左の大きな写真に、名前を縦書きで重ねる */
  .qa-stage.is-result .sd-aside-in { display: flex; }
  .qa-stage.is-result .sd-aside::after { display: block; background: linear-gradient(to right, rgba(247, 243, 236, 0.78), rgba(247, 243, 236, 0.3) 34%, rgba(247, 243, 236, 0) 48%); }
  .qa-stage.is-result .sd-title { font-size: clamp(3.4rem, 5vw, 5rem); letter-spacing: 0.14em; }
  .qa-aside-lead { display: block; font-size: 1rem; letter-spacing: 0.3em; color: #4e463e; margin-left: 0.6em; }
  .qa-stage .sd-main { padding: 2.4rem clamp(2rem, 5vw, 5rem) 4rem; }
  .qa-q1-band { margin: 0 0 0.6rem; padding: 0; background: none; }
  .qa-q1-band::before, .qa-q1-title { display: none; }
  .qa-q1-band .qa-q { font-size: 1.9rem; }
  .qa-s1 .qa-trail { margin-bottom: 1.4rem; }
  .qa-strip-img { height: min(380px, calc(var(--us) * 46)); }
  .qa-strip-k { font-size: 1.9rem; }
  .qa-strip-t { font-size: 0.95rem; }
  .qa-q { font-size: 1.75rem; }
  .qa-grid { gap: 1.3rem 18px; }
  .qa-smoke { height: min(380px, calc(var(--us) * 46)); }
  .qa-smoke-col .qa-opt-t { font-size: 1.02rem; }
  .qa-smoke-col small { font-size: 0.8rem; }
  .qa-rows .qa-opt { grid-template-columns: 38% minmax(0, 1fr); column-gap: 20px; }
  .qa-opt-t { font-size: 1.06rem; }
  .qa-opt small { font-size: 0.8rem; }
  .qa-pause-text p { font-size: 1.4rem; }
  .qa-hero { margin: 0; padding: 0; }
  .qa-visual { display: none; }
  .qa-hero-body { padding: 0.4rem 0 1.8rem; }
  .qa-pick-catch { font-size: 1.15rem; line-height: 1.6; margin-top: 0.2rem; }
  .qa-why { font-size: 0.98rem; margin-top: 1rem; }
  .qa-buy { margin-top: 1.4rem; gap: 24px; }
  .qa-buy .btn { flex: 0 0 auto; min-width: 16em; }
  .qa-pick-price { font-size: 1.8rem; }
  .qa-card-img { height: 190px; }
  .qa-card { padding: 16px; }
}
@media (max-width: 380px) {
  .qa-trail { font-size: 0.76rem; letter-spacing: 0.02em; }
  .qa-trail li + li::before { width: 8px; margin: 0 4px; }
  .qa-strip-k { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .qa-trail .is-new, .qa-pause-text p, .qa-pause-foot { animation: none !important; opacity: 1 !important; }
  .qa-opt, .qa-plume { transition: none; }
  .qa-plume, .qa-rise { stroke-dasharray: none; stroke-dashoffset: 0; }
  .qa-faint { stroke-dasharray: 2 5; }
}

/* 結果では、1画面目だけQ1の地の色。続きはいつもの生成りで読ませる */
.qa-stage.is-result .sd-main { background: #f3eee4; color: var(--ink); }
@media (min-width: 960px) {
  .qa-hero { padding: 1.8rem 2rem 0.6rem; }
  .qa-s1 { display: flex; flex-direction: column; }
  .qa-s1 .qa-trail { order: -1; margin-bottom: 0.8rem; }
  .qa-trail { font-size: 0.95rem; }
  .qa-trail.is-result { font-size: 0.9rem; }
}

/* 焚き方の提案は、今の診断の黒い帯の格を残す */
.qa-typebox { border-top: 0; padding: 1.8rem 1.5rem; background: #23201d; color: #f3ecdf; }
.qa-result > .qa-typebox { color: #f3ecdf; }
.qa-typebox .qa-rx { font-size: 1.12rem; color: #f3ecdf; }
.qa-typebox .qa-rx-k { color: #d8c195; margin-bottom: 0.4rem; }
.qa-typebox .qa-rx-s { color: rgba(243, 236, 223, 0.86); }
/* PCの結果：左は写真だけ、右に大きな明朝のタイプ名（本番の金のカギ括弧）、その下に香りの名前 */
@media (min-width: 960px) {
  .qa-stage.is-result .sd-aside-in { display: none; }
  .qa-pc-type { display: block; margin: 0.5rem 0 1.1rem; font-family: var(--font-min); font-weight: 500; }
  .qa-pc-lead { display: block; margin-bottom: 0.2rem; font-size: 0.95rem; letter-spacing: 0.24em; color: var(--qa-sub); }
  .qa-pc-tn { display: block; font-size: clamp(2.3rem, 3.2vw, 3rem); line-height: 1.45; letter-spacing: 0.06em; text-indent: -0.5em; padding-left: 0.5em; }
  .qa-pick-lead { font-size: 0.9rem; }
  .qa-pick-name { font-size: 2.1rem; }
  .qa-pick-catch { font-size: 1.15rem; }
}
@media (min-width: 960px) {
  .qa-stage.is-result:not([data-theme="yoru"]) .qa-hero { background: none; padding: 0.4rem 0 0.4rem; }
}
/* 間の画面の添え書きは、暗い地でも読める明るさに */
.qa-pause-foot { color: #d6ccbd; }

/* =====================================================================
   押したときの動き（11/10 オーナー指示「回答を押したときのアニメーションもこだわれない？」）
   transform と opacity と SVG の stroke だけ。動きを減らす設定では JS が即時に切り替え、ここは何も動かない。
   ===================================================================== */
/* 選ばれた印：写真に朱の細い枠（ふっと現れる）、札の下に朱の細線（左から引かれる） */
.qa-opt-media::before, .qa-strip-img::before { content: ""; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 0 2px #a03e28; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.qa-opt.is-picked .qa-opt-media::before, .qa-opt.is-picked .qa-strip-img::before { opacity: 1; }
.qa-opt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: #a03e28; transform: scaleX(0); transform-origin: left center; transition: transform 0.34s cubic-bezier(.3, .6, .2, 1) 0.04s; pointer-events: none; }
.qa-opt.is-picked::after { transform: scaleX(1); }
.qa-strip::after { bottom: -6px; left: 20%; right: 20%; }
.qa-rows .qa-opt::after { bottom: -1px; }
/* 砂紋が一輪：押した所（問三は線香の火の所）から朱の輪がひろがって消える */
.qa-ripple-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.qa-ripple { position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; opacity: 0; }
.qa-ripple svg { display: block; width: 100%; height: 100%; overflow: visible; }
.qa-ripple circle { fill: none; stroke: #a03e28; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.qa-ripple circle:nth-child(2) { opacity: 0.7; } .qa-ripple circle:nth-child(3) { opacity: 0.4; }
.qa-stage[data-theme="yoru"] .qa-ripple circle { stroke: #e39274; }
/* 進み表示へのぼる言葉 */
.qa-fly { position: fixed; z-index: 60; margin: 0; white-space: nowrap; font-family: var(--font-min); color: var(--qa-ink); pointer-events: none; will-change: transform, opacity; }
.qa-step.is-picking { pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .qa-ripple { animation: qaRipple 0.5s cubic-bezier(.2, .6, .3, 1) forwards; }
  .qa-opt.is-press { animation: qaPress 0.42s cubic-bezier(.3, .6, .2, 1) forwards; }
  /* 去るとき：問いと札は上へ静かに消える（もどるときは下へ）。進み表示は残る */
  .qa-step.is-leaving .qa-q1-band, .qa-step.is-leaving .qa-q, .qa-step.is-leaving .qa-q-kicker,
  .qa-step.is-leaving .qa-opts, .qa-step.is-leaving .qa-back, .qa-step.is-leaving .qa-last { opacity: 0; transform: translateY(-8px); transition: opacity 0.18s ease, transform 0.18s ease; }
  .qa-step.is-leaving-back .qa-q1-band, .qa-step.is-leaving-back .qa-q, .qa-step.is-leaving-back .qa-q-kicker,
  .qa-step.is-leaving-back .qa-opts, .qa-step.is-leaving-back .qa-back { transform: translateY(8px); }
  .qa-step.is-leaving.is-last .qa-trail { opacity: 0; transition: opacity 0.18s ease 0.04s; }

  /* 来るとき（共通）：問いの文が墨のように現れる */
  .qa-step.is-enter .qa-q1-band, .qa-step.is-enter .qa-q, .qa-step.is-enter .qa-q-kicker { animation: qaRise 0.34s cubic-bezier(.2, .7, .2, 1) backwards; }
  .qa-step.is-enter.is-back .qa-q1-band, .qa-step.is-enter.is-back .qa-q, .qa-step.is-enter.is-back .qa-q-kicker { animation-name: qaDrop; }
  .qa-step.is-enter .qa-trail:not(.is-kept) { animation: qaFade 0.5s ease 0.1s backwards; }
  .qa-step.is-enter .qa-trail .is-now { animation: qaInk 0.5s ease 0.12s both; }
  .qa-step.is-enter .qa-back, .qa-step.is-enter .qa-last { animation: qaFade 0.4s ease 0.32s backwards; }
  /* 問一：縦長の写真に、左から順に幕が開く（もどるときは右から） */
  .qa-step.is-enter .qa-strip-img::after, .qa-step.is-enter .qa-grid .qa-opt-media::after, .qa-step.is-enter .qa-rows .qa-opt-media::after {
    content: ""; position: absolute; inset: 0; z-index: 2; background: var(--qa-bg); transform-origin: right center; pointer-events: none;
    animation: qaCurtain 0.5s cubic-bezier(.3, .7, .2, 1) calc(var(--i, 0) * 70ms) both; }
  .qa-step.is-enter.is-back .qa-strip-img::after, .qa-step.is-enter.is-back .qa-grid .qa-opt-media::after, .qa-step.is-enter.is-back .qa-rows .qa-opt-media::after { transform-origin: left center; }
  .qa-step.is-enter .qa-strip-k, .qa-step.is-enter .qa-strip-t { animation: qaFade 0.4s ease calc(var(--i, 0) * 70ms + 180ms) both; }
  /* 問二：写真の幕が順に開き、言葉があとから */
  .qa-step.is-enter .qa-grid .qa-opt-txt { animation: qaRise 0.45s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 70ms + 140ms) both; }
  /* 問三：列が順に現れ、煙は線香の先から上へ描かれる（上の qa-plume） */
  .qa-step.is-enter .qa-smoke-col .qa-opt-t, .qa-step.is-enter .qa-smoke-col small { animation: qaFade 0.45s ease calc(var(--i, 0) * 120ms + 300ms) both; }
  .qa-step.is-enter .qa-stick, .qa-step.is-enter .qa-ember, .qa-step.is-enter .qa-base { animation: qaFade 0.35s ease calc(var(--i, 0) * 120ms) both; }
  /* 問四：行が上から順に現れる */
  .qa-step.is-enter .qa-rows .qa-opt { animation: qaRise 0.46s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 90ms + 80ms) backwards; }

  /* 間：暗い画面に線香、煙が描かれ、3行が1行ずつ、最後に静かに消える */
  .qa-pause.is-enter .qa-pause-smoke line, .qa-pause.is-enter .qa-pause-smoke circle { animation: qaFade 0.4s ease both; }
  .qa-pause.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.25s ease, transform 0.25s ease; }

  /* 結果：商品写真がゆっくり現れ、そのあとタイプ名が縦に書かれるように */
  .qa-result.is-enter .qa-visual img { animation: qaPhoto 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .qa-result.is-enter .qa-visual::after { animation: qaFade 1.1s ease both; }
  .qa-result.is-enter .qa-vtype-lead { animation: qaInkV 0.7s ease 0.6s both; }
  .qa-result.is-enter .qa-vtype-c { animation: qaInkV 0.9s cubic-bezier(.2, .7, .2, 1) calc(0.78s + var(--c, 0) * 0.24s) both; }
  .qa-result.is-enter .qa-hero-body > * { animation: qaRise 0.6s cubic-bezier(.2, .7, .2, 1) 0.35s both; }
  .qa-result.is-enter .qa-hero-body > :nth-child(3), .qa-result.is-enter .qa-hero-body > :nth-child(4) { animation-delay: 0.42s; }
  .qa-result.is-enter .qa-hero-body > :nth-child(n+5) { animation-delay: 0.5s; }
  .qa-result.is-enter .qa-pc-type { animation: qaInk 0.9s cubic-bezier(.2, .7, .2, 1) 0.55s both; }
  .qa-stage.is-reveal .sd-aside img { animation: qaFade 1.1s ease both; }
}
@keyframes qaRipple { 0% { opacity: 0.95; transform: scale(0.2); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes qaPress { 0% { transform: none; } 30% { transform: translateY(2px) scale(0.985); } 100% { transform: translateY(1px) scale(0.993); } }
@keyframes qaRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes qaDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes qaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qaCurtain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes qaPhoto { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes qaInkV { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
/* 結果1画面目の詰め：ボタンを固定バーから離す */
.qa-hero-body { padding-top: 0.85rem; }
.qa-trail.is-result { margin-bottom: 0.5rem; }
@media (min-width: 960px) { .qa-trail.is-result { margin-bottom: 0.8rem; } .qa-hero-body { padding-top: 0.4rem; } }
/* 3行に分けたタイプ名は、箱にかからない大きさまで */
.qa-vtype-3 .qa-vtype-c { font-size: min(2.2rem, calc((var(--ph) - 40px) / (var(--tn) * 1.04))); }

/* ni-qa 直し（11/10）
   1) 高さの低いスマホ（〜760px）は写真を低めにし、本文の行間を少し詰めて、Amazonボタンを固定バーの上に出す。390×844 は変えない */
@media (max-width: 959px) and (max-height: 760px) {
  .qa-visual { --ph: clamp(280px, calc(var(--us) * 43), 340px); }
  .qa-hero-body { padding-top: 0.7rem; }
  .qa-trail.is-result { margin-bottom: 0.35rem; }
  .qa-pick-name { font-size: 1.45rem; line-height: 1.3; }
  .qa-pick-catch { font-size: 0.96rem; line-height: 1.6; }
  .qa-why { margin-top: 0.45rem; font-size: 0.84rem; line-height: 1.75; }
  .qa-buy { margin-top: 0.65rem; }
}
/* 3) フォーカスを移した見出し・問い文に輪は出さない（キーボードの次のTabは札から） */
.qa-q:focus, .qa-vtype:focus, .qa-pc-type:focus { outline: none; }
/* 2) 重ねて出す：去りは160ms */
@media (prefers-reduced-motion: no-preference) {
  .qa-step.is-leaving .qa-q1-band, .qa-step.is-leaving .qa-q, .qa-step.is-leaving .qa-q-kicker,
  .qa-step.is-leaving .qa-opts, .qa-step.is-leaving .qa-back, .qa-step.is-leaving .qa-last { transition-duration: 0.16s; }
}
/* 幕の色と地の色がずれて見えないよう、地の色の切り替えは次の問いを描く前（360ms）に終える */
.qa-stage .sd-main { transition-duration: 0.3s; }
@media (prefers-reduced-motion: no-preference) {
  .qa-step.is-enter .qa-strip-img::after, .qa-step.is-enter .qa-grid .qa-opt-media::after, .qa-step.is-enter .qa-rows .qa-opt-media::after { animation-duration: 0.45s; animation-delay: calc(var(--i, 0) * 60ms); }
}

/* 2026-11-11 ゆっくり版（オーナー「動作が軽快すぎて文字が読めない部分が多数」）
   選んだ札を約0.65秒見せてから去る（js の T_LEAVE 650 / T_NEXT 900）。問いと選択肢の文字は 0.6秒で、1つずつ間をあけて出す */
@media (prefers-reduced-motion: no-preference) {
  .qa-step.is-leaving .qa-q1-band, .qa-step.is-leaving .qa-q, .qa-step.is-leaving .qa-q-kicker,
  .qa-step.is-leaving .qa-opts, .qa-step.is-leaving .qa-back, .qa-step.is-leaving .qa-last { transition-duration: 0.26s; }
  .qa-step.is-leaving.is-last .qa-trail { transition-duration: 0.26s; }
  .qa-step.is-enter .qa-q1-band, .qa-step.is-enter .qa-q, .qa-step.is-enter .qa-q-kicker { animation-duration: 0.6s; }
  .qa-step.is-enter .qa-back, .qa-step.is-enter .qa-last { animation-delay: 0.6s; }
  .qa-step.is-enter .qa-strip-img::after, .qa-step.is-enter .qa-grid .qa-opt-media::after, .qa-step.is-enter .qa-rows .qa-opt-media::after { animation-duration: 0.65s; animation-delay: calc(var(--i, 0) * 100ms + 120ms); }
  .qa-step.is-enter .qa-strip-k, .qa-step.is-enter .qa-strip-t { animation-duration: 0.6s; animation-delay: calc(var(--i, 0) * 100ms + 380ms); }
  .qa-step.is-enter .qa-grid .qa-opt-txt { animation-duration: 0.6s; animation-delay: calc(var(--i, 0) * 100ms + 340ms); }
  .qa-step.is-enter .qa-smoke-col .qa-opt-t, .qa-step.is-enter .qa-smoke-col small { animation-duration: 0.6s; animation-delay: calc(var(--i, 0) * 130ms + 420ms); }
  .qa-step.is-enter .qa-stick, .qa-step.is-enter .qa-ember, .qa-step.is-enter .qa-base { animation-duration: 0.45s; animation-delay: calc(var(--i, 0) * 130ms + 120ms); }
  .qa-step.is-enter .qa-rows .qa-opt { animation-duration: 0.6s; animation-delay: calc(var(--i, 0) * 120ms + 200ms); }
  /* 結果の前の間：3行を約1.1秒ごとに。全体で約5.6秒（画面を押せばすぐ結果へ） */
  .qa-pause-text p { animation-duration: 0.8s; }
  .qa-pause-foot { animation-duration: 0.7s; }
  .qa-pause.is-leaving { transition-duration: 0.3s; }
  .qa-pause { cursor: pointer; }
}
