/* =============================================
   GootHands AIスタッフ導入パッケージ セットアップガイド
   Style Sheet
   ============================================= */

:root {
  --primary: #1a56db;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-bg: #eff6ff;
  --accent: #06b6d4;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-900);
  background: #f8fafc;
}

/* =============================================
   Header
   ============================================= */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.header-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 16px;
}

.site-header h1 {
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  position: relative;
}

.site-header p {
  font-size: 15px;
  opacity: .88;
  max-width: 560px;
  margin: 0 auto 20px;
  position: relative;
}

.header-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.header-tag {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
}

/* =============================================
   Navigation / Progress
   ============================================= */
.toc-bar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.toc-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.toc-inner::-webkit-scrollbar { display: none; }

.toc-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.toc-item:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-light);
}

.toc-item .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--gray-200);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-700);
  flex-shrink: 0;
}

/* =============================================
   Main Layout
   ============================================= */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* =============================================
   Intro Card
   ============================================= */
.intro-card {
  background: var(--primary-bg);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.intro-card h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-card p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.intro-card p:last-child { margin-bottom: 0; }

/* =============================================
   Step Sections
   ============================================= */
.step-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.step-header:hover {
  background: var(--gray-50);
}

.step-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.step-number.step-0 {
  background: linear-gradient(135deg, var(--gray-500) 0%, var(--gray-700) 100%);
}

.step-header-text {
  flex: 1;
}

.step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.step-section:nth-child(2) .step-label { color: var(--gray-500); }

.step-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.3;
}

.step-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

.step-toggle {
  font-size: 20px;
  color: var(--gray-300);
  transition: transform .25s;
  flex-shrink: 0;
  margin-top: 4px;
}

.step-section.open .step-toggle {
  transform: rotate(180deg);
}

.step-body {
  display: none;
  padding: 0 24px 28px;
  border-top: 1px solid var(--gray-100);
}

.step-section.open .step-body {
  display: block;
}

/* =============================================
   Content Elements
   ============================================= */
.step-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-body h3:first-child { margin-top: 20px; }

.step-body p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 12px;
  line-height: 1.8;
}

.step-body ul, .step-body ol {
  padding-left: 0;
  margin-bottom: 12px;
  list-style: none;
}

.step-body ul li, .step-body ol li {
  font-size: 14px;
  color: var(--gray-700);
  padding: 4px 0 4px 24px;
  position: relative;
  line-height: 1.7;
}

.step-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.step-body ol {
  counter-reset: step-counter;
}

.step-body ol li {
  counter-increment: step-counter;
}

.step-body ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: 7px;
}

/* =============================================
   Code Block
   ============================================= */
.code-block {
  position: relative;
  margin: 14px 0;
}

.code-block pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, monospace;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.code-block pre .comment { color: #64748b; }
.code-block pre .cmd { color: #93c5fd; }
.code-block pre .output { color: #86efac; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.copy-btn:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.copy-btn.copied {
  background: rgba(16,185,129,.2);
  border-color: rgba(16,185,129,.4);
  color: #86efac;
}

/* =============================================
   Callout Boxes
   ============================================= */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.7;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout p { margin-bottom: 0; font-size: 13px; }
.callout ul { margin-bottom: 0; }
.callout ul li { font-size: 13px; }

.callout.tip {
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  color: var(--gray-700);
}

.callout.tip .callout-title { color: var(--primary-dark); }

.callout.warning {
  background: var(--warning-bg);
  border-left: 3px solid var(--warning);
  color: var(--gray-700);
}

.callout.warning .callout-title { color: #92400e; }

.callout.success {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  color: var(--gray-700);
}

.callout.success .callout-title { color: #065f46; }

.callout.danger {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  color: var(--gray-700);
}

.callout.danger .callout-title { color: #991b1b; }

/* =============================================
   Cards Grid (for choices)
   ============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.choice-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all .2s;
}

.choice-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.choice-card .card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.choice-card .card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.choice-card .card-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.6;
}

.choice-card .card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 8px;
}

.card-badge.recommended {
  background: #dcfce7;
  color: #166534;
}

.card-badge.popular {
  background: #dbeafe;
  color: #1e40af;
}

.card-badge.easy {
  background: #fef3c7;
  color: #92400e;
}

/* =============================================
   API Key Items
   ============================================= */
.api-section {
  margin: 16px 0;
}

.api-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}

.api-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.api-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--gray-50);
  transition: background .15s;
}

.api-item-header:hover { background: #f0f9ff; }

.api-required-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}

.api-optional-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-200);
  color: var(--gray-700);
}

.api-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  flex: 1;
}

.api-item-desc {
  font-size: 12px;
  color: var(--gray-500);
}

.api-item-toggle {
  color: var(--gray-400);
  transition: transform .2s;
  font-size: 14px;
}

.api-item.open .api-item-toggle {
  transform: rotate(180deg);
}

.api-item-body {
  display: none;
  padding: 14px 16px;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
}

.api-item.open .api-item-body {
  display: block;
}

/* =============================================
   Agent Cards
   ============================================= */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.agent-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
}

.agent-card:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.agent-icon { font-size: 28px; margin-bottom: 6px; }
.agent-name { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.agent-role { font-size: 11px; color: var(--gray-500); line-height: 1.4; }

/* =============================================
   Error Table
   ============================================= */
.error-list {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 14px 0;
}

.error-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}

.error-item:last-child { border-bottom: none; }

.error-item:nth-child(even) { background: var(--gray-50); }

.error-cause {
  color: var(--danger);
  font-weight: 600;
}

.error-fix {
  color: var(--gray-700);
}

/* =============================================
   Support CTA
   ============================================= */
.support-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-top: 32px;
}

.support-cta h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.support-cta p {
  font-size: 14px;
  opacity: .88;
  margin-bottom: 20px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
}

.btn-white {
  background: #fff;
  color: var(--primary-dark);
}

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,.1);
}

/* =============================================
   Footer
   ============================================= */
footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 12px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* =============================================
   Utility
   ============================================= */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 16px 0;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-yellow { background: #fef3c7; color: #92400e; }

.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 640px) {
  .toc-item span:not(.step-num) { display: none; }
  .toc-item { padding: 12px 10px; }

  .step-header { padding: 18px 16px; gap: 12px; }
  .step-body { padding: 0 16px 22px; }
  .step-title { font-size: 16px; }

  .card-grid { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: repeat(2, 1fr); }

  .error-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cta-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .agent-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   Scroll Animation
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-section {
  animation: fadeInUp .3s ease both;
}

.step-section:nth-child(1) { animation-delay: .05s; }
.step-section:nth-child(2) { animation-delay: .10s; }
.step-section:nth-child(3) { animation-delay: .15s; }
.step-section:nth-child(4) { animation-delay: .20s; }
.step-section:nth-child(5) { animation-delay: .25s; }
.step-section:nth-child(6) { animation-delay: .30s; }
.step-section:nth-child(7) { animation-delay: .35s; }
.step-section:nth-child(8) { animation-delay: .40s; }

/* =============================================
   Benefits Section (GootHands Package)
   ============================================= */
.benefits-section {
  background: linear-gradient(135deg, #1a56db 0%, #1e3a8a 100%);
  padding: 40px 16px;
  margin-bottom: 0;
}

.benefits-inner {
  max-width: 860px;
  margin: 0 auto;
}

.benefits-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(4px);
}

.benefit-check {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-heading {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.benefit-desc {
  color: rgba(255,255,255,.82);
  font-size: 0.85rem;
  line-height: 1.55;
}

.btn-order-hero {
  display: inline-block;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s;
}

.btn-order-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* FAQ list (inside API section) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 4px solid var(--primary-light);
}

.faq-q {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.faq-a {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.65;
}
