/* Harness Affiliate LP — Base styles. Mobile-first. No build step. */

:root {
  --bg: #0b0d12;
  --bg-card: #141821;
  --bg-elev: #1c2230;
  --text: #e8ecf3;
  --text-dim: #98a3b8;
  --accent: #6ea8ff;
  --accent-strong: #4f8cff;
  --accent-bg: #1b2640;
  --border: #2a3242;
  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --maxw: 560px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
               'Yu Gothic', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  padding: 16px 14px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wrap { width: 100%; max-width: var(--maxw); }

header.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 0 24px;
}
header.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

.hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--bg-card);
}
.hero img { display: block; width: 100%; height: auto; }

h1 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
  margin: 24px 0 10px;
}

p {
  color: var(--text);
  margin-bottom: 12px;
}
p.lead {
  color: var(--text-dim);
  font-size: 15px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

/* Q&A buttons (large tap targets, mobile-first) */
.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice {
  display: block;
  text-decoration: none;
  background: var(--bg-elev);
  color: var(--text);
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.choice:hover { background: var(--accent-bg); border-color: var(--accent); }
.choice:active { transform: scale(0.99); }
.choice .label {
  display: inline-block;
  width: 22px; height: 22px; line-height: 22px;
  text-align: center; border-radius: 50%;
  background: var(--accent); color: #0b0d12;
  font-weight: 700; font-size: 12px;
  margin-right: 10px; vertical-align: -1px;
}

/* Primary CTA (used on entry + result pages) */
.cta {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--accent-strong);
  color: #fff;
  padding: 16px 22px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  margin: 18px 0 12px;
  box-shadow: 0 6px 22px rgba(79, 140, 255, 0.25);
  transition: background 0.15s, transform 0.05s;
}
.cta:hover { background: #3a78ec; }
.cta:active { transform: scale(0.99); }

.cta-secondary {
  display: block;
  text-align: center;
  text-decoration: underline;
  color: var(--text-dim);
  padding: 10px;
  font-size: 14px;
}

.progress {
  display: flex; gap: 6px;
  margin: 6px 0 18px;
}
.progress .step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border);
}
.progress .step.done { background: var(--accent); }

.pr-notice {
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 22px;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  margin-right: 6px;
}

.result-highlight {
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 14px 0 18px;
  font-size: 15px;
}

footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

footer a { color: var(--text-dim); }

/* ===== Diagnostic Loading (route.html) ===== */
.loading-container {
  text-align: center;
  padding: 40px 18px;
}
.loading-container h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.loading-messages {
  position: relative;
  min-height: 56px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.loading-msg {
  opacity: 0;
  transition: opacity 0.5s;
  position: absolute;
  left: 0; right: 0;
  margin: 0;
}
.loading-msg.active { opacity: 1; }

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 24px;
}
.progress-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 3px;
  animation: progress 3.5s ease-out forwards;
}
@keyframes progress { to { width: 100%; } }

.loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Diagnostic Report (result pages カルテ風) ===== */
.diagnosis-report {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  position: relative;
}
.diagnosis-report::before {
  content: "AI 診断レポート";
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  position: absolute;
  top: -10px;
  left: 14px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.diagnosis-report .report-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.diagnosis-report .report-row:last-child { border-bottom: none; }
.diagnosis-report .report-label {
  flex: 0 0 90px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  padding-top: 2px;
}
.diagnosis-report .report-value {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

/* Gemini-generated persona hero background (text overlaid in HTML = accurate JP) */
.herobg{background-image:linear-gradient(180deg,rgba(11,13,18,.40),rgba(11,13,18,.92)),var(--herobg);background-size:cover;background-position:center;border:1px solid var(--border);border-radius:var(--radius);padding:20px 18px 22px;margin-bottom:16px}
.herobg .brand{margin-bottom:14px}
.herobg h1{margin-bottom:10px}
.herobg .lead{margin-bottom:0;color:#dbe2ee}
