:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202020;
  background: #fafafa;
  font-size: 17.25px;
  line-height: 1.5;
  font-synthesis: none;
  color-scheme: light;
  scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 36px 24px; }
header { margin-bottom: 26px; }
h1 { font-size: 1.733333rem; font-weight: 650; letter-spacing: -.6px; margin: 0 0 4px; }
h2 { font-size: 1.133333rem; font-weight: 650; margin: 0 0 20px; }
p { margin: 0; }
header p, footer, .help, .optional { color: #696969; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.editor { display: grid; gap: 24px; min-width: 0; }
.panel { padding: 24px; background: #fff; border: 1px solid #dedede; border-radius: 5px; box-shadow: 0 2px 5px #00000005; }
label, legend { display: block; font-weight: 550; font-size: .933333rem; margin-bottom: 7px; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type="checkbox"], [type="range"], [type="color"], [type="radio"], [type="file"]), select, textarea {
  display: block; width: 100%; padding: 11px 12px; border: 1px solid transparent;
  border-radius: 4px; background: #f4f4f4; min-height: 44px;
}
input::placeholder, textarea::placeholder { color: #838383; opacity: 1; }
textarea { resize: vertical; min-height: 96px; }
select { padding-right: 28px; cursor: pointer; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: #252525; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
input[type="range"] { width: 100%; }
:focus-visible { outline: 2px solid #525252; outline-offset: 3px; }
input[aria-invalid="true"] { border-color: #ae3838 !important; }
button { cursor: pointer; border: 1px solid #d4d4d4; border-radius: 4px; background: #fff; padding: 9px 12px; font-size: .933333rem; font-weight: 550; box-shadow: 0 1px 2px #00000006; }
button:hover:not(:disabled) { background: #f3f3f3; border-color: #999; }
button:disabled { opacity: .4; cursor: default; }
.help { font-size: .8rem; line-height: 1.6; margin-top: 7px; }
#type-description { margin: 10px 0 22px; font-size: .866667rem; }
.fields { display: grid; grid-template-columns: 1fr; gap: 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.required { color: #a64235; }
.required-note { margin-top: 14px; }
.checkbox-field { display: flex; align-items: center; gap: 9px; margin: 0; min-height: 28px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.text-button { border: 0; box-shadow: none; padding: 0; background: none; font-size: .8rem; color: #696969; text-decoration: underline; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.style-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.style-choice { position: relative; cursor: pointer; margin: 0; text-align: center; padding: 9px 2px 6px; border: 1px solid #ddd; border-radius: 4px; font-weight: 400; }
.style-choice:has(input:checked) { border-color: #222; box-shadow: inset 0 0 0 1px #222; }
.style-choice:has(input:focus-visible) { outline: 2px solid #525252; outline-offset: 3px; }
.style-choice:hover { background: #f7f7f7; }
.style-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-choice svg, .style-choice .pattern-image { display: block; width: 34px; height: 34px; margin: 0 auto 6px; }
.style-choice span { font-size: .666667rem; white-space: nowrap; }
.corner-fields { margin-top: 22px; }
.color-field { display: flex; gap: 6px; align-items: center; background: #f4f4f4; border-radius: 4px; padding-right: 9px; }
.color-field input:not([type="color"]) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-width: 0; }
input[type="color"] { width: 28px; height: 28px; border: 0; background: none; padding: 0; flex: 0 0 28px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid #0002; border-radius: 3px; }
input[type="color"]::-moz-color-swatch { border: 1px solid #0002; border-radius: 3px; }
.logo-section { margin-top: 24px; }
.drop-zone { position: relative; border: 1px dashed #ccc; border-radius: 4px; padding: 20px 14px; text-align: center; cursor: pointer; font-weight: 400; margin: 0; }
.drop-zone:hover, .drop-zone.drag-over { background: #f4f4f4; border-color: #666; }
.drop-zone:focus-within { outline: 2px solid #525252; outline-offset: 3px; }
.drop-zone .help { display: block; font-size: .733333rem; }
.drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
#logo-thumbnail { display: block; width: 44px; height: 44px; object-fit: contain; margin: 0 auto 10px; }
.logo-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 12px; }
.logo-controls label { font-size: .8rem; margin: 0; }
.logo-controls output { color: #696969; margin-left: 4px; }
.logo-controls button { font-size: .8rem; padding: 5px 9px; }
details { border-top: 1px solid #e9e9e9; padding-top: 16px; margin-top: 22px; }
summary { font-size: .866667rem; cursor: pointer; width: fit-content; }
details[open] > summary { margin-bottom: 18px; }
.optional { font-weight: 400; }
.preview-column { position: sticky; top: 24px; min-width: 0; }
#qr-preview { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #eee; overflow: hidden; }
.qr-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-image, .pattern-image { animation: qr-reveal 180ms ease-out; }
@keyframes qr-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qr-image, .pattern-image { animation: none; } }
.placeholder { padding: 24px; color: #969696; text-align: center; font-size: .933333rem; }
#status { overflow-wrap: anywhere; min-height: 20px; }
.error { color: #a33030; font-size: .8rem; margin-top: 8px; }
.warning { padding: 10px; background: #fff9ed; color: #775321; border: 1px solid #ede2cb; border-radius: 3px; font-size: .8rem; margin-top: 10px; }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.downloads button { font-size: .8rem; padding: 10px 6px; }
.scan-note { margin-top: 16px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .733333rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; background: #f5f5f5; padding: 10px; max-height: 220px; overflow: auto; user-select: all; }
#copy-content { font-size: .8rem; padding: 5px 9px; }
footer { font-size: .8rem; margin-top: 28px; }
@media (max-width: 820px) {
  main { padding: 24px 16px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
  .panel { padding: 18px; }
  .editor { gap: 16px; }
}
@media (max-width: 650px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .preview-column { position: static; }
  #qr-preview { max-width: 340px; margin-inline: auto; }
}
@media (max-width: 380px) {
  .two-columns { grid-template-columns: 1fr; }
}
