:root {
  --bg: #FAF8F4;
  --text: #2B2B2B;
  --muted: #6B6B6B;
  --accent: #2A9D8F;
  --accent-dark: #1F7A6F;
  --line: #06C755;
  --card: #FFFFFF;
  --border: #E8E4DD;
  --shadow: 0 4px 24px rgba(43, 43, 43, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.hero {
  text-align: center;
  padding: 24px 0 40px;
}

.hero .badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}

.hero p {
  color: var(--muted);
  font-size: 14px;
}

/* Progress */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}
.progress span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}
.progress span.done {
  background: var(--accent);
}

/* Question card */
.q-card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.q-num {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.q-text {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.6;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice {
  display: block;
  width: 100%;
  text-align: left;
  background: #FBFAF7;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1.5;
}
.choice:hover {
  border-color: var(--accent);
  background: #FFF;
  transform: translateY(-1px);
}
.choice:active {
  transform: translateY(0);
}

/* Result page */
.result-card {
  background: var(--card);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.pattern-illust {
  display: block;
  width: 220px;
  height: auto;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: #FBFAF7;
}

.result-pattern-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--card);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 700;
}

.result-label {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.result-tagline {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.result-summary {
  background: #FBFAF7;
  padding: 20px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
  white-space: pre-wrap;
}

.gauge {
  background: var(--border);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.8s ease;
}
.gauge-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-bottom: 20px;
}

.teaser-box {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}
.teaser-box::before {
  content: "🔒 続きはLINEで";
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg);
  padding: 0 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.teaser-box .hook {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.teaser-box ul {
  list-style: none;
  padding: 0;
}
.teaser-box li {
  font-size: 14px;
  padding: 8px 0;
  color: var(--muted);
  border-bottom: 1px dotted var(--border);
}
.teaser-box li:last-child {
  border-bottom: none;
}

.line-cta {
  display: block;
  width: 100%;
  background: var(--line);
  color: #FFF;
  text-align: center;
  padding: 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.3);
  transition: transform 0.15s;
  margin-bottom: 12px;
}
.line-cta:hover {
  transform: translateY(-2px);
}
.line-cta small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
  opacity: 0.9;
}

.code-box {
  background: #FBFAF7;
  border: 2px dashed var(--accent);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 16px;
}
.code-box .label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.code-box .code {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-family: "SF Mono", Menlo, monospace;
}
.code-box button {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.help-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}
.help-text a {
  color: var(--accent);
  text-decoration: underline;
}

.manual-fallback {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.manual-fallback summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  padding: 8px;
  user-select: none;
}
.manual-fallback summary:hover {
  color: var(--accent);
}
.manual-fallback[open] summary {
  margin-bottom: 12px;
}

/* Full result page */
.section {
  background: var(--card);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section p {
  font-size: 15px;
  line-height: 1.8;
}
.section ul {
  list-style: none;
  padding: 0;
}
.section li {
  font-size: 15px;
  line-height: 1.7;
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.section li:last-child {
  border-bottom: none;
}
.section li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--accent);
  font-weight: 700;
}
.section.noda {
  background: #FFF8E7;
  border-left: 4px solid #F4A261;
}
.section.noda h2 {
  color: #B7651E;
}

/* Loading / error */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.fade-in {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
