:root {
  --paper: #f7f2ec;
  --paper-2: #fffdf9;
  --ink: #473c43;
  --muted: #7c6b73;
  --rose: #b87991;
  --rose-soft: #f2e3e8;
  --blue: #7188a7;
  --blue-soft: #e4ebf4;
  --line: #e7dce0;
  --shadow: 0 18px 50px rgba(79, 56, 67, .10);
  --font-world: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(216, 184, 196, .22), transparent 24rem),
    radial-gradient(circle at 92% 35%, rgba(183, 201, 220, .22), transparent 26rem),
    var(--paper);
  font-family: var(--font-world);
  line-height: 1.9;
  letter-spacing: .035em;
  min-height: 100vh;
}

button, a { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.app-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 253, 249, .88);
  box-shadow: 0 0 48px rgba(80, 62, 69, .07);
  overflow: hidden;
}

.screen { display: none; min-height: 100vh; }
.screen.is-active { display: block; animation: fade-in .38s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(7px); } }

.hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 520px;
  padding: 0;
  border: 0;
  text-align: left;
  overflow: hidden;
  background: #e9e1d7;
}
.hero img { width: 100%; height: 520px; object-fit: cover; object-position: 54% center; }
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38, 28, 34, .02) 18%, rgba(47, 34, 42, .72) 100%);
}
.hero__copy {
  position: absolute;
  left: clamp(24px, 6vw, 46px);
  right: clamp(24px, 6vw, 46px);
  bottom: 38px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(36, 27, 33, .35);
}
.hero__copy strong { display: block; margin-bottom: 24px; font-size: clamp(40px, 8vw, 58px); font-weight: 500; letter-spacing: .08em; line-height: 1.2; }
.hero__button { width: min(100%, 420px); }
.primary-button {
  width: min(100%, 500px);
  min-height: 68px;
  padding: 16px 26px;
  border: 0;
  border-radius: 20px;
  color: white;
  background: #7a587d;
  box-shadow: 0 12px 28px rgba(86, 57, 90, .20);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
}
.primary-button span { margin-left: 10px; }

/* どうする？シリーズ共通：世界観は明朝、操作はゴシック。 */
.quiz-head,
.question-card,
.choices,
.primary-button,
.corner-links,
.concierge__speech {
  font-family: var(--font-ui);
}
.hero__copy strong,
.result__catch,
.result__name,
.result-section--trip {
  font-family: var(--font-world);
}
.screen--quiz { padding: 18px clamp(14px, 4vw, 28px) 82px; }
.quiz-head { margin-bottom: 17px; }
.quiz-head__selected {
  min-height: 1.65em;
  margin: 0 0 11px;
  color: #6e5169;
  font-size: clamp(18px, 4.4vw, 21px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .01em;
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.progress { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.progress span { height: 7px; border-radius: 999px; background: #ebe4e9; transition: background .25s, transform .25s; }
.progress span.is-done { background: #c793a7; }
.progress span.is-current { background: #7a587d; transform: scaleY(1.35); }

.question-card {
  padding: 22px clamp(16px, 4vw, 28px) 25px;
  border: 1px solid rgba(211, 193, 201, .72);
  border-radius: 28px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}
.question-card.is-changing { animation: question-out .18s ease both; }
@keyframes question-out { to { opacity: 0; transform: translateX(-10px); } }

.concierge-line {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 0;
  margin-bottom: 18px;
}
.concierge-line__icon {
  width: 62px;
  height: 62px;
  border-radius: 19px;
  object-fit: cover;
  object-position: center 16%;
  box-shadow: 0 8px 22px rgba(79, 56, 67, .12);
}
.concierge-line__bubble {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 11px 17px 12px;
  border: 1px solid #eadce2;
  border-radius: 18px;
  background: #fffafa;
}
.concierge-line__bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 21px;
  width: 14px;
  height: 14px;
  background: #fffafa;
  border-left: 1px solid #eadce2;
  border-bottom: 1px solid #eadce2;
  transform: rotate(45deg);
}
.question-card h1 {
  margin: 0;
  font-size: clamp(20px, 4.7vw, 28px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .035em;
}
.choices { display: grid; gap: 10px; }
.choice {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 11px 20px 11px 12px;
  border: 1px solid #dfd3d9;
  border-radius: 20px;
  background: #fffafc;
  text-align: left;
  font-size: clamp(16px, 3.8vw, 19px);
  line-height: 1.6;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.choice:nth-child(2) { background: #f5f8fc; border-color: #d5dce7; }
.choice:nth-child(3) { background: #fbf8f6; }
.choice:hover, .choice:focus-visible { transform: translateY(-2px); border-color: #aa7990; outline: none; }
.choice.is-selected { background: #ead3dc; border-color: #aa7990; transform: scale(.985); }
.choice__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #765164;
  background: rgba(255, 255, 255, .78);
  font-size: 17px;
}

.screen--thinking { display: none; place-items: center; padding: 30px; }
.screen--thinking.is-active { display: grid; }
.thinking-card { width: min(100%, 520px); text-align: center; }
.thinking-concierge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}
.thinking-concierge img {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  object-fit: cover;
  object-position: center 16%;
  box-shadow: 0 8px 22px rgba(79, 56, 67, .12);
}
.thinking-concierge__speech {
  width: 100%;
  padding: 24px 26px;
  border: 1px solid #eadce2;
  border-radius: 24px;
  background: #fffafa;
  text-align: center;
}
.thinking-concierge__speech p {
  margin: 0;
  color: #60485c;
  font-size: clamp(19px, 4.5vw, 23px);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: .025em;
}
.map-loader-unused { position: relative; width: 230px; height: 86px; margin: auto; }
.map-loader-unused::before { content: ""; position: absolute; left: 16px; right: 16px; top: 42px; border-top: 2px dashed #c89aae; }
.map-loader-unused i { position: absolute; top: 33px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid #c89aae; animation: map-point 1.25s ease-in-out infinite; }
.map-loader-unused i:nth-child(1) { left: 5px; }
.map-loader-unused i:nth-child(2) { left: 72px; animation-delay: .15s; }
.map-loader-unused i:nth-child(3) { left: 139px; animation-delay: .3s; }
.map-loader-unused i:nth-child(4) { right: 5px; animation-delay: .45s; }
@keyframes map-point { 0%, 65%, 100% { transform: scale(.75); opacity: .55; } 32% { transform: scale(1.15); opacity: 1; } }

.screen--result { padding-bottom: 96px; }
.result__head { padding: 44px 18px 28px; text-align: center; }
.result__catch {
  margin: 0;
  font-size: clamp(20px, 4.9vw, 31px);
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: .025em;
}
.result__catch span { display: block; white-space: nowrap; }
.result__image {
  width: calc(100% - 32px);
  margin: 0 16px;
  border-radius: 26px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.result__identity { padding: 28px 18px 4px; text-align: center; overflow: hidden; }
.result__name {
  display: inline-block;
  margin: 0 auto;
  max-width: calc(100% - 8px);
  color: #6d526e;
  font-size: clamp(28px, 6.2vw, 46px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .055em;
  white-space: nowrap;
}
.result__body { padding: 24px clamp(24px, 7vw, 52px) 0; }
.result-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.result-section p { margin: 0; font-size: 16px; }
.result-section p + p { margin-top: 15px; }
.result-section--trip p { font-size: 16px; line-height: 2; }
.result-section--trip p + p { margin-top: 17px; }
.result__emotion { font-weight: 500; }
.retry { display: block; width: 100%; margin: 38px 0 0; }

.corner-links {
  position: fixed;
  z-index: 20;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  gap: 7px;
}
.corner-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(115,84,119,.16);
  border-radius: 14px;
  color: #655568;
  background: rgba(255,253,250,.94);
  box-shadow: 0 5px 16px rgba(64,54,68,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

@media (max-width: 780px) {
  .app-shell { box-shadow: none; }
}
@media (max-width: 480px) {
  .hero, .hero img { min-height: 455px; height: 455px; }
  .question-card { padding: 18px 14px 21px; }
  .concierge-line { grid-template-columns: 56px 1fr; gap: 10px; }
  .concierge-line__icon { width: 56px; height: 56px; border-radius: 17px; }
  .concierge-line__bubble { min-height: 56px; padding: 9px 14px 10px; }
  .choice { min-height: 72px; padding-right: 14px; }
  .result__image { width: calc(100% - 20px); margin: 0 10px; border-radius: 20px; }
  .result__identity { padding-left: 12px; padding-right: 12px; }
  .result__name { max-width: calc(100% - 6px); letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}




/* お肌どうする？ v2｜Q2Q1の6軸2タグ方式 */
:root { --accent:#7a587d; --accent-soft:#ead3dc; }

.screen--thinking { min-height: 520px; }
.shape-wrap { width: 100%; margin: 4px auto 0; }
.shape-svg { display:block; width:min(100%,320px); margin:auto; overflow:visible; }
.shape-ring { fill:none; stroke:#ddd2d8; stroke-width:1.2; }
.shape-axis { stroke:#e6dce1; stroke-width:1; }
.shape-area {
  fill:rgba(184,121,145,.24);
  stroke:#9f6d82;
  stroke-width:2.5;
  animation:shape-in .65s ease both;
  transform-origin:center;
}
@keyframes shape-in {
  from { opacity:.15; transform:scale(.65); }
  to { opacity:1; transform:scale(1); }
}

.result-actions { margin: 30px 0 0; }
.retry { width:100%; margin:0; }

.debug-panel {
  margin: 26px 0 0;
  padding: 12px 14px;
  border: 1px dashed #b9a7b1;
  border-radius: 14px;
  background: #faf7f9;
  color: #4d4350;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.debug-panel summary { cursor:pointer; font-family:var(--font-ui); font-weight:700; }
.debug-panel pre {
  margin: 12px 0 0;
  max-height: 420px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  line-height:1.55;
}

@media (max-width:480px) {
  .screen--thinking { padding:26px 24px; }
  .thinking-concierge { gap:14px; margin-bottom:24px; }
  .thinking-concierge img { width:74px; height:74px; border-radius:22px; }
  .thinking-concierge__speech { padding:21px 18px; }
}

/* お肌どうする？ v3｜四行詩後のオリジナル体験 */
.result-concierge {
  display:grid;
  grid-template-columns:62px 1fr;
  align-items:start;
  gap:12px;
  margin:30px 0 18px;
  font-family:var(--font-ui);
}
.result-concierge img {
  width:62px;
  height:62px;
  border-radius:19px;
  object-fit:cover;
  object-position:center 16%;
  box-shadow:0 8px 22px rgba(79,56,67,.12);
}
.result-concierge__bubble {
  position:relative;
  min-height:62px;
  padding:11px 17px 12px;
  border:1px solid #eadce2;
  border-radius:18px;
  background:#fffafa;
  color:#60485c;
}
.result-concierge__bubble::before {
  content:"";
  position:absolute;
  left:-8px;
  top:21px;
  width:14px;
  height:14px;
  background:#fffafa;
  border-left:1px solid #eadce2;
  border-bottom:1px solid #eadce2;
  transform:rotate(45deg);
}
.result-concierge__bubble p { margin:0; font-size:15px; line-height:1.75; font-weight:600; }
.result-concierge__bubble p + p { margin-top:2px; }

.care-flow { margin-top:8px; font-family:var(--font-ui); }
.care-title {
  margin:28px 0 12px;
  color:#6d526e;
  font-family:var(--font-world);
  font-size:clamp(24px,5vw,32px);
  font-weight:500;
  text-align:center;
  letter-spacing:.055em;
}
.care-list { display:grid; gap:13px; }
.care-step {
  padding:18px;
  border:1px solid #e4d7dd;
  border-radius:21px;
  background:#fff;
  box-shadow:0 8px 24px rgba(79,56,67,.055);
}
.care-step__head { display:flex; gap:12px; align-items:flex-start; }
.care-step__number {
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:13px;
  background:#f4e8ed;
  color:#765164;
  font-weight:700;
}
.care-step__text { padding-top:1px; }
.care-step__text p { margin:0; color:#66545f; font-size:15px; line-height:1.85; }
.care-step__text p + p { margin-top:6px; }
.care-step__number.is-plus { width:46px; font-size:13px; letter-spacing:.01em; }



.mini-choices { display:grid; gap:9px; }
.mini-choice {
  display:grid;
  grid-template-columns:34px 1fr;
  align-items:center;
  min-height:52px;
  padding:10px 14px;
  border:1px solid #dfd3d9;
  border-radius:16px;
  background:#fffafc;
  color:var(--ink);
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.mini-choice:hover,.mini-choice:focus-visible { border-color:#aa7990; outline:none; transform:translateY(-1px); }
.mini-choice.is-selected { background:#ead3dc; border-color:#aa7990; }
.mini-choice span { color:#765164; font-weight:700; }


@media (max-width:480px) {
  .result-concierge { grid-template-columns:56px 1fr; gap:10px; }
  .result-concierge img { width:56px; height:56px; border-radius:17px; }
  .result-concierge__bubble { min-height:56px; padding:9px 14px 10px; }
  .care-step { padding:16px 14px; }
  
}

/* ohada v5: 2文リズム＋なに買う？商品発見フロー */
.result-concierge__bubble p{
  margin:0;
  font-size:15px;
  line-height:1.85;
  font-weight:600;
}
.care-step__content{
  flex:1 1 auto;
  min-width:0;
  padding-top:0;
}
.care-step__title{
  margin:0 0 6px;
  color:#664f61;
  font-size:clamp(17px,3.8vw,18px);
  font-weight:700;
  line-height:1.5;
}
.care-step__text{
  margin:0;
  color:#66545f;
  font-size:15px;
  line-height:1.85;
}
.product-flow{
  margin-top:10px;
  font-family:var(--font-ui);
}
.product-flow .result-concierge{
  margin-top:20px;
}
.product-card{
  width:100%;
  margin:18px 0 0;
  padding:20px 19px;
  border:1px solid #e4d7dd;
  border-radius:21px;
  background:#fff;
  box-shadow:0 8px 24px rgba(79,56,67,.055);
}
.discovery-product-card h3{
  margin:0 0 9px;
  color:#5f4d60;
  font-size:21px;
  line-height:1.55;
  font-weight:600;
  text-align:center;
}
.discovery-product-card p{
  margin:0;
  color:#66545f;
  font-size:15px;
  line-height:1.85;
  text-align:left;
}
.product-choice-actions{
  display:grid;
  gap:10px;
  margin:12px 0 0;
}
.product-choice-actions[hidden]{display:none!important;}
.product-choice-button{
  width:100%;
  min-height:56px;
  padding:12px 18px;
  border:1px solid #dfd3d9;
  border-radius:17px;
  background:#fffafc;
  color:var(--ink);
  font:inherit;
  font-size:15px;
  line-height:1.55;
  text-align:center;
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background-color .16s ease;
}
.product-choice-button:hover,.product-choice-button:focus-visible{
  border-color:#aa7990;
  outline:none;
  transform:translateY(-1px);
}
.product-choice-button--view{font-weight:700;}
.product-choice-button--alternative{background:#fff;}
.product-commerce[hidden]{display:none!important;}
.product-commerce{scroll-margin-top:16px;}
.product-commerce .product-card--stores{margin-top:12px;}
.store-section{display:grid;gap:10px;}
.store-section + .store-section{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #eee3e8;
}
.store-section__head{
  color:#6d526e;
  font-size:14px;
  font-weight:600;
  line-height:1.6;
  text-align:center;
}
.store-section__head--refine{font-size:15px;}
.store-pr{
  margin-left:6px;
  color:var(--muted);
  font-size:10.5px;
  font-weight:400;
  line-height:1;
  letter-spacing:.08em;
}
.store-actions{display:grid;gap:10px;margin-top:0;}
.store-button--intro{
  display:grid;
  place-items:center;
  gap:4px;
  width:100%;
  min-height:58px;
  padding:12px 16px;
  border:1px solid #cdbac5;
  border-radius:17px;
  color:#6e5169;
  background:#fff;
  text-decoration:none;
  font-weight:700;
  text-align:center;
}
.store-button--intro>span{display:block;}
.store-button__note{
  display:block;
  color:#9a8796;
  font-size:11.5px;
  font-weight:400;
  line-height:1.55;
}
.store-section--refine .refine-choices{margin:0;gap:8px;}
.refine-choices .mini-choice{min-height:52px;margin:0;}
.refine-choices .mini-choice.is-selected{
  border-color:#aa7990;
  background:#fff4f8;
  color:#6e5169;
}
.rakuten-api-results:empty{display:none;}
.rakuten-api-results{margin:0;padding:0;}
.rakuten-api-loading,.rakuten-api-message{
  padding:16px;
  border-radius:16px;
  background:#faf7f3;
  color:#715a6d;
  font-size:14px;
  line-height:1.8;
}
.rakuten-api-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
}
.rakuten-api-head strong{
  color:#6d526e;
  font-size:16px;
  line-height:1.6;
}
.rakuten-items{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.rakuten-item{
  display:grid;
  grid-template-columns:92px 1fr;
  gap:12px;
  align-items:start;
  min-width:0;
  padding:12px;
  border:1px solid #eadde4;
  border-radius:16px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  transition:transform .16s ease,border-color .16s ease;
}
.rakuten-item:hover,.rakuten-item:focus-visible{
  border-color:#cfaebe;
  transform:translateY(-1px);
  outline:none;
}
.rakuten-item img{
  width:92px;
  height:92px;
  border-radius:12px;
  object-fit:cover;
  background:#f8f4f6;
}
.rakuten-item__body{display:grid;gap:6px;min-width:0;}
.rakuten-item__body strong{
  display:-webkit-box;
  overflow:hidden;
  color:#5f4c60;
  font-size:13.5px;
  line-height:1.5;
  font-weight:600;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
.rakuten-item__meta{
  display:grid;
  gap:4px;
  color:#765775;
  font-size:15px;
  font-weight:600;
}
.rakuten-item__meta small{
  overflow:hidden;
  color:#9a8796;
  font-size:10.5px;
  font-weight:400;
  line-height:1.45;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rakuten-api-retry{
  display:block;
  width:100%;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #cdbac5;
  border-radius:13px;
  background:#fff;
  color:#6e5169;
  font:inherit;
  cursor:pointer;
}
@media(max-width:560px){
  .rakuten-items{grid-template-columns:1fr;}
  .rakuten-item{grid-template-columns:82px 1fr;}
  .rakuten-item img{width:82px;height:82px;}
}

.a8-impression{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none;}
