:root {
  --night: #2b2d5c;
  --night-2: #4b4f91;
  --dawn: #f6c9a8;
  --ink: #26263a;
  --ink-2: #5d5e75;
  --paper: #fbf9f6;
  --card: #ffffff;
  --line: #e6e3ee;
  --accent: #6b5fd3;
  --accent-soft: #ece9fb;
  --fire: #e2723f;
  --water: #3f8fd2;
  --line-green: #06c755;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', 'Meiryo', sans-serif;
  line-height: 1.75;
  font-size: 17px;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.screen[hidden] { display: none; }

h1, h2 { line-height: 1.4; margin: 0; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h2:first-child { margin-top: 0; }
p { margin: 0 0 8px; }

.hero, .result-head {
  margin: 0 -16px 16px;
  padding: 48px 24px 32px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .25) 0 2px, transparent 3px),
    radial-gradient(circle at 15% 35%, rgba(255, 255, 255, .2) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, .18) 0 1.5px, transparent 2.5px),
    linear-gradient(170deg, var(--night) 0%, var(--night-2) 60%, #b88fb5 92%, var(--dawn) 100%);
}

.hero h1 { font-size: 30px; letter-spacing: .04em; margin-bottom: 12px; }
.result-head h1 { font-size: 26px; margin: 6px 0; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .2em;
  opacity: .85;
  margin-bottom: 6px;
}
.lead { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.sub { font-size: 14px; opacity: .9; }
.code { font-size: 15px; letter-spacing: .25em; opacity: .9; }
.catch { font-size: 18px; font-weight: 700; margin-top: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(43, 45, 92, .05);
}

.meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: var(--ink-2);
  font-size: 14px;
}

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn[hidden] { display: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.dark { background: #111; color: #fff; }
.btn.line { background: var(--line-green); color: #fff; }
.btn.ghost { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn.text { background: none; color: var(--ink-2); font-weight: 400; }
.btn:active { transform: translateY(1px); }

.axes-intro ul { list-style: none; padding: 0; margin: 0; }
.axes-intro li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.axes-intro li:last-child { border-bottom: none; }
.axes-intro b { display: block; }
.axes-intro .pair { color: var(--ink-2); }

.note { color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.note.small { font-size: 12px; margin-top: 10px; }

/* 質問 */
.progress { padding: 24px 0 12px; }
.progress-label { text-align: center; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.bar { height: 8px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .25s; }

.q-card { min-height: 420px; }
.q-text { font-size: 21px; font-weight: 700; line-height: 1.6; margin: 8px 0 24px; min-height: 4.8em; }
.choices { display: grid; gap: 10px; }
.choice {
  min-height: 54px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
}
.choice.selected { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.choice:active { background: var(--accent-soft); }

/* 結果 */
.axes { display: grid; gap: 14px; }
.axis-name { font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
.axis-row { display: grid; grid-template-columns: 4.5em 1fr 4.5em; align-items: center; gap: 8px; font-size: 14px; }
.axis-row .left { text-align: left; }
.axis-row .right { text-align: right; }
.axis-row .on { font-weight: 700; color: var(--accent); }
.axis-bar { position: relative; height: 10px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.axis-bar .fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); border-radius: 99px; }
.axis-pct { font-size: 12px; color: var(--ink-2); text-align: center; }

.dots { padding-left: 1.2em; margin: 0 0 8px; }
.dots li { margin: 2px 0; }

.weather { background: linear-gradient(160deg, #f1f6fd, #fdf3ec); }
.weather-name { font-size: 18px; font-weight: 700; }
.step { font-weight: 700; }
.message { background: linear-gradient(160deg, #2b2d5c, #4b4f91); color: #fff; border: none; }
.message h2 { color: #f6d9c4; }

#image-box img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(30, 30, 50, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 14px;
  z-index: 10;
}
.toast[hidden] { display: none; }

.title-base { display: block; }
.title-variant { display: block; font-size: 20px; font-weight: 700; opacity: .92; margin-top: 2px; }
.axes-intro .pair { display: block; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.tag {
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
}

h3 { font-size: 14px; color: var(--ink-2); margin: 10px 0 4px; }
.advice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.advice h3 { color: var(--accent); margin-top: 0; }
.advice p:last-child { margin-bottom: 0; }
.summary { border: 2px solid var(--accent-soft); }

.history { list-style: none; padding: 0; margin: 0; }
.history-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.history-item:active { background: var(--accent-soft); }
.history-date { display: block; font-size: 12px; color: var(--ink-2); }
.history-title { display: block; font-weight: 700; }
