:root {
  color-scheme: light;
  font-family: "Inter", system-ui, sans-serif;
  color: #211a30;
  background: #faf9f6;
  --purple: #653bc6;
  --muted: #635a70;
  --border: #e9e2ef;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 17px max(24px, calc((100% - 1120px) / 2));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; white-space: nowrap; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--purple);
  color: white;
  font-size: 24px;
  line-height: 1;
}
main {
  min-height: calc(100vh - 69px);
  padding: clamp(52px, 10vh, 110px) 22px 56px;
  background-image: radial-gradient(#dfd6eb 1px, transparent 1px);
  background-size: 22px 22px;
}
.intro { text-align: center; margin: 0 auto 36px; }
h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -.07em;
}
h1 em { color: var(--purple); font-family: Georgia, serif; font-weight: 500; letter-spacing: -.06em; }
.intro p { color: var(--muted); margin: 18px 0 0; line-height: 1.6; }
.studio {
  max-width: 850px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 45px #36234b14;
}
.editor, .preview { padding: clamp(24px, 4.4vw, 44px); }
h2 { margin: 0 0 28px; font-size: 23px; letter-spacing: -.04em; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
input, button, .download { font: inherit; border-radius: 10px; }
input {
  width: 100%;
  padding: 14px;
  border: 1px solid #d9d0e2;
  color: inherit;
}
input::placeholder { color: #746c7e; }
input[aria-invalid="true"] { border-color: #a42950; }
.error { color: #a42950; font-size: 14px; margin: 8px 0 0; }
.primary, .download {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
}
.primary {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  background: var(--purple);
  color: white;
  border: 1px solid transparent;
}
.primary:hover { background: #5129ad; }
:focus-visible { outline: 3px solid #8666d5; outline-offset: 3px; }
.preview {
  text-align: center;
  background: #f5f0fd;
  border-left: 1px solid var(--border);
}
.preview h2 { margin-bottom: 18px; }
.qr-frame {
  display: grid;
  place-items: center;
  width: min(206px, 100%);
  aspect-ratio: 1;
  margin: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.placeholder { display: grid; grid-template-columns: repeat(2, 23px); gap: 6px; color: #baa5df; }
.placeholder i { width: 23px; height: 23px; border: 4px solid; border-radius: 5px; }
.placeholder i:last-child { border-style: dotted; }
#qr { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 16px; }
#status { font-size: 14px; color: var(--muted); margin: 13px 0 0; }
.download {
  width: fit-content;
  margin: 14px auto 0;
  padding: 8px 12px;
  border: 1px solid #d9c9f2;
  color: #5129ad;
  text-decoration: none;
  background: white;
  font-size: 14px;
}
.download:hover { background: #ece1ff; }
@media (max-width: 620px) {
  .studio { grid-template-columns: 1fr; }
  .preview { border-left: 0; border-top: 1px solid var(--border); }
}
