:root {
  --ivory: #FBFAF6;
  --ivory-deep: #F4F0E8;
  --pink: #C87678;
  --pink-soft: #FDEEEC;
  --sage: #687664;
  --sage-soft: #EAECE6;
  --greige: #927E6D;
  --greige-soft: #F6F1E8;
  --brown: #2A1D18;
  --brown-soft: #6B5D55;
  --line: #E4DDD3;
  --accent: var(--pink);
  --accent-soft: var(--pink-soft);
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --latin: "Cormorant Garamond", "Shippori Mincho", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--brown);
  font-family: var(--mincho);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.noscript { padding: 40px 20px; text-align: center; }
.app { min-height: 100vh; min-height: 100dvh; }
.view { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } * { transition: none !important; } }
.tone-green { --accent: var(--sage); --accent-soft: var(--sage-soft); }
.tone-pink { --accent: var(--pink); --accent-soft: var(--pink-soft); }

.brand { font-family: var(--latin); letter-spacing: .28em; font-size: 12px; color: var(--brown-soft); text-transform: uppercase; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 60px; padding: 14px 40px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 18px; letter-spacing: .14em;
  box-shadow: 0 10px 24px -12px rgba(42, 29, 24, .45);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .chev { width: 9px; height: 9px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.btn-ghost { background: transparent; color: var(--brown-soft); box-shadow: none; border: 1px solid var(--line); min-height: 48px; padding: 8px 22px; font-size: 14px; letter-spacing: .08em; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }

/* ---------- トップ ---------- */
.top { position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.top::before, .top::after { content: ""; position: absolute; pointer-events: none; background-repeat: no-repeat; background-size: contain; }
.top::before { top: 0; right: 0; width: min(62vw, 420px); aspect-ratio: 376 / 196; background-image: url(../images/decor_pink_TR.webp); background-position: top right; opacity: .9; }
.top::after { opacity: .55; bottom: 7%; left: 0; width: min(26vw, 150px); aspect-ratio: 118 / 173; background-image: url(../images/decor_green_L.webp); background-position: bottom left; }
.top-inner { position: relative; z-index: 1; max-width: 560px; text-align: center; }
.top .brand { margin-bottom: 30px; }
.top .eyebrow { font-family: var(--latin); letter-spacing: .3em; font-size: 13px; color: var(--pink); margin: 0 0 14px; }
.top h1 { white-space: nowrap; font-size: clamp(28px, 8.2vw, 52px); font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: .06em; }
.top .rule { width: 56px; height: 1px; background: var(--greige); margin: 26px auto; opacity: .6; }
.top .sub { word-break: auto-phrase; font-size: clamp(15px, 4.2vw, 19px); font-weight: 600; margin: 0 0 18px; line-height: 1.9; }
.top .lead { word-break: auto-phrase; text-wrap: pretty; font-size: 15px; color: var(--brown-soft); margin: 0 0 34px; line-height: 2; }
.top .meta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 34px; padding: 0; list-style: none; }
.top .meta li { font-size: 13px; padding: 5px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .6); color: var(--brown-soft); letter-spacing: .06em; }
.top .btn { width: min(100%, 340px); min-height: 66px; font-size: 20px; }
.top .resume { margin-top: 16px; }
.top .note { word-break: auto-phrase; font-size: 12px; color: var(--brown-soft); margin: 32px auto 0; max-width: 420px; line-height: 1.9; opacity: .9; }

/* ---------- 質問 ---------- */
.quiz { max-width: 1180px; margin: 0 auto; padding: 14px 16px 40px; }
.quiz-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 48px; }
.back { justify-self: start; background: none; border: 0; padding: 12px 10px 12px 2px; font-size: 14px; color: var(--brown-soft); display: inline-flex; align-items: center; gap: 8px; }
.back::before { content: ""; width: 8px; height: 8px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.count { font-family: var(--latin); font-size: 26px; font-weight: 600; color: var(--accent); letter-spacing: .04em; line-height: 1; }
.count small { font-size: 15px; color: var(--greige); margin-left: 3px; }
.quiz-bar .brand { justify-self: end; font-size: 10px; text-align: right; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 18px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }

.q-head { text-align: center; margin: 0 0 16px; }
.q-head h2 { word-break: auto-phrase; font-size: clamp(22px, 6.2vw, 30px); font-weight: 700; margin: 0 0 6px; line-height: 1.45; letter-spacing: .04em; }
.q-head p { word-break: auto-phrase; font-size: 13.5px; color: var(--brown-soft); margin: 0; line-height: 1.8; }

/* スマホ：左右のカードを画像から切り出して縦に並べる（画像そのものは加工していません） */
.choices { display: grid; gap: 14px; }
.choice {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  aspect-ratio: 720 / 732; background-color: var(--accent-soft); background-repeat: no-repeat;
  background-size: calc(1536 / 720 * 100%) auto;
  box-shadow: 0 0 0 1px var(--line), 0 12px 26px -18px rgba(42, 29, 24, .5);
  transition: transform .15s ease, box-shadow .2s ease;
}
.choice.left { background-position: calc(40 / (1536 - 720) * 100%) calc(236 / (1024 - 732) * 100%); }
.choice.right { background-position: calc(776 / (1536 - 720) * 100%) calc(236 / (1024 - 732) * 100%); }
.choice:active { transform: scale(.985); }
.choice.is-selected { box-shadow: 0 0 0 3px var(--accent), 0 12px 26px -18px rgba(42, 29, 24, .5); }
.choice .badge { position: absolute; top: 10px; right: 10px; display: none; background: var(--brown); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 999px; letter-spacing: .08em; }
.choice.is-selected .badge { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q-figure { display: none; }
.hint { text-align: center; font-size: 12.5px; color: var(--brown-soft); margin: 16px 0 0; }
.skip { text-align: center; margin: 14px 0 0; }

/* PC・タブレット：画像を1枚そのまま表示し、左右のカードの位置をクリック領域にする */
@media (min-width: 860px) {
  .quiz { padding: 22px 28px 56px; max-width: min(1180px, calc((100vh - 170px) * 1.5 + 56px)); min-width: 800px; }
  .q-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .q-figure { display: block; position: relative; margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgba(42, 29, 24, .55); background: var(--ivory); }
  .q-figure img { display: block; width: 100%; height: auto; aspect-ratio: 1536 / 1024; }
  .choices { position: absolute; inset: 0; display: block; }
  .choice { position: absolute; width: auto; aspect-ratio: auto; background: none !important; box-shadow: none; border-radius: 1.4% / 1.4%; top: calc(236 / 1024 * 100%); height: calc(732 / 1024 * 100%); width: calc(720 / 1536 * 100%); }
  .choice.left { left: calc(40 / 1536 * 100%); }
  .choice.right { left: calc(776 / 1536 * 100%); }
  .choice:hover { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); background: rgba(255, 255, 255, .08) !important; }
  .choice:active { transform: none; }
  .choice.is-selected { box-shadow: inset 0 0 0 4px var(--accent); }
  .hint { margin-top: 20px; font-size: 14px; }
}

/* ---------- 確認質問（同点時のみ） ---------- */
.tb { max-width: 620px; margin: 0 auto; text-align: center; padding: 26px 4px 0; }
.tb .eyebrow { font-family: var(--latin); letter-spacing: .28em; font-size: 13px; color: var(--accent); margin: 0 0 10px; }
.tb h2 { font-size: clamp(22px, 6vw, 30px); margin: 0 0 12px; line-height: 1.5; }
.tb p { font-size: 14px; color: var(--brown-soft); margin: 0 0 28px; }
.tb-options { display: grid; gap: 14px; }
.tb-option { width: 100%; min-height: 84px; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-size: 17px; letter-spacing: .04em; line-height: 1.6; transition: box-shadow .2s ease, transform .15s ease; }
.tb-option:nth-child(1) { background: var(--pink-soft); }
.tb-option:nth-child(2) { background: var(--greige-soft); }
.tb-option:active { transform: scale(.985); }
.tb-option.is-selected { box-shadow: 0 0 0 3px var(--accent); }
.tb-option small { display: block; font-size: 12px; color: var(--brown-soft); letter-spacing: .1em; margin-bottom: 2px; }

/* ---------- 結果 ---------- */
.result { max-width: 720px; margin: 0 auto; padding: 18px 18px 64px; }
.result-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.result-card {
  position: relative; overflow: hidden; text-align: center; margin-top: 8px; padding: 46px 26px 40px;
  border-radius: 24px; background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px rgba(42, 29, 24, .6);
}
.result-card::before { content: ""; position: absolute; top: 0; right: 0; width: 58%; max-width: 300px; aspect-ratio: 356 / 240; background: url(../images/decor_green_TR.webp) top right / contain no-repeat; opacity: .85; pointer-events: none; }
.tone-pink .result-card::before { aspect-ratio: 376 / 196; background-image: url(../images/decor_pink_TR.webp); opacity: 1; }
.result-card > * { position: relative; }
.result-card .label { display: inline-block; font-size: 13px; letter-spacing: .34em; padding: 4px 18px 4px 22px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; background: rgba(255, 255, 255, .7); }
.result-card .pre { font-size: 16px; margin: 22px 0 2px; letter-spacing: .12em; color: var(--brown-soft); }
.result-card h1 { font-size: clamp(34px, 10.5vw, 54px); font-weight: 700; margin: 0; line-height: 1.3; letter-spacing: .04em; }
.result-card h1 span { display: inline-block; white-space: nowrap; font-size: .52em; margin-left: .15em; letter-spacing: .1em; }
.result-card h1.long { font-size: clamp(27px, 8vw, 50px); }
.result-card .en { font-family: var(--latin); font-size: 19px; letter-spacing: .3em; color: var(--accent); margin: 6px 0 0; text-transform: uppercase; }
.result-card .rule { width: 44px; height: 1px; background: var(--greige); margin: 22px auto; opacity: .6; }
.result-card .catch { word-break: auto-phrase; font-size: 17px; font-weight: 600; margin: 0 0 12px; line-height: 1.8; }
.result-card .summary { word-break: auto-phrase; font-size: 15px; margin: 0 auto; max-width: 500px; text-align: left; line-height: 2; }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px auto 0; max-width: 460px; padding: 0; list-style: none; }
.scores li { white-space: nowrap; background: rgba(255, 255, 255, .78); border-radius: 14px; padding: 10px 4px 12px; font-size: clamp(10.5px, 3vw, 12.5px); color: var(--brown-soft); line-height: 1.7; }
.scores b { display: block; font-size: 15px; color: var(--brown); font-weight: 600; letter-spacing: .06em; }
.sections { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.sections li { background: #fff; border-radius: 18px; padding: 22px 22px 22px; box-shadow: 0 0 0 1px var(--line); }
.sections h3 { display: flex; align-items: baseline; gap: 12px; font-size: 17px; margin: 0 0 8px; letter-spacing: .08em; }
.sections h3 i { font-family: var(--latin); font-style: normal; font-size: 22px; color: var(--accent); letter-spacing: .04em; line-height: 1; }
.sections p { word-break: auto-phrase; margin: 0; font-size: 15px; line-height: 2; }
.result-foot { text-align: center; margin-top: 36px; }
.result-foot .btn { width: min(100%, 340px); background: var(--brown); }
.result-foot .note { font-size: 12px; color: var(--brown-soft); margin: 26px auto 0; max-width: 460px; line-height: 1.9; }
.result-foot .brand { margin-top: 26px; }
@media (min-width: 860px) {
  .result { padding-top: 30px; }
  .result-card { padding: 60px 48px 50px; }
  .sections { grid-template-columns: 1fr 1fr; }
}

/* ---------- スマホでも左右横並び（画像を1枚そのまま表示） ---------- */
.q-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.q-stage { margin: 0 -16px; }
.q-figure { display: block; position: relative; margin: 0; background: var(--ivory); }
.q-figure img { display: block; width: 100%; height: auto; aspect-ratio: 1536 / 1024; }
.choices { position: absolute; inset: 0; display: block; }
.choice { position: absolute; aspect-ratio: auto; background: none !important; box-shadow: none; border-radius: 6px; top: calc(236 / 1024 * 100%); height: calc(732 / 1024 * 100%); width: calc(720 / 1536 * 100%); }
.choice.left { left: calc(40 / 1536 * 100%); }
.choice.right { left: calc(776 / 1536 * 100%); }
.choice:active { transform: none; background: rgba(255, 255, 255, .25) !important; }
.choice.is-selected { box-shadow: inset 0 0 0 3px var(--accent); }
.choice .badge { top: 4px; right: 4px; font-size: 9px; padding: 0 7px; }
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.pick { position: relative; min-height: 76px; padding: 10px 8px 12px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-size: 15px; line-height: 1.5; letter-spacing: .04em; word-break: auto-phrase; box-shadow: 0 10px 22px -14px rgba(42, 29, 24, .5); transition: transform .15s ease; }
.pick.right { background: var(--greige); }
.pick small { display: block; font-size: 11px; letter-spacing: .2em; opacity: .85; }
.pick:active { transform: scale(.97); }
.pick.is-selected { box-shadow: 0 0 0 3px var(--ivory), 0 0 0 5px var(--brown); }
@media (min-width: 860px) {
  .q-stage { margin: 0; }
  .q-figure { border-radius: 16px; overflow: hidden; }
  .choice { border-radius: 1.4% / 1.4%; }
  .choice.is-selected { box-shadow: inset 0 0 0 4px var(--accent); }
  .choice .badge { top: 10px; right: 10px; font-size: 12px; padding: 3px 12px; }
  .picks { display: none; }
}

/* ---------- 結果ページのタイプ別画像 ---------- */
.type-figure { margin: 22px 0 0; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -40px rgba(42, 29, 24, .55); }
.type-figure img { display: block; width: 100%; height: auto; }
.type-figure + .sections { margin-top: 22px; }
