* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 32px 20px;
  text-align: center;
  background: #fff;
  color: #222;
  line-height: 1.5;
  min-height: 100vh;
}
.wrapper {
  max-width: 480px;
  margin: 0 auto;
}
h1 {
  font-size: 26px;
  font-weight: 600;
  margin: 0;
  color: #111;
}
.subtitle {
  font-size: 15px;
  color: #666;
  margin-top: 8px;
  margin-bottom: 32px;
}
.loading {
  display: none;
  margin: 60px 0;
}
.spinner {
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-text {
  font-size: 16px;
  color: #444;
}
.content {
  display: block;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 12px;
  text-align: center;
  background: #fafafa;
}
.step-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step-number {
  width: 28px;
  height: 28px;
  border: 1px solid #999;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  color: #555;
}
.step-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #222;
}
.step-description {
  font-size: 14px;
  margin-bottom: 16px;
  color: #666;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #ccc;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  background: #fff;
  transition: all 0.15s;
}
.store-button:hover {
  background: #f5f5f5;
  border-color: #999;
}
.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #666;
  background: none;
  border: none;
  transition: color 0.15s;
}
.store-link:hover {
  color: #333;
}
.store-link .store-icon {
  width: 14px;
  height: 14px;
}
.store-icon {
  width: 18px;
  height: 18px;
}

.qr-section {
  background: #333;
  color: #fff;
  border-color: #333;
}
.qr-section .step-number {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.qr-section .step-title {
  color: #fff;
}
.qr-section .step-description {
  color: rgba(255, 255, 255, 0.7);
}
.qr-code {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
}
.qr-code canvas {
  width: 100%;
  height: 100%;
}
.open-button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  background: #fff;
  transition: opacity 0.15s;
}
.open-button:hover {
  opacity: 0.9;
}

@media (min-width: 768px) {
  body {
    padding: 48px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .wrapper {
    max-width: 720px;
  }
  h1 {
    font-size: 32px;
    margin-bottom: 10px;
  }
  .subtitle {
    font-size: 16px;
    margin-bottom: 40px;
  }
  .steps-container {
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
  }
  .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px;
  }
  .step-description {
    flex-grow: 1;
  }
  .store-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .qr-code {
    width: 200px;
    height: 200px;
  }
}

@media (min-width: 1024px) {
  .wrapper {
    max-width: 800px;
  }
  h1 {
    font-size: 36px;
  }
  .steps-container {
    gap: 28px;
  }
  .step {
    padding: 32px;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0d0d0d;
    color: #e0e0e0;
  }
  h1 {
    color: #f5f5f5;
  }
  .subtitle {
    color: #999;
  }
  .spinner {
    border-color: #444;
    border-top-color: #ccc;
  }
  .loading-text {
    color: #aaa;
  }
  .step {
    border-color: #333;
    background: #1a1a1a;
  }
  .step-number {
    border-color: #666;
    color: #bbb;
  }
  .step-title {
    color: #f0f0f0;
  }
  .step-description {
    color: #888;
  }
  .store-button {
    border-color: #444;
    color: #e0e0e0;
    background: #222;
  }
  .store-button:hover {
    background: #2a2a2a;
    border-color: #666;
  }
  .store-link {
    color: #888;
  }
  .store-link:hover {
    color: #ccc;
  }
  .qr-section {
    background: #111;
    border-color: #333;
  }
  .qr-section .step-number {
    border-color: rgba(255, 255, 255, 0.4);
  }
  .qr-section .step-description {
    color: rgba(255, 255, 255, 0.6);
  }
  .open-button {
    background: #f0f0f0;
    color: #111;
  }
  .open-button:hover {
    background: #e0e0e0;
  }
}
