/* 灯り・夕暮れ・ランタン。スマホ前提、文字は大きめ。 */
:root {
  --sky-top: #2b1d2e;
  --sky-mid: #6b3b3f;
  --sky-low: #d98a4e;
  --paper: #fff8ec;
  --paper-edge: #f3dfbf;
  --ink: #3a2a22;
  --ink-soft: #6d5646;
  --lantern: #e8913a;
  --lantern-deep: #c96a1f;
  --glow: rgba(255, 196, 110, 0.55);
  --line: #06c755;
  --line-deep: #04a446;
  --radius: 18px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--sky-top);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 240, 200, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 108%, var(--glow), transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  padding: 28px 20px 24px;
  box-shadow: 0 10px 40px rgba(20, 8, 0, 0.35), 0 0 60px rgba(255, 180, 90, 0.18);
}

.screen[hidden] { display: none; }

.icon {
  display: block;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(232, 145, 58, 0.35), 0 0 28px var(--glow);
}
.icon-small { width: 72px; height: 72px; }

.brand {
  margin: 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}

.title {
  margin: 4px 0 16px;
  text-align: center;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 28px;
  line-height: 1.5;
  color: var(--lantern-deep);
}

.intro p, .reading p { margin: 0 0 0.8em; }

.btn {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--lantern), var(--lantern-deep));
  box-shadow: 0 6px 18px rgba(201, 106, 31, 0.4);
}
.btn-secondary {
  color: var(--lantern-deep);
  background: #fff;
  border: 2px solid var(--lantern);
}
.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
  font-weight: 400;
  font-size: 16px;
}
.btn-line {
  font-size: 17px;
  letter-spacing: 0;
  padding-left: 10px;
  padding-right: 10px;
  color: #fff;
  background: var(--line);
  box-shadow: 0 6px 18px rgba(6, 199, 85, 0.35);
}
.btn-line:active { background: var(--line-deep); }
.btn:focus-visible, .option:focus-visible, .date:focus-visible {
  outline: 3px solid var(--lantern);
  outline-offset: 3px;
}

.progress {
  height: 8px;
  background: var(--paper-edge);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lantern), #f6c26b);
  transition: width 0.25s ease;
}
.progress-text {
  margin: 10px 0 4px;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
}

.question {
  margin: 8px 0 18px;
  font-size: 21px;
  line-height: 1.7;
  outline: none;
}

.options { display: grid; gap: 12px; }
.option {
  display: block;
  width: 100%;
  padding: 16px 18px;
  font: inherit;
  font-size: 17px;
  line-height: 1.7;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--paper-edge);
  border-radius: 14px;
  cursor: pointer;
}
@media (hover: hover) {
  .option:hover { border-color: var(--lantern); }
}
.option.selected {
  border-color: var(--lantern);
  background: #fff1dc;
}

.birthdate-label { display: block; margin: 8px 0 12px; }
.date {
  display: block;
  width: 100%;
  padding: 14px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--paper-edge);
  border-radius: 12px;
}
.error { margin: 8px 0 0; color: #b3261e; font-size: 16px; }

.result-theme {
  margin: 8px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}
.result-name {
  margin: 2px 0 20px;
  text-align: center;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 26px;
  line-height: 1.5;
  color: var(--lantern-deep);
  outline: none;
}
.label {
  margin: 24px 0 8px;
  padding-left: 12px;
  border-left: 4px solid var(--lantern);
  font-size: 17px;
  line-height: 1.6;
}
.step {
  margin: 0;
  padding: 14px 16px;
  background: #fff1dc;
  border-radius: 12px;
}
.lifepath {
  margin-top: 8px;
}
.lifepath p { margin: 0; }
.small {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.line-box {
  margin-top: 28px;
  padding: 20px 16px;
  background: #fff;
  border: 2px dashed var(--paper-edge);
  border-radius: 14px;
}
.line-lead { margin: 0; }

/* QRはPC（幅が広く、ホバーできる端末）だけ */
.qr-box { display: none; margin-top: 16px; text-align: center; }
.qr-box canvas { width: 200px; height: 200px; image-rendering: pixelated; }
@media (min-width: 720px) and (hover: hover) {
  .qr-box:not([hidden]) { display: block; }
}

@media (min-width: 720px) {
  .wrap { padding-top: 48px; }
  .card { padding: 36px 36px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar { transition: none; }
}
