:root {
  --primary-300: #9d76e8;
  --primary-600: #4017a4;
  --primary-700: #30117b;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e5e7eb;
  --slate-300: #cbd5e1;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--slate-900);
}

.page {
  min-height: 100vh;
  background: linear-gradient(to bottom right, var(--slate-50), var(--slate-100));
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 16px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header-logo {
  height: 38px;
  margin-bottom: 16px;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 8px;
}

.header p {
  color: var(--slate-600);
  margin: 0;
}

.guide-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-600);
  text-decoration: none;
}

.guide-link:hover {
  text-decoration: underline;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 32px;
}

.form { display: flex; flex-direction: column; gap: 24px; }

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--blue-600);
}

.field input.invalid {
  border-color: #dc2626;
}

.field-error {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #dc2626;
}

#download-btn {
  width: 100%;
  background: var(--primary-600);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
}

#download-btn:hover:not(:disabled) { background: var(--primary-700); }

#download-btn:disabled {
  background: var(--primary-300);
  cursor: not-allowed;
}

.icon { width: 20px; height: 20px; }

.preview-card { margin-top: 32px; }

.preview-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin: 0 0 16px;
}

.preview-box {
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 16px;
  background: var(--slate-50);
  overflow-x: auto;
}

.actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}

.action-btn:hover { background: var(--blue-100); }

.copy-status {
  text-align: center;
  color: var(--slate-600);
  font-size: 0.875rem;
  margin: 12px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  text-decoration: none;
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--primary-600);
}

.guide-section {
  margin-bottom: 32px;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-section h2 .section-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary-600);
  color: #fff;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--slate-700);
  font-size: 0.95rem;
  line-height: 1.5;
}

.steps li .step-number {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--primary-600);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.steps li kbd {
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.85em;
  font-family: inherit;
}

.guide-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
  font-size: 0.875rem;
  color: var(--slate-600);
  text-align: center;
}

.guide-footer a {
  color: var(--primary-600);
}
