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

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #dbeafe 0%, transparent 40%),
    radial-gradient(circle at bottom right, #e0e7ff 0%, transparent 35%),
    var(--bg);
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.field-row .field {
  margin-bottom: 0;
}

.label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}

input[type="color"] {
  width: 100%;
  height: 2.5rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}

.downloads {
  margin-top: 0.5rem;
}

.download-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.qr-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
}

.qr-preview canvas,
.qr-preview svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.preview-hint {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.seo-content {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}

.highlight-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.highlight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.seo-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}

.seo-block h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.seo-block h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.seo-block p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.seo-block p:last-child {
  margin-bottom: 0;
}

.steps-list,
.uses-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

.steps-list li + li,
.uses-list li + li {
  margin-top: 0.6rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
}

.feature-grid p {
  margin: 0;
  font-size: 0.95rem;
}

.faq details {
  border-top: 1px solid var(--border);
  padding: 0.9rem 0;
}

.faq details:last-child {
  padding-bottom: 0;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--accent);
  font-weight: 700;
}

.faq details[open] summary::before {
  content: "−";
}

.faq details p {
  margin: 0.6rem 0 0 1.25rem;
  font-size: 0.95rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  line-height: 1.65;
}

.legal-page h2 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.legal-page h2:first-of-type {
  margin-top: 1.25rem;
}

.legal-page p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.legal-page a {
  color: var(--accent);
}

.legal-page a:hover {
  color: var(--accent-hover);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.footer-brand:hover {
  color: var(--accent);
}

.footer-logo {
  flex-shrink: 0;
  border-radius: 6px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-nav a {
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.footer-nav a:hover {
  color: var(--accent);
  background: #eff6ff;
}

.footer-meta {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    order: -1;
    min-height: auto;
  }

  .highlights,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }
}