/* qr-single.css – one-type QR code generators. Each page sets its own accent with --qs-accent / --qs-soft. */
.qs-shell { --qs-accent: #3666d1; --qs-soft: #eef3fc; --qs-ink: #14254f; max-width: 1080px; margin: 0 auto 1.6rem; padding: 0 16px; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.qs-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -14px rgba(15, 23, 42, .18); }
.qs-form { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.qs-head { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: linear-gradient(135deg, var(--qs-soft), #fff 75%); border-bottom: 1px solid #edf2f7; }
.qs-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--qs-accent); color: #fff; box-shadow: 0 8px 18px -8px var(--qs-accent); }
.qs-ico svg { width: 26px; height: 26px; }
.qs-head h2 { margin: 0; font-size: 1.12rem; color: #1a202c; line-height: 1.3; }
.qs-head p { margin: 2px 0 0; font-size: .86rem; color: #4a5568; line-height: 1.45; }
.qs-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.qs-step { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #718096; }
.qs-step b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--qs-accent); color: #fff; font-size: .75rem; letter-spacing: 0; }
.qs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.qs-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qs-f.wide { grid-column: 1 / -1; }
.qs-f[hidden], .qs-pw[hidden] { display: none !important; }
.qs-f > label, .qs-f > .qs-lab { font-size: .86rem; font-weight: 600; color: #2d3748; display: flex; justify-content: space-between; gap: 8px; }
.qs-f > label small, .qs-f > .qs-lab small { font-weight: 500; color: #a0aec0; }
.qs-f > small, .qs-help { font-size: .78rem; color: #718096; line-height: 1.45; }
.qs-in { display: flex; align-items: stretch; border: 1px solid #cbd5e0; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.qs-in:focus-within { border-color: var(--qs-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--qs-accent) 18%, transparent); }
.qs-in input, .qs-in select { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; background: transparent; font: inherit; font-size: 1rem; color: #1a202c; outline: none; border-radius: 10px; }
.qs-in .pre { display: flex; align-items: center; padding: 0 0 0 12px; color: #718096; font-size: .92rem; white-space: nowrap; }
.qs-in .pre + input { padding-left: 2px; }
.qs-in button { border: 0; border-left: 1px solid #e2e8f0; background: #f7fafc; padding: 0 14px; font: inherit; font-size: .84rem; font-weight: 700; color: #2b4c94; cursor: pointer; border-radius: 0 10px 10px 0; }
.qs-in select.cc { flex: none; width: auto; max-width: 46%; padding: 0 6px 0 10px; border-right: 1px solid #e2e8f0; border-radius: 10px 0 0 10px; font-size: .92rem; }
.qs-f textarea { min-height: 110px; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 10px; font: inherit; font-size: 1rem; line-height: 1.5; resize: vertical; }
.qs-f textarea:focus, .qs-f select.qs-sel:focus { outline: none; border-color: var(--qs-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--qs-accent) 18%, transparent); }
.qs-f select.qs-sel { height: 44px; padding: 0 34px 0 12px; border: 1px solid #cbd5e0; border-radius: 10px; font: inherit; font-size: 1rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234a5568' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; width: 100%; box-sizing: border-box; }
.qs-count { font-size: .76rem; color: #a0aec0; text-align: right; }
.qs-count.is-over { color: #c05621; font-weight: 700; }
.qs-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-seg label { position: relative; flex: 1 1 auto; }
.qs-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.qs-seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid #cbd5e0; border-radius: 10px; font-size: .88rem; font-weight: 600; color: #2d3748; background: #fff; text-align: center; line-height: 1.25; }
.qs-seg input:checked + span { background: var(--qs-accent); border-color: var(--qs-accent); color: #fff; }
.qs-seg input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--qs-accent) 30%, transparent); }
.qs-check-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: #2d3748; cursor: pointer; }
.qs-check-row input { width: 18px; height: 18px; accent-color: var(--qs-accent); }
.qs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-chips button { min-height: 32px; padding: 4px 12px; border: 1px solid #cbd5e0; border-radius: 999px; background: #fff; font: inherit; font-size: .82rem; font-weight: 600; color: #2d3748; cursor: pointer; }
.qs-chips button:hover { border-color: var(--qs-accent); background: var(--qs-soft); }
.qs-tip { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--qs-soft); color: #2d3748; font-size: .84rem; line-height: 1.5; }
.qs-tip strong { color: var(--qs-ink); }
.qs-note, .qs-warn { margin: 0; padding: 9px 12px; border-radius: 10px; font-size: .84rem; line-height: 1.45; }
.qs-note { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.qs-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.qs-note[hidden], .qs-warn[hidden] { display: none; }
.qs-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid #c9d6f2; border-radius: 10px; background: #fff; color: #2b4c94; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.qs-act:hover { background: #eef3fc; }

/* design panel */
.qs-design { border-top: 1px solid #edf2f7; }
.qs-design > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qs-design > summary::-webkit-details-marker { display: none; }
.qs-design > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid #718096; border-bottom: 2px solid #718096; transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.qs-design[open] > summary::after { transform: rotate(-135deg); }
.qs-design .qs-body { padding-top: 0; }
.qs-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-swatches button { width: 40px; height: 40px; padding: 0; border: 2px solid #fff; border-radius: 12px; box-shadow: 0 0 0 1px #cbd5e0; cursor: pointer; }
.qs-swatches button:hover, .qs-swatches button:focus-visible { box-shadow: 0 0 0 2px var(--qs-accent); outline: none; }
.qs-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qs-colors label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 600; color: #4a5568; }
.qs-colors input[type=color] { width: 100%; height: 40px; padding: 2px; border: 1px solid #cbd5e0; border-radius: 10px; background: #fff; cursor: pointer; }
.qs-file { font-size: .86rem; }
.qs-file input[type=file] { max-width: 100%; font: inherit; font-size: .85rem; }
.qs-range { width: 100%; accent-color: var(--qs-accent); }

/* preview side */
.qs-side { position: sticky; top: 84px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.qs-preview { display: flex; gap: 12px; justify-content: center; }
.qs-pv { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.qs-pv[hidden] { display: none; }
.qs-pv > span { font-size: .78rem; font-weight: 700; color: #4a5568; text-transform: uppercase; letter-spacing: .05em; }
.qs-canvas, .qs-canvas-2 { width: 100%; max-width: 300px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 18px 18px; overflow: hidden; }
.qs-canvas canvas, .qs-canvas-2 canvas, .qs-canvas svg { width: 100% !important; height: auto !important; display: block; }
.qs-empty { padding: 24px; text-align: center; font-size: .88rem; color: #718096; line-height: 1.5; }
.qs-frame-prev { margin: -4px 0 0; text-align: center; font-weight: 800; font-size: 1.05rem; }
.qs-frame-prev[hidden] { display: none; }
.qs-check { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-check:empty { display: none; }
.qs-scan { flex: 1 1 100%; margin: 0; padding: 9px 12px; border-radius: 10px; font-size: .84rem; font-weight: 600; line-height: 1.45; }
.qs-scan.is-ok { background: #ecfdf5; color: #065f46; } .qs-scan.is-bad { background: #fff7ed; color: #9a3412; } .qs-scan.is-wait { background: #f7fafc; color: #4a5568; }
.qs-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; font-size: .74rem; font-weight: 600; color: #4a5568; }
.qs-dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qs-dl button { min-height: 44px; border: 1px solid var(--qs-accent); border-radius: 10px; background: #fff; color: var(--qs-ink); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.qs-dl button.main { background: var(--qs-accent); color: #fff; }
.qs-dl button:disabled, .qs-more button:disabled { opacity: .45; cursor: not-allowed; }
.qs-more { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-more button { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; font: inherit; font-size: .84rem; font-weight: 700; color: #2d3748; cursor: pointer; }
.qs-more button.hl { background: var(--qs-soft); border-color: color-mix(in srgb, var(--qs-accent) 40%, #fff); color: var(--qs-ink); }
.qs-payload { border: 1px solid #edf2f7; border-radius: 12px; }
.qs-payload summary { padding: 10px 14px; font-size: .86rem; font-weight: 700; color: #2b4c94; cursor: pointer; }
.qs-data { display: block; margin: 0 12px 12px; padding: 10px 12px; max-height: 200px; overflow: auto; border-radius: 8px; background: #0f172a; color: #e2e8f0; font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.qs-privacy { margin: 0; font-size: .76rem; color: #94a3b8; text-align: center; }
.qs-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: 999px; background: #1a202c; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.qs-toast[hidden] { display: none; }

@media (max-width: 900px) {
    .qs-shell { grid-template-columns: minmax(0, 1fr); }
    .qs-side { position: static; order: 2; }
}
@media (max-width: 520px) {
    .qs-shell { padding: 0 12px; gap: 12px; }
    .qs-head { padding: 14px 16px; } .qs-body { padding: 14px 16px; } .qs-design > summary { padding: 14px 16px; }
    .qs-grid { grid-template-columns: minmax(0, 1fr); }
    .qs-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qs-dl { grid-template-columns: repeat(2, 1fr); }
    .qs-side { padding: 14px; }
}
html.app-mode .qs-shell { margin-top: 6px; }
html.app-mode .qs-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.qs-sub { border: 1px dashed #cbd5e0; border-radius: 12px; padding: 0 14px; }
.qs-sub > summary { cursor: pointer; padding: 12px 0; font-size: .9rem; font-weight: 700; color: var(--qs-ink); }
.qs-sub > summary small { font-weight: 500; color: #a0aec0; }
.qs-sub[open] { padding-bottom: 14px; }
.qs-sub[open] > summary { margin-bottom: 4px; }
.qs-sub .qs-grid { margin-bottom: 8px; }
.qs-f > label.qs-check-row { justify-content: flex-start; font-weight: 500; }
.qs-dl button { height: 44px; padding: 0 6px; }
.qs-more button { height: 38px; }

/* fields shown for one choice only (data-show) */
.qs-shell [data-show][hidden] { display: none !important; }
.qs-seg-wrap .qs-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* location: map picker */
.qs-mapbox .qs-in button { white-space: nowrap; }
.qs-map { position: relative; isolation: isolate; z-index: 0; height: 340px; margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #eef2f6; cursor: crosshair; }
.qs-map .leaflet-container, .qs-map.leaflet-container { font: inherit; }
.qs-map.leaflet-container { cursor: crosshair; }
.qs-map .leaflet-marker-icon { cursor: grab; }
.qs-map-msg { margin: 0; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; color: #64748b; font-size: .9rem; }
.qs-places { margin-top: 6px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; max-height: 260px; overflow: auto; }
.qs-place { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid #f1f5f9; background: none; cursor: pointer; font: inherit; color: #1f2937; }
.qs-place:last-child { border-bottom: 0; }
.qs-place:hover, .qs-place:focus-visible { background: var(--qs-soft, #f1f5f9); outline: none; }
.qs-place strong { display: block; font-size: .92rem; }
.qs-place span { display: block; font-size: .8rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-places-msg { margin: 0; padding: 10px 12px; font-size: .86rem; color: #64748b; }
@media (max-width: 520px) { .qs-map { height: 300px; } }
