:root {
  color-scheme: light;
  --ink: #172018;
  --muted: #5c665e;
  --line: #d9dfd8;
  --paper: #fbfcf7;
  --panel: #ffffff;
  --accent: #183d2f;
  --accent-hover: #102b21;
  --soft: #edf2e9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(24, 61, 47, 0.07), transparent 38%),
    radial-gradient(circle at 80% 10%, rgba(212, 223, 207, 0.65), transparent 30%),
    var(--paper);
  color: var(--ink);
}

main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

header {
  margin-bottom: 28px;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
  font-weight: 800;
}

.subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 60px rgba(23, 32, 24, 0.08);
}

form {
  padding: 22px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 61, 47, 0.12);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

button,
a.button {
  min-height: 46px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
a.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

a.button.secondary {
  background: transparent;
  color: var(--accent);
}

a.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.preview {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 22px;
  background: var(--soft);
}

.qr-frame {
  width: min(100%, 320px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed #bbc6ba;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 24px, 920px);
    padding: 36px 0;
  }

  .tool {
    grid-template-columns: 1fr;
  }

  .preview {
    min-height: 300px;
  }
}
