.converter-container:has(.qrr-studio) { width: 100%; max-width: 1160px; }
.qrr-studio { text-align: left; border: 2px solid var(--line, #252331); border-radius: 12px; box-shadow: 4px 4px 0 var(--shade, #252331); background: var(--paper, #fffef9); overflow: hidden; }
.qrr-studio * { box-sizing: border-box; }
.qrr-studio [hidden] { display: none !important; }
.qrr-header { background: var(--pastel-lavender, #d9caff); padding: 20px; border-bottom: 2px solid var(--line, #252331); }
.qrr-header h2 { margin: 0 0 5px; font-size: 20px; }
.qrr-header p, .qrr-hint { font-size: 13px; line-height: 1.6; margin: 0; color: var(--ink-soft, #595665); }
.qrr-controls, .qrr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.qrr-controls { padding: 18px 20px; border-bottom: 1px solid var(--border-faint, #dcd5e3); }
.qrr-studio button, .qrr-file, .qrr-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 650; color: inherit; border: 1px solid var(--border-soft, #a59bad); background: var(--field, #fff); border-radius: 5px; cursor: pointer; text-decoration: none; }
.qrr-studio button:hover, .qrr-file:hover, .qrr-actions a:hover { background: var(--pastel-lavender, #d9caff); }
.qrr-studio :focus-visible, .qrr-file:focus-within { outline: 3px solid var(--primary, #7046cf); outline-offset: 2px; }
.qrr-file { position: relative; background: var(--primary, #7046cf); color: #fff; }
.qrr-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qrr-file:hover { color: var(--ink, #252331); }
.qrr-studio button:disabled { opacity: .5; cursor: not-allowed; }
.qrr-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.qrr-visual { padding: 20px; min-height: 330px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; background: var(--dark-paper-3, #f6f3fc); }
.qrr-visual canvas, .qrr-visual video { display: block; max-width: 100%; width: auto; max-height: 420px; object-fit: contain; border-radius: 5px; background: #fff; }
.qrr-empty { text-align: center; max-width: 280px; }
.qrr-empty strong { display: block; font-size: 22px; margin-bottom: 10px; }
.qrr-result { padding: 20px; border-left: 1px solid var(--border-faint, #dcd5e3); min-width: 0; }
.qrr-result h3 { margin: 0 0 14px; font-size: 17px; }
.qrr-result textarea { width: 100%; min-height: 230px; resize: vertical; border: 1px solid var(--border-soft, #a59bad); border-radius: 5px; background: var(--field, #fff); color: var(--ink, #252331); font: 13px/1.65 monospace; padding: 12px; margin-bottom: 14px; overflow-wrap: anywhere; }
.qrr-status { margin: 0; padding: 14px 20px; font-size: 13px; line-height: 1.6; border-top: 1px solid var(--border-faint, #dcd5e3); overflow-wrap: anywhere; }
.qrr-status[data-error=true] { color: var(--dark-error, #b42318); }
.qrr-type { font-size: 12px; color: var(--ink-soft, #595665); margin: 12px 0 0; }
@media (max-width: 650px) { .qrr-body { grid-template-columns: minmax(0, 1fr); } .qrr-result { border-left: 0; border-top: 1px solid var(--border-faint, #dcd5e3); } .qrr-visual { min-height: 240px; } .qrr-header, .qrr-controls, .qrr-visual, .qrr-result { padding: 15px; } }

/* Space the page holds for this view until it mounts (see .tool-view-placeholder in _workspace.css).
   Each height is a little under the space the view takes at that width, measured as how far the
   content below moves when the view replaces the placeholder, so nothing below it moves. Re-measure
   after changing the view's layout: node scripts/measure-tool-views.js --apply qr-code-reader. */
.tool-view-placeholder[data-tool="qr-code-reader"] { min-height: 618px; }
@media (max-width: 648px) { .tool-view-placeholder[data-tool="qr-code-reader"] { min-height: 833px; } }
@media (max-width: 608px) { .tool-view-placeholder[data-tool="qr-code-reader"] { min-height: 864px; } }
@media (max-width: 460px) { .tool-view-placeholder[data-tool="qr-code-reader"] { min-height: 904px; } }
@media (max-width: 348px) { .tool-view-placeholder[data-tool="qr-code-reader"] { min-height: 956px; } }
