:root {
  color-scheme: light;
  --ink: #12202f;
  --muted: #64758b;
  --line: #d2dbe5;
  --line-soft: #e4ecf5;
  --accent-soft: #e5eaeb;
  --accent-line: #cfd6dc;
  font-family: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; color: inherit; }

/* small "yours" logo, lined up with the content below (same width as .qr-app), no line */
.topbar {
  display: flex;
  align-items: center;
  width: min(1000px, 94vw);
  margin: 0 auto;
  padding: 16px 0 10px;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; width: 78px; height: auto; }

.qr-app {
  width: min(1000px, 94vw);
  margin: 0 auto;
  padding: clamp(16px, 6vh, 64px) 0 56px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
  word-break: break-all;
}

textarea:focus { outline: none; border-color: #9fb3c9; box-shadow: 0 0 0 3px #e4ecf5; }

.qr-status {
  min-height: 1.4em;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.qr-status.is-error { color: #b54343; }

.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.action-button {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-soft);
  color: #102033;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.action-button:hover:not(:disabled) { background: #dde3e5; }
.action-button:disabled { cursor: not-allowed; opacity: 0.45; }
.action-button:focus-visible { outline: 2px solid #9fb3c9; outline-offset: 2px; }

.qr-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.qr-preview {
  aspect-ratio: 1;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(18, 32, 47, 0.12);
  display: grid;
  place-items: center;
}

.qr-preview svg { display: block; width: 100%; height: 100%; }

.qr-preview.is-empty {
  background: #f8fbff;
  box-shadow: none;
  border-style: dashed;
}

@media (max-width: 720px) {
  .topbar { width: calc(100% - 32px); }
  .qr-app {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    padding-top: 8px;
  }
  .qr-stage { order: -1; max-width: 360px; width: 100%; margin: 0 auto; }
  .action-button { flex: 1 1 40%; }
}
