/* 香り診断（2026-11-04 作り直し）。shindan.html だけで読む。広告LP（line.html）の診断には効かせないよう、すべて .sd- の下に書く */
.sd-stage { position: relative; }
.sd-main { padding: 1.6rem 20px 3.5rem; }
.sd-main .quiz-wrap { max-width: 640px; margin: 0 auto; }

/* 上の帯（PCでは左の写真の面になる） */
.sd-aside { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 128px; padding: 1.2rem 20px; }
.sd-aside img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.sd-aside::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(243, 238, 228, 0.86), rgba(243, 238, 228, 0.6) 58%, rgba(243, 238, 228, 0) 88%); }
.sd-aside-in { position: relative; z-index: 1; }
.sd-title { font-family: var(--font-min); font-weight: 500; font-size: clamp(1.45rem, 5.6vw, 1.9rem); line-height: 1.5; letter-spacing: 0.06em; margin: 0; color: var(--ink); }
.sd-meta { font-size: 0.84rem; letter-spacing: 0.06em; margin: 0.35rem 0 0; color: var(--ink); }
.sd-stage.is-result .sd-aside { display: none; }

/* 質問 */
.sd-main .quiz-head { margin-bottom: 1.3rem; }
.sd-main .quiz-progress { justify-content: flex-start; }
.sd-main .quiz-q { font-family: var(--font-min); font-weight: 500; font-size: clamp(1.4rem, 2.5vw, 1.9rem); line-height: 1.55; letter-spacing: 0.05em; text-align: left; margin: 0 0 1.3rem; word-break: keep-all; overflow-wrap: anywhere; }
.sd-main .quiz-opts { --g: clamp(0.8rem, 1.8vw, 1.2rem); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem var(--g); }
.sd-main .quiz-opts button { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; transition: none; }
.sd-main .quiz-opts button:hover { transform: none; }
.sd-main .quiz-opt-img-wrap { display: block; flex: none; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 0; }
.sd-main .quiz-opt-img { display: block; }
.sd-main .quiz-opt-txt { display: block; padding-top: 0.7rem; font-family: var(--font-min); font-size: 1.02rem; line-height: 1.55; letter-spacing: 0.04em; line-break: strict; }
.sd-main .quiz-opts button small { font-family: var(--font-goth); font-size: 0.78rem; line-height: 1.7; letter-spacing: 0.02em; color: var(--ink-soft); margin-top: 0.3rem; }
@media (hover: hover) { .sd-main .quiz-opts button:hover .quiz-opt-txt { color: var(--accent-text); } }
.sd-main .quiz-opts button.selected .quiz-opt-img-wrap { outline: 2px solid var(--accent); outline-offset: 2px; }
.sd-main .quiz-opts button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* 3択の3つ目は、写真を左半分に置いて横一列で使う */
.sd-main .quiz-opts button:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: calc(50% - var(--g) / 2) minmax(0, 1fr); column-gap: var(--g); align-items: center; }
.sd-main .quiz-opts button:last-child:nth-child(odd) .quiz-opt-txt { padding-top: 0; }
.sd-main .quiz-back, .sd-main .quiz-last { text-align: left; }

/* 結果 */
.sd-main .quiz-type { text-align: left; margin-bottom: 1.8rem; }
.sd-main .quiz-axes { justify-content: flex-start; margin-bottom: 1.3rem; }
.sd-main .quiz-axes span { background: none; border-color: var(--line); color: var(--ink-soft); }
.sd-main .quiz-type-name { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.5; letter-spacing: 0.05em; text-indent: -0.5em; padding-left: 0.5em; word-break: keep-all; overflow-wrap: anywhere; }
.sd-main .quiz-type-desc { text-align: left; margin-left: 0; margin-right: 0; font-size: 1rem; line-height: 2; letter-spacing: 0.03em; color: var(--ink); }
.sd-main .quiz-result-card { display: block; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.sd-main .quiz-result-img { display: block; padding: 0; background: none; }
.sd-main .quiz-result-img img { display: block; width: 100%; height: auto; max-height: none; max-width: none; }
.sd-main .quiz-result-body { padding: 1.5rem 0 0; }
.sd-main .quiz-result-label { font-family: var(--latin); font-style: italic; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: none; color: var(--gold-text); }
.sd-main .quiz-result-name { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.25; letter-spacing: 0.1em; }
.sd-main .quiz-result-catch { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.7; margin: 0.7rem 0 0.8rem; word-break: keep-all; overflow-wrap: anywhere; }
.sd-main .quiz-result-note { font-size: 0.98rem; line-height: 2; letter-spacing: 0.03em; color: var(--ink); }
.sd-main .quiz-result-price { font-size: 1.6rem; }
.sd-main .quiz-result-price small { font-size: 0.8rem; color: var(--ink-soft); }

.sd-main .quiz-line-offer { background: #e4dccd; border: 0; border-radius: 0; box-shadow: none; text-align: left; margin-top: 2.6rem; padding: 1.8rem 1.5rem; }
.sd-main .quiz-line-lead, .sd-main .quiz-line-body, .sd-main .quiz-line-note { text-align: left; }
.sd-main .quiz-voice { background: none; border: 0; border-left: 2px solid var(--gold-text); border-radius: 0; box-shadow: none; margin-top: 2.8rem; padding: 0.2rem 0 0.2rem clamp(1.1rem, 3vw, 1.6rem); }
.sd-main .quiz-voice-body { font-family: var(--font-min); font-size: 1.08rem; line-height: 2; letter-spacing: 0.04em; }
.sd-main .quiz-rx { background: #23201d; border: 0; border-radius: 0; box-shadow: none; color: #f3ecdf; text-align: left; margin-top: 2.8rem; padding: clamp(2rem, 5vw, 2.8rem) clamp(1.5rem, 4vw, 2.4rem); }
.sd-main .quiz-rx::before, .sd-main .quiz-rx::after { display: none; }
.sd-main .quiz-rx-label { font-family: var(--latin); font-style: italic; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: none; text-align: left; color: #d8c195; }
.sd-main .quiz-rx p:not(.quiz-rx-label) { font-family: var(--font-min); font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.8; letter-spacing: 0.04em; text-align: left; color: #f3ecdf; word-break: keep-all; overflow-wrap: anywhere; }
.sd-main .quiz-rx p + p:not(.quiz-rx-label) { font-family: var(--font-goth); font-size: 0.96rem; line-height: 2; letter-spacing: 0.03em; color: rgba(243, 236, 223, 0.88); word-break: normal; }
.sd-main .quiz-rx-label + p { margin-top: 0.6rem; }
.sd-main .quiz-sec-label { font-family: var(--latin); font-style: italic; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: none; text-align: left; text-indent: 0; color: var(--gold-text); }
.sd-main .quiz-sec-title { font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.7rem); letter-spacing: 0.05em; text-align: left; }
.sd-main .quiz-match-bar { height: 3px; background: var(--line); border-radius: 0; }
.sd-main .quiz-match-bar i { border-radius: 0; background: var(--ink) !important; }
.sd-main .quiz-match-row.top .quiz-match-bar i { background: var(--accent) !important; }
.sd-main .quiz-map-note, .sd-main .quiz-match-note { text-align: left; }
.sd-main .quiz-second { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; margin-top: 2.6rem; padding: 1.3rem 0 0; font-size: 0.96rem; line-height: 2; }
.sd-main .quiz-share { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin-top: 2.6rem; padding: 2rem 0 0; }
.sd-main .quiz-share .quiz-sec-label { margin-bottom: 0.3rem; }
.sd-main .quiz-share-lead { text-align: left; font-family: var(--font-min); }
.sd-main .quiz-share-btns { justify-content: flex-start; }
.sd-main .quiz-shared-banner { background: #e4dccd; border: 0; border-radius: 0; box-shadow: none; }
.sd-main .quiz-restart { text-align: left; }

.sd-main .quiz-line-offer .btn { white-space: normal; }
.sd-main #quiz-try { border: 0; }

/* スマホの固定バー（.buybar を土台に、香りの名前を添える） */
.sd-bar .buybar-price small { display: block; font-family: var(--font-goth); font-size: 0.72rem; line-height: 1.4; letter-spacing: 0.02em; color: var(--ink-soft); }
.sd-bar .buybar-price { line-height: 1.3; }

/* 診断の説明 */
.sd-sec { padding: clamp(4rem, 9vw, 7rem) 0; }
.sd-narrow { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.sd-narrow p:not(.sx-label) { font-size: 1.02rem; line-height: 2.1; letter-spacing: 0.04em; }
.sd-narrow strong { font-weight: 500; }
.sd-narrow .sx-h2 { margin-bottom: 1.6rem; word-break: keep-all; overflow-wrap: anywhere; }
.sd-seven { background: #e4dccd; }
.sd-seven .sd-narrow { max-width: 1000px; }
.sd-boxes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(0.8rem, 2vw, 1.6rem); margin: clamp(2rem, 4vw, 3rem) 0; }
.sd-boxes .sx-other img { box-shadow: none; mix-blend-mode: multiply; aspect-ratio: 3 / 5; object-fit: contain; }
.sd-boxes .sx-other span { font-size: 0.86rem; letter-spacing: 0; white-space: nowrap; }
.sd-seven .a-table-scroll { border: 0; box-shadow: none; background: none; }
.sd-seven .a-table { background: none; border: 0; }
.sd-seven .a-table th, .sd-seven .a-table td { background: none; border: 0; border-bottom: 1px solid rgba(43, 39, 35, 0.2); padding: 0.9rem 0.8rem 0.9rem 0; font-size: 0.94rem; line-height: 1.7; text-align: left; }
.sd-seven .a-table thead th { font-family: var(--font-goth); font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.sd-seven .a-table tbody th { font-family: var(--font-min); font-weight: 500; font-size: 1.04rem; white-space: nowrap; }
.sd-seven .a-table a { color: inherit; text-underline-offset: 0.3em; }
.sd-seven .a-table td:last-child { white-space: nowrap; padding-right: 0; }
.sd-seven p:not(.sx-label) { font-size: 0.96rem; line-height: 2; letter-spacing: 0.03em; margin: 1.6rem 0 0; }
.sd-seven p a { color: inherit; }
.sd-faq .a-faq { margin: 0; }
.sd-faq .a-faq dt { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; font-family: var(--font-min); font-weight: 500; font-size: 1.08rem; line-height: 1.7; letter-spacing: 0.04em; margin-top: 0; padding: 1.3rem 0 0.5rem 1.6em; }
.sd-faq .a-faq dd { background: none; border: 0; margin: 0; padding: 0 0 1.4rem; font-size: 0.96rem; line-height: 2; letter-spacing: 0.03em; }

/* PC：左に写真を固定し、右で答える。結果が出たら写真がその香りの箱に替わる */
@media (min-width: 960px) {
  .sd-stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .sd-aside, .sd-stage.is-result .sd-aside { display: block; position: sticky; top: var(--sd-top, 3.95rem); height: calc(100vh - var(--sd-top, 3.95rem)); min-height: 520px; padding: 0; }
  .sd-aside::after { background: linear-gradient(to right, rgba(243, 238, 228, 0.66), rgba(243, 238, 228, 0) 44%); }
  .sd-stage.is-result .sd-aside::after { display: none; }
  .sd-aside img { object-position: 68% 50%; }
  .sd-stage.is-result .sd-aside img { object-position: 50% 50%; }
  .sd-stage.is-result .sd-aside-in { display: none; }
  .sd-aside-in { position: absolute; top: 2.4rem; left: clamp(1.6rem, 3vw, 3rem); height: calc(100% - 4.8rem); display: flex; flex-direction: row-reverse; gap: 1.1rem; align-items: flex-start; }
  .sd-title { writing-mode: vertical-rl; font-size: clamp(2.4rem, min(3.6vw, 7.2vh), 3.6rem); line-height: 1.5; letter-spacing: 0.1em; }
  .sd-tcy { text-combine-upright: all; }
  .sd-meta { writing-mode: vertical-rl; margin: 0; font-size: 0.9rem; letter-spacing: 0.14em; }
  .sd-main { padding: clamp(2rem, 4vh, 3.2rem) clamp(2rem, 5vw, 5rem) 5rem; }
  /* PCの箱は左の面で見せるので、本文側では出さない */
  .sd-main .quiz-result-img { display: none; }
  .sd-main .quiz-result-body { padding-top: 0.4rem; }
}

@media (max-width: 959px) {
  .sd-boxes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem 0.8rem; }
}

@media (max-width: 767px) {
  /* 箱は余白なしの全幅で見せる */
  .sd-main .quiz-result-img { margin: 0 -20px; }
  .sd-main .quiz-result-body .btn { flex: 1 1 100%; justify-content: center; }
  .sd-boxes .sx-other span { font-size: 0.76rem; white-space: normal; line-height: 1.5; }
  .sd-seven .a-table th:nth-child(2), .sd-seven .a-table td:nth-child(2) { display: none; }
  /* スマホは3列を幅いっぱいに収める */
  .sd-seven .a-table { min-width: 0; width: 100%; table-layout: fixed; }
  .sd-seven .a-table thead th { white-space: normal; }
  .sd-seven .a-table thead th:first-child { width: 34%; }
  .sd-seven .a-table thead th:last-child { width: 22%; }
  .sd-seven .a-table tbody th { white-space: normal; word-break: keep-all; font-size: 0.98rem; }
}

/* タブレットは写真と文を横に並べて、ボタンを1画面に収める */
@media (min-width: 768px) and (max-width: 959px) {
  .sd-main .quiz-result-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; align-items: center; }
  .sd-main .quiz-result-body { padding: 0; }
}

/* 行頭に「っ」「ー」を置かない。一番狭い端末は文字を少し小さくして、読点の前で折り返さないようにする */
.sd-stage, .sd-sec { line-break: strict; }
@media (max-width: 400px) { .sd-narrow .sx-h2 { font-size: 1.6rem; } }
@media (max-width: 340px) {
  .sd-main .quiz-q { font-size: 1.22rem; }
  .sd-main .quiz-type-name { font-size: 1.5rem; }
  .sd-narrow .sx-h2 { font-size: 1.4rem; }
}
