: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);
}

* { 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: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  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 .45s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }

.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; }
.screen--quiz { padding: 18px clamp(14px, 4vw, 28px) 82px; }
.quiz-head { margin-bottom: 17px; }
.quiz-head__labels { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: var(--muted); font-size: 13px; }
.quiz-head__labels b { font-size: 17px; font-weight: 500; color: var(--ink); }
.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: 23px clamp(18px, 5vw, 34px) 25px;
  border: 1px solid rgba(211, 193, 201, .72);
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
}
.question-card.is-changing { animation: question-out .22s ease both; }
@keyframes question-out { to { opacity: 0; transform: translateX(-12px); } }
.question-kind { margin: 0 0 7px; color: var(--rose); font-size: 13px; }
.question-card h1 { display: flex; align-items: center; height: 3.25em; margin: 0 0 18px; font-size: clamp(22px, 5vw, 30px); font-weight: 500; line-height: 1.55; letter-spacing: .04em; }
.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 .16s ease, border-color .16s ease, background .16s 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: 16px; }

.screen--thinking { display: none; place-items: center; padding: 30px; }
.screen--thinking.is-active { display: grid; }
.thinking-card { text-align: center; }
.thinking-card p { color: var(--muted); }
.thinking-title { margin: 28px 0 4px; color: var(--ink) !important; font-size: 21px; }
.map-loader { position: relative; width: 230px; height: 86px; margin: auto; }
.map-loader::before { content: ""; position: absolute; left: 16px; right: 16px; top: 42px; border-top: 2px dashed #c89aae; }
.map-loader 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 i:nth-child(1) { left: 5px; }
.map-loader i:nth-child(2) { left: 72px; animation-delay: .15s; }
.map-loader i:nth-child(3) { left: 139px; animation-delay: .3s; }
.map-loader 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 8px 28px; text-align: center; }
.result__catch { margin: 0; font-size: clamp(22px, 5.35vw, 36px); font-weight: 500; line-height: 1.7; letter-spacing: .025em; }
.result__catch.is-compact { font-size: clamp(19px, 4.8vw, 33px); }
.result__catch.is-small { font-size: clamp(17.5px, 4.35vw, 30px); }
.result__catch span { display: block; white-space: nowrap; }
.result__identity { padding: 28px 24px 4px; text-align: center; }
.result__name { margin: 0; color: #6d526e; font-size: clamp(46px, 10vw, 68px); font-weight: 500; line-height: 1.2; letter-spacing: .08em; }
.result__location { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.result__image { width: calc(100% - 32px); margin: 0 16px; border-radius: 26px; aspect-ratio: 3/2; object-fit: cover; box-shadow: var(--shadow); }
.result__body { padding: 34px clamp(24px, 7vw, 52px) 0; }
.result-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.result-section h2 { margin: 0 0 14px; color: #76516d; font-size: 19px; font-weight: 500; }
.result-section p { margin: 0; font-size: 16px; }
.concierge { display: block; border-bottom: 0; text-align: center; }
.concierge img { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; object-fit: cover; object-position: center 16%; box-shadow: 0 8px 22px rgba(79,56,67,.12); }
.concierge__speech { position: relative; width: 100%; padding: 20px 22px; border: 1px solid #eadce2; border-radius: 22px; background: #fffafa; text-align: left; }
.concierge__speech p { font-size: 15px; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.map-button { display: grid; place-items: center; min-height: 62px; padding: 12px; border: 1px solid #cdbac5; border-radius: 18px; color: #6e5169; background: #fff; text-decoration: none; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.5; }
.meeting { grid-column: 1 / -1; margin: 0 0 4px; color: var(--muted); text-align: center; font-size: 12px; }
.retry { display: block; width: min(100%, 390px); margin: 38px auto 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: 20px 16px 22px; }
  .question-card h1 { height: 3.15em; margin-bottom: 15px; }
  .choice { min-height: 72px; padding-right: 14px; }
  .map-actions { grid-template-columns: 1fr; }
  .meeting { grid-column: auto; }
  .result__image { width: calc(100% - 20px); margin: 0 10px; border-radius: 20px; }
  .concierge img { width: 58px; height: 58px; border-radius: 17px; }
}

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