.tool-qr-code { color: var(--fg); max-width: 1100px; margin: 0 auto; }
.tool-qr-code *, .tool-qr-code *::before, .tool-qr-code *::after { box-sizing: border-box; }
.tool-qr-code [hidden] { display: none !important; }

.tool-qr-code .qr-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tool-qr-code .qr-tab { font: inherit; font-weight: 600; padding: 10px 16px; min-height: 44px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); border-radius: var(--radius); cursor: pointer; }
.tool-qr-code .qr-tab.is-on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.tool-qr-code .qr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 18px; align-items: start; }
.tool-qr-code .qr-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 760px) { .tool-qr-code .qr-grid { grid-template-columns: minmax(0, 1fr); } }

.tool-qr-code .qr-types { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-qr-code .qr-type { font: inherit; font-size: .92rem; padding: 8px 14px; min-height: 40px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); border-radius: 999px; cursor: pointer; }
.tool-qr-code .qr-type.is-on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.tool-qr-code .qr-fields { display: flex; flex-direction: column; gap: 10px; }
.tool-qr-code .qr-opts > .qr-row2, .tool-qr-code .qr-opts > .qr-chk, .tool-qr-code .qr-opts > .qr-f { margin-bottom: 10px; }
.tool-qr-code .qr-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .tool-qr-code .qr-row2 { grid-template-columns: 1fr; } }
.tool-qr-code .qr-f { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--muted); min-width: 0; }
.tool-qr-code .qr-f input[type=text], .tool-qr-code .qr-f input[type=number], .tool-qr-code .qr-f input[type=tel], .tool-qr-code .qr-f input[type=email],
.tool-qr-code .qr-f select, .tool-qr-code .qr-f textarea { font: inherit; font-weight: 400; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; width: 100%; min-width: 0; }
.tool-qr-code .qr-f textarea { resize: vertical; }
.tool-qr-code input:focus-visible, .tool-qr-code select:focus-visible, .tool-qr-code textarea:focus-visible, .tool-qr-code button:focus-visible, .tool-qr-code summary:focus-visible, .tool-qr-code .qr-drop:focus-visible, .tool-qr-code a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-qr-code .qr-chk { display: flex; align-items: center; gap: 8px; font-size: .95rem; min-height: 32px; }
.tool-qr-code .qr-chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.tool-qr-code .qr-color { display: flex; gap: 6px; align-items: center; }
.tool-qr-code .qr-color input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); flex: none; }
.tool-qr-code .qr-color input[type=text] { flex: 1; }
.tool-qr-code .qr-logo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 400; color: var(--fg); }
.tool-qr-code .qr-logo input[type=file] { max-width: 100%; font-size: .9rem; color: var(--fg); }

.tool-qr-code .qr-opts, .tool-qr-code .qr-data { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 10px 14px; }
.tool-qr-code .qr-opts[open] > summary { margin-bottom: 10px; }
.tool-qr-code summary { cursor: pointer; font-weight: 600; min-height: 28px; }

.tool-qr-code .qr-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; justify-content: center; align-items: center; min-height: 200px; }
.tool-qr-code .qr-preview canvas { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.tool-qr-code .qr-preview.is-empty canvas { opacity: .08; }
.tool-qr-code .qr-status { margin: 0; font-size: .88rem; color: var(--muted); min-height: 1.3em; overflow-wrap: anywhere; }
.tool-qr-code .qr-warn { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tool-qr-code .qr-warn li { font-size: .88rem; padding: 8px 10px; border: 1px solid var(--danger); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.tool-qr-code .qr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-qr-code .qr-btn { font: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; min-height: 44px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); border-radius: var(--radius); cursor: pointer; }
.tool-qr-code .qr-btn:hover { border-color: var(--accent); }
.tool-qr-code .qr-btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.tool-qr-code .qr-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.tool-qr-code .qr-note { margin: 0; font-size: .88rem; color: var(--muted); padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: var(--radius); background: var(--surface); }
.tool-qr-code .qr-note strong { color: var(--fg); }
.tool-qr-code .qr-pre { margin: 6px 0 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; max-height: 220px; overflow: auto; color: var(--fg); }
.tool-qr-code .qr-muted { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }

.tool-qr-code .qr-drop { border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); padding: 28px 16px; text-align: center; cursor: pointer; }
.tool-qr-code .qr-drop p { margin: 0; }
.tool-qr-code .qr-drop.is-over { border-color: var(--accent); background: var(--surface-2); }
.tool-qr-code .qr-video-wrap { background: #000; border-radius: var(--radius); overflow: hidden; }
.tool-qr-code .qr-video-wrap video { width: 100%; display: block; max-height: 360px; object-fit: cover; }
.tool-qr-code .qr-scan-canvas { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.tool-qr-code .qr-result { display: flex; flex-direction: column; gap: 8px; }
