:root {
  --color-primary: #0b5fa5;
  --color-primary-dark: #084879;
  --color-bg: #f4f7fb;
  --color-card: #ffffff;
  --color-text: #1c2733;
  --color-muted: #5b6b7c;
  --color-border: #dbe3ec;
  --color-error: #c0392b;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

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

.hero h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
}

.hero p {
  color: var(--color-muted);
  max-width: 520px;
  margin: 0 auto;
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 16px rgba(20, 40, 70, 0.06);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 95, 165, 0.15);
}

.phone-row {
  display: flex;
  gap: 8px;
}

.phone-row select {
  flex: 0 0 150px;
}

.phone-row input {
  flex: 1;
  min-width: 0;
}

.logo-field {
  margin-top: 4px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  min-height: 100px;
  border: 2px dashed var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--color-primary);
  outline: none;
}

.dropzone--active {
  border-color: var(--color-primary);
  background: rgba(11, 95, 165, 0.06);
}

.dropzone p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.dropzone small {
  color: var(--color-muted);
  opacity: 0.8;
}

#logo-preview {
  max-width: 96px;
  max-height: 96px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.logo-remove-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--color-muted);
  cursor: pointer;
}

.logo-remove-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 400;
}

.consent input {
  margin-top: 3px;
}

button[type="submit"] {
  width: 100%;
  padding: 13px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button[type="submit"]:hover {
  background: var(--color-primary-dark);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

.result {
  margin-top: 28px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.result h2 {
  margin-top: 0;
  color: var(--color-primary-dark);
  font-size: 1.2rem;
}

#qr-image {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin: 12px 0;
}

.download-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  background: var(--color-primary-dark);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.result-hint {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  select {
    font-size: 0.9rem;
  }
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#fireworks-canvas.is-active {
  opacity: 1;
}
