/* ===================================
   PWA Install Guide - Stylesheet
   Clean, White, Minimal
   =================================== */

:root {
  /* Colors - Light Theme */
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-surface-hover: #f1f3f4;
  --color-border: #e5e7eb;
  --color-border-light: #f0f0f0;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-text-dim: #9ca3af;
  
  /* Accent Colors */
  --color-accent: #2563eb;
  --color-accent-light: #3b82f6;
  --color-accent-bg: #eff6ff;
  
  /* Device specific accents */
  --color-iphone: #007aff;
  --color-iphone-bg: #f0f7ff;
  --color-android: #34a853;
  --color-android-bg: #f0fdf4;
  --color-pc: #6366f1;
  --color-pc-bg: #f5f3ff;
  
  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-lg);
  padding-bottom: var(--space-3xl);
}

/* ===================================
   Header
   =================================== */
.header {
  padding: var(--space-md) 0;
  margin-bottom: var(--space-xl);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}




/* ===================================
   Hero Section
   =================================== */
.hero {
  text-align: center;
  margin-bottom: var(--space-2xl);
	padding: 1em 0;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent-bg);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease backwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

.gradient-text {
  color: var(--color-accent);
}

.hero-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  max-width: 320px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}


/* ===================================
   Device Tabs
   =================================== */
.device-tabs {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-xs);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease 0.3s backwards;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text-dim);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
}

.tab-btn:hover {
  color: var(--color-text-muted);
}

.tab-btn:hover .tab-icon {
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-btn[data-device="iphone"].active {
  color: var(--color-iphone);
}

.tab-btn[data-device="android"].active {
  color: var(--color-android);
}

.tab-btn[data-device="pc"].active {
  color: var(--color-pc);
}

/* ===================================
   Guide Content
   =================================== */
.device-guide {
  display: none;
  animation: fadeIn 0.4s ease;
}

.device-guide.active {
  display: block;
}

/* Browser Note */
.browser-note {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-accent-bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.browser-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.browser-note strong {
  color: var(--color-text);
}

#guide-iphone .browser-note {
  background: var(--color-iphone-bg);
}

#guide-iphone .browser-note svg {
  color: var(--color-iphone);
}

#guide-android .browser-note {
  background: var(--color-android-bg);
}

#guide-android .browser-note svg {
  color: var(--color-android);
}

#guide-pc .browser-note {
  background: var(--color-pc-bg);
}

#guide-pc .browser-note svg {
  color: var(--color-pc);
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.step {
  display: flex;
  gap: var(--space-md);
}

.step-number {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
}

#guide-iphone .step-number {
  background: var(--color-iphone);
}

#guide-android .step-number {
  background: var(--color-android);
}

#guide-pc .step-number {
  background: var(--color-pc);
}

.step-content {
	flex: 1;
	min-width: 0;
	margin-right: 1em;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.7;
	text-align: left;
	min-height: 48px;
}

.highlight {
  color: var(--color-text);
  background: var(--color-surface);
  padding: 0.125em 0.375em;
  border-radius: 4px;
  font-weight: 500;
}

/* Step Image */
.step-image {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
#guide-iphone .step-image, #guide-android .step-image {
  aspect-ratio: unset;
}
#guide-pc .step-image {
  aspect-ratio: unset;
}




.step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.step-image img[src]:not([src=""]) {
  display: block;
}

.step-image img[src]:not([src=""]) + .image-placeholder {
  display: none;
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--color-text-dim);
}

.image-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.image-placeholder span {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.5;
}

/* Completion Card */
.completion-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

#guide-iphone .completion-card {
  background: var(--color-iphone-bg);
  border-color: transparent;
}

#guide-android .completion-card {
  background: var(--color-android-bg);
  border-color: transparent;
}

#guide-pc .completion-card {
  background: var(--color-pc-bg);
  border-color: transparent;
}

.completion-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border-radius: 50%;
  color: white;
}

#guide-iphone .completion-icon {
  background: var(--color-iphone);
}

#guide-android .completion-icon {
  background: var(--color-android);
}

#guide-pc .completion-icon {
  background: var(--color-pc);
}

.completion-icon svg {
  width: 24px;
  height: 24px;
}

.completion-card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ===================================
   FAQ Section
   =================================== */
.faq {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
    width: 100%;
    padding: 0 2em;
}

.faq-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-text-dim);
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: var(--color-accent);
}

.faq-item p {
  padding-bottom: var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Tablet Responsive
   =================================== */
@media (min-width: 768px) {
  .container {
    max-width: 680px;
    padding: var(--space-2xl);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-desc {
    font-size: 1rem;
    max-width: 400px;
  }

  .tab-btn {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
  }

  .step {
    gap: var(--space-lg);
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .step-title {
    font-size: 1.125rem;
  }
}

/* ===================================
   PC Responsive - 横並び俯瞰表示
   =================================== */
@media (min-width: 768px) {
  .container {
    max-width: 1600px;
    padding: var(--space-2xl) var(--space-3xl);
  }
  .header {
    margin-bottom: var(--space-2xl);
  }

  .hero {
    margin-bottom: var(--space-2xl);
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-desc br {
    display: none;
  }

  .device-tabs {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-2xl);
  }

.step-content {
	margin-right: 0;
}


  /* Steps を横並びに */
  .steps {
    flex-direction: row;
    gap: var(--space-xl);
  }

  .step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }

  .step-content {
    width: 100%;
  }

  .step-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
  }

  .step-desc {
    margin-bottom: var(--space-lg);
  }

  .step-image {
    aspect-ratio: 4 / 3;
  }

#guide-iphone .step-image, #guide-android .step-image {
  aspect-ratio: unset;
}
#guide-pc .step-image {
  aspect-ratio: unset;
}


  /* Completion Card 中央揃え */
  .completion-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  /* FAQ を2カラムに */
  .faq {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .faq-title {
    text-align: center;
  }

  .faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--space-2xl);
  }

}

@media (min-width: 1280px) {
  .step-image {
    aspect-ratio: 16 / 10;
  }

  .hero-title {
    font-size: 3rem;
  }
}

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