/* ============================================
   Claude Code活用診断ツール
   Soft-Premium Light Theme
   ============================================ */

:root {
  --bg: #F7F6F3;
  --bg-card: #FFFFFF;
  --bg-subtle: #F0EEEB;
  --bg-accent: #FFF8F3;
  --bg-before: #F5F3F0;
  --bg-after: #FEF7F1;

  --border: #E5E2DD;
  --border-accent: rgba(194, 113, 58, 0.3);

  --text: #2D2A26;
  --text-secondary: #6B6560;
  --text-muted: #9E9891;

  --accent: #C2713A;
  --accent-dark: #A85C2D;
  --accent-light: #D4845A;
  --accent-bg: rgba(194, 113, 58, 0.08);

  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);

  --font-sans: 'Noto Sans JP', system-ui, sans-serif;
  --font-serif: 'Noto Serif JP', serif;
  --font-display: 'Outfit', var(--font-sans);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* === Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* === Button === */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(194, 113, 58, 0.25);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(194, 113, 58, 0.3);
    transform: translateY(-1px);
  }
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   Password Gate
   ============================================ */
.gate-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 1.1rem;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.15em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate-input::placeholder { color: var(--text-muted); }
.gate-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-bg);
  color: var(--accent);
  margin-bottom: 20px;
}

/* ============================================
   Intro
   ============================================ */
.intro-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 16px;
}
.intro-heading .accent { color: var(--accent); }

.intro-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.intro-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============================================
   Diagnostic - Conversation UI
   ============================================ */
.diag-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.diag-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.diag-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.diag-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.35s ease-out;
  position: relative;
}
.question-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.question-card.answered { opacity: 0.5; }
.question-card.answered::before { background: var(--border); }

.question-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.85;
  white-space: pre-wrap;
}

.answer-block {
  background: var(--bg-accent);
  border: 1px solid rgba(194, 113, 58, 0.12);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.diag-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 56px 14px 16px;
  font-size: 0.9rem;
  color: var(--text);
  resize: none;
  font-family: var(--font-sans);
  line-height: 1.7;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.diag-input::placeholder { color: var(--text-muted); }
.diag-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.send-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.send-btn:hover { background: var(--accent-dark); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.thinking-dots { display: flex; gap: 4px; align-items: center; }
.thinking-dots span {
  display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--text-muted);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================
   Generating
   ============================================ */
.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(194, 113, 58, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ============================================
   Results
   ============================================ */
.results-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.results-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Card Base --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease-out;
}

/* --- Section Heading --- */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* --- Impact Numbers --- */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.4s ease-out;
}
.impact-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.impact-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

/* --- Merits --- */
.merits-list {
  list-style: none;
  padding: 0;
}
.merit-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.merit-item:last-child { border-bottom: none; }
.merit-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}

/* --- Before / After --- */
.ba-list { display: flex; flex-direction: column; gap: 20px; }

.ba-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ba-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.ba-task {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.ba-saved-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.ba-row {
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ba-row-before { background: var(--bg-before); }
.ba-row-after { background: var(--bg-after); border-top: 1px solid var(--border); }
.ba-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}
.ba-row-before .ba-tag {
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
}
.ba-row-after .ba-tag {
  color: var(--accent);
  background: var(--accent-bg);
}
.ba-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.ba-row-after .ba-text { color: var(--text); }

/* --- Command Example (指示例ハイライト) --- */
.command-example {
  display: inline;
  background: linear-gradient(135deg, #FFF8F3 0%, #FEF0E6 100%);
  border: 1px solid rgba(194, 113, 58, 0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.84rem;
  color: var(--accent-dark);
  font-weight: 500;
}

/* --- Requirements (必要なもの) --- */
.req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .req-grid { grid-template-columns: 1fr; gap: 12px; }
}
.req-item {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.req-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.req-icon svg { width: 22px; height: 22px; }
.req-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.req-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.req-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 16px;
}

/* --- Why Claude Code --- */
.why-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.compare-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.compare-point {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.compare-row {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.compare-row:last-child { margin-bottom: 0; }
.compare-row-gpt {
  background: rgba(0, 0, 0, 0.03);
}
.compare-row-cc {
  background: var(--accent-bg);
}
.compare-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.compare-row-gpt .compare-tag {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}
.compare-row-cc .compare-tag {
  background: var(--accent);
  color: #fff;
}
.compare-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
.compare-row-cc .compare-text {
  color: var(--text);
}

/* --- Future Vision --- */
.vision-card {
  background: var(--bg-accent);
  border: 1px solid rgba(194, 113, 58, 0.15);
  border-radius: var(--radius);
  padding: 20px;
}
.vision-card p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.85;
  white-space: pre-wrap;
}

/* --- First Step --- */
.firststep-card {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 20px;
}
.firststep-card p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.85;
  white-space: pre-wrap;
}

/* --- CTA --- */
.cta-card {
  background: var(--bg-card);
  border: 2px solid var(--border-accent);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.cta-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.cta-card p:last-of-type { margin-bottom: 20px; }
.cta-card strong { color: var(--text); }
.cta-card .accent-strong { color: var(--accent); font-weight: 600; }
.cta-card .btn-primary {
  font-size: 1.05rem;
  padding: 16px 24px;
  width: 100%;
}
.cta-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ============================================
   Utilities
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
  .card { padding: 18px; }
  .cta-card { padding: 22px 18px; }
  .ba-row { padding: 12px 14px; }
  .impact-card { padding: 20px 12px; }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
