:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #111827;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
}

.page-shell {
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin: 0 0 12px;
  color: #6366f1;
  font-size: 0.85rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05;
}

.subtitle {
  max-width: 680px;
  margin: 14px auto 0;
  color: #4b5563;
  line-height: 1.65;
}

.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.field,
.field-grid,
.checkbox-grid {
  margin-bottom: 18px;
}

.field label,
.field-grid label,
.checkbox-grid label {
  display: block;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.field input,
.field-grid input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #f9fafb;
  font-size: 0.98rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.checkbox-grid input {
  width: auto;
  accent-color: #6366f1;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: #4338ca;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  background: #4f46e5;
}

.banner {
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.banner-error {
  background: #ffebe9;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

..output-card {
  margin-top: 28px;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.output-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.button-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.download-form {
  margin: 0;
}

.download-button {
  border: none;
  padding: 12px 18px;
  margin-top: 12px;
  border-radius: 14px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  background: #0f766e;
}

.download-button:hover {
  background: #14b8a6;
}

.preview-card {
  margin-top: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
}

.preview-header {
  margin: 0 0 12px;
  font-weight: 700;
  color: #111827;
}

.preview-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid #d1d5db;
}

pre {
  background: #111827;
  color: #f8fafc;
  padding: 22px;
  border-radius: 18px;
  overflow-x: auto;
  line-height: 1.15;
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 680px) {
  .page-shell {
    padding: 24px 16px;
  }

  .field-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
