/* The QR code generator, scoped to .qrapp so it can sit inside the Kaytey Designs page.
   Adapted from qr-tool/css/qr.css; the tool itself (js/qr-app.js) is unchanged. */

.qrapp {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --soft: #f5f5f4;
  --line: #e4e4e2;
  --line-strong: #c9c9c6;
  --muted: #5f5f5c;
  --radius: 14px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
.qrapp .layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
@media (max-width: 880px) {
  .qrapp .layout { grid-template-columns: minmax(0, 1fr); }
}
.qrapp h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.qrapp section + section { margin-top: 26px; }
.qrapp .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qrapp .chip {
  min-height: 40px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--soft);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background 120ms var(--ease), box-shadow 120ms var(--ease), scale 120ms var(--ease);
}
.qrapp .chip:hover { background: #ebebe9; }
.qrapp .chip:active { scale: 0.96; }
.qrapp .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.qrapp .chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.qrapp .fields { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.qrapp .field { display: grid; gap: 6px; }
.qrapp .field label { font-size: 13px; font-weight: 600; }
.qrapp .field input, .qrapp .field select, .qrapp .field textarea {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--paper);
  color: var(--ink); font: inherit; font-size: 15px; box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow 120ms var(--ease);
}
.qrapp .field textarea { min-height: 84px; resize: vertical; }
.qrapp .field input:focus, .qrapp .field select:focus, .qrapp .field textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.qrapp .field .row { display: flex; align-items: center; gap: 10px; }
.qrapp .field.check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.qrapp .field.check input { width: 20px; min-height: 20px; height: 20px; }
.qrapp .blurb { color: var(--muted); font-size: 14px; margin: 0 0 14px; text-wrap: pretty; }
.qrapp .panel { position: sticky; top: 24px; display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 880px) {
  .qrapp .panel { position: static; }
}
.qrapp .preview {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--paper);
  outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px; overflow: hidden;
}
.qrapp .preview svg { width: 100%; height: auto; display: block; }
.qrapp .preview.empty { background: var(--soft); color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }
.qrapp .encoded { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; margin: 0; max-height: 3.4em; overflow: hidden; }
.qrapp .swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qrapp .swatch {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
  transition: scale 120ms var(--ease), box-shadow 120ms var(--ease);
}
.qrapp .swatch:hover { scale: 1.06; }
.qrapp .swatch:active { scale: 0.96; }
.qrapp .swatch[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.qrapp .swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.qrapp input[type="color"] { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.qrapp .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qrapp button.primary, .qrapp button.ghost, .qrapp .filelabel {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 120ms var(--ease), box-shadow 120ms var(--ease), scale 120ms var(--ease);
}
.qrapp button.primary { background: var(--ink); color: var(--paper); }
.qrapp button.primary:hover { background: #262625; }
.qrapp button.ghost, .qrapp .filelabel { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.qrapp button.ghost:hover, .qrapp .filelabel:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.qrapp button.primary:active, .qrapp button.ghost:active, .qrapp .filelabel:active { scale: 0.96; }
.qrapp button:disabled { opacity: 0.45; cursor: not-allowed; }
.qrapp button:focus-visible, .qrapp .filelabel:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.qrapp .logorow { display: flex; align-items: center; gap: 10px; }
.qrapp .filelabel { flex: 1; padding: 0 14px; font-size: 14px; }
.qrapp .filelabel input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qrapp .logothumb { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: var(--soft); outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px; }
.qrapp .note { color: var(--muted); font-size: 13px; margin: 0; text-wrap: pretty; }
.qrapp .group { display: grid; gap: 12px; padding: 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.qrapp .sub { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.qrapp .chips.small .chip { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.qrapp .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qrapp .inset { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--soft); }
.qrapp .toggle { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.qrapp .toggle input { width: 18px; height: 18px; }
.qrapp .mini { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.qrapp .range { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; min-height: 40px; }
.qrapp .range input[type="range"] { flex: 1; accent-color: var(--ink); }
.qrapp .range select { min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--paper); font: inherit; box-shadow: inset 0 0 0 1px var(--line-strong); }
.qrapp .range span { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; min-width: 4ch; }
.qrapp .panel .range { justify-content: space-between; }
.qrapp .preview.checker {
  background-image: linear-gradient(45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(-45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--soft) 75%),
    linear-gradient(-45deg, transparent 75%, var(--soft) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.qrapp .hint { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qrapp .hint.warn { color: #8a6100; font-weight: 600; }
.qrapp [hidden] { display: none !important; }
.qrapp{color:var(--ink);font-family:var(--sans);line-height:1.5}
.qrapp *{box-sizing:border-box}
