.qs-studio {
  position: relative;
  min-width: 0;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-r-lg);
  background: var(--wb-surface-solid);
  color: var(--wb-text);
  box-shadow: var(--wb-shadow);
  isolation: isolate;
}
.qs-studio *, .qs-studio *::before, .qs-studio *::after { box-sizing: border-box; }
.qs-studio [hidden] { display: none !important; }
.qs-studio button, .qs-studio input, .qs-studio select, .qs-studio textarea { font: inherit; }
.qs-studio button { cursor: pointer; }
.qs-studio button:disabled { cursor: not-allowed; opacity: .45; }
.qs-studio :is(button, a, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--wb-accent);
  outline-offset: 3px;
}
.qs-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.qs-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--wb-surface);
  backdrop-filter: blur(var(--wb-blur));
  border-bottom: 1px solid var(--wb-border);
  border-radius: var(--wb-r-lg) var(--wb-r-lg) 0 0;
}
.qs-menu { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px 0 6px; border: 1px solid var(--wb-border); border-radius: var(--wb-r-pill); background: var(--wb-surface-solid); color: var(--wb-text-soft); transition: background 160ms var(--wb-ease), transform 160ms var(--wb-ease); }
.qs-menu:hover, .qs-menu[aria-expanded="true"] { background: var(--wb-surface-sunk); border-color: var(--wb-border-strong); }
.qs-menu:active { transform: scale(.97); }
.qs-menu img { display: block; width: 24px; height: 24px; border-radius: 7px; }
.qs-menu svg { width: 16px; height: 16px; }
/* The studio is the whole page (focus mode, tools/qr.php): it takes the
   window's height and only its own panel scrolls. */
@media (min-width: 900px) {
  :root[data-focus] .qs-studio { display: flex; flex-direction: column; height: calc(100dvh - var(--wb-focus-gap, 14px) * 2); }
  :root[data-focus] .qs-workspace { flex: 1 1 auto; height: auto; min-height: 0; }
  :root[data-focus] .qs-rail { min-height: 0; overflow-y: auto; scrollbar-width: none; }
}
.qs-heading { flex: 0 0 auto; }
.qs-heading h1 { font: 700 18px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.5px; margin: 0; }
.qs-heading p { margin: 4px 0 0; font-size: 10px; color: var(--wb-muted); }
.qs-back { padding-inline: 7px !important; white-space: nowrap; }
.qs-back svg { flex-shrink: 0; }
.qs-name-wrap { min-width: 100px; flex: 1 1 180px; padding-left: 12px; border-left: 1px solid var(--wb-border); }
.qs-name { width: 100%; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: var(--wb-r-sm); padding: 3px 5px; font-size: 13px !important; font-weight: 600 !important; color: var(--wb-text); }
.qs-name:hover { border-color: var(--wb-border); }
.qs-name::placeholder { color: var(--wb-muted); }
.qs-save { display: block; max-width: 100%; border: 0; background: none; color: var(--wb-muted); font-size: 10px !important; padding: 1px 6px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-save[data-tone="bad"] { color: var(--wb-bad); }
.qs-history { display: flex; gap: 2px; }
.qs-icon-btn { flex-shrink: 0; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 5px; border: 1px solid transparent; border-radius: var(--wb-r-sm); background: transparent; color: var(--wb-text-soft); transition: background 160ms var(--wb-ease); }
.qs-icon-btn:hover { background: var(--wb-surface-sunk); border-color: var(--wb-border); }
.qs-icon-btn svg { width: 18px; height: 18px; }
.qs-topbar .wb-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: var(--wb-surface-sunk); border: 1px solid var(--wb-border); color: var(--wb-muted); font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 7px 9px; }
.qs-topbar .wb-badge svg { width: 14px; height: 14px; }
.qs-topbar .qs-scan[data-tone="ok"] { background: var(--wb-ok-bg); color: var(--wb-ok); border-color: transparent; }
.qs-topbar .qs-scan[data-tone="warn"] { background: var(--wb-warn-bg); color: var(--wb-warn); border-color: transparent; }
.qs-topbar .qs-short { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-primary { flex-shrink: 0; gap: 16px; padding: 5px 5px 5px 18px !important; font-size: 12px !important; border-radius: var(--wb-r-pill); transition: transform 160ms var(--wb-ease); }
.qs-primary:active { transform: scale(.97); }
.qs-cta-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--wb-accent-contrast) 18%, transparent); }
.qs-workspace { display: grid; grid-template-columns: 72px 340px minmax(0, 1fr); height: clamp(640px, calc(100dvh - 210px), 1000px); min-height: 620px; }
.qs-rail { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 16px 7px; border-right: 1px solid var(--wb-border); border-radius: 0 0 0 var(--wb-r-lg); background: var(--wb-surface-solid); }
.qs-rail button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 64px; padding: 10px 2px; border: 1px solid transparent; border-radius: var(--wb-r-sm); background: transparent; color: var(--wb-muted); transition: color 160ms var(--wb-ease), background 160ms var(--wb-ease); }
.qs-rail button span { font-size: 9px; font-weight: 600; }
.qs-rail button:hover { background: var(--wb-surface-sunk); color: var(--wb-text); }
.qs-rail button[aria-selected="true"] { background: color-mix(in srgb, var(--wb-accent) 10%, var(--wb-surface-solid)); color: var(--wb-accent); border-color: color-mix(in srgb, var(--wb-accent) 20%, transparent); }
.qs-panel { padding: 22px 20px 28px; overflow: auto; min-width: 0; border-right: 1px solid var(--wb-border); scrollbar-width: thin; scrollbar-color: var(--wb-border-strong) transparent; background: var(--wb-surface-solid); }
.qs-panel h2 { font: 700 22px/1.2 'Bricolage Grotesque', sans-serif; margin: 0 0 18px; letter-spacing: -.4px; }
.qs-panel h3, .qs-pop h3 { font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.qs-panel .wb-input, .qs-panel .wb-select, .qs-panel .wb-textarea, .qs-export .wb-input, .qs-export .wb-select { padding: 10px 11px; font-size: 12px; }
.qs-studio .qs-label { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--wb-text-soft); }
.qs-label output { float: right; color: var(--wb-muted); font-variant-numeric: tabular-nums; }
.qs-panel .wb-field { gap: 7px; margin-bottom: 17px; }
.qs-panel input[type="range"] { width: 100%; height: 22px; margin: 0; padding: 0; box-shadow: none; border: 0; accent-color: var(--wb-accent); background: none; cursor: pointer; }
.qs-divider { height: 1px; background: var(--wb-border); margin: 23px 0; }
.qs-help { color: var(--wb-muted); font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; margin: 0 0 12px; }
.qs-search { margin-bottom: 18px; }
.qs-type-group { margin-bottom: 16px; }
.qs-type-group h3 { color: var(--wb-muted); font-size: 10px; font-weight: 500; margin-bottom: 8px; }
.qs-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.qs-type { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 65px; padding: 9px 4px; border: 1px solid var(--wb-border); border-radius: var(--wb-r-sm); color: var(--wb-text-soft); background: var(--wb-surface-solid); }
.qs-type svg { width: 19px; height: 19px; flex-shrink: 0; }
.qs-type span { font-size: 10px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.qs-type:hover, .qs-tile:hover, .qs-preset:hover, .qs-copy-style:hover { border-color: var(--wb-border-strong); background: var(--wb-surface-sunk); }
.qs-type[aria-pressed="true"], .qs-tile[aria-pressed="true"] { border-color: var(--wb-accent); box-shadow: 0 0 0 1px var(--wb-accent); color: var(--wb-accent); }
.qs-field-error { color: var(--wb-bad); font-size: 11px; line-height: 1.5; }
.qs-field-error:empty { display: none; }
.qs-studio [aria-invalid="true"] { border-color: var(--wb-bad); }
.qs-dynamic.wb-card { padding: 16px; border-radius: var(--wb-r); box-shadow: none; background: var(--wb-surface-sunk); backdrop-filter: none; }
.qs-dynamic .qs-help { margin: 10px 0 14px; }
.qs-toggle { display: flex; gap: 10px; align-items: center; font-size: 12px; font-weight: 500; margin: 12px 0 16px; color: var(--wb-text-soft); cursor: pointer; }
.qs-toggle input { accent-color: var(--wb-accent); width: 17px; height: 17px; flex: 0 0 17px; margin: 0; }
.qs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.qs-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 9px 4px 7px; min-height: 80px; border: 1px solid var(--wb-border); border-radius: 14px; background: var(--wb-surface-solid); color: var(--wb-text-soft); }
.qs-tile svg { width: 44px; height: 44px; max-width: 100%; }
.qs-tile span { font-size: 9px; line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.qs-tiles--frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qs-tiles--frames .qs-tile svg { width: 90px; height: 80px; }
.qs-paint { padding-bottom: 20px; }
.qs-paint + .qs-paint { border-top: 1px solid var(--wb-border); padding-top: 20px; }
.qs-segments { display: flex; align-items: center; gap: 3px; width: fit-content; padding: 3px; background: var(--wb-surface-sunk); border: 1px solid var(--wb-border); border-radius: var(--wb-r-pill); margin-bottom: 14px; }
.qs-segment { min-width: 0; border: 1px solid transparent; padding: 6px 10px; border-radius: var(--wb-r-pill); color: var(--wb-muted); background: transparent; font-size: 10px !important; font-weight: 500 !important; white-space: nowrap; }
.qs-segment[aria-pressed="true"] { color: var(--wb-text); background: var(--wb-surface-solid); box-shadow: var(--wb-shadow-sm); border-color: var(--wb-border); }
.qs-studio .wb-color { gap: 7px; padding: 5px 8px 5px 5px; }
.qs-studio .wb-color input[type="color"] { width: 29px; height: 29px; flex-shrink: 0; }
.qs-hex { color: var(--wb-text); background: transparent; font-size: 12px !important; border: 0; padding: 4px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.qs-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.qs-swatch { width: 100%; aspect-ratio: 1; padding: 2px; display: grid; place-items: center; border: 1px solid var(--wb-border); border-radius: 50%; background: transparent; }
.qs-swatch svg { width: 100%; height: 100%; }
.qs-drop { width: 100%; font-size: 12px !important; padding: 24px 15px; background: var(--wb-surface-sunk); }
.qs-panel .wb-btn { font-size: 11px; padding: 8px 12px; }
.qs-logo-preview { display: grid; place-items: center; min-height: 100px; margin: 16px 0; padding: 14px; border: 1px solid var(--wb-border); border-radius: var(--wb-r); background: repeating-conic-gradient(var(--wb-surface-solid) 0% 25%, var(--wb-surface-sunk) 0% 50%) 50% / 16px 16px; }
.qs-logo-preview img { display: block; width: auto; height: auto; max-width: 150px; max-height: 110px; object-fit: contain; }
.qs-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.qs-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.qs-preset { display: flex; flex-direction: column; gap: 10px; padding: 9px 9px 12px; min-width: 0; border: 1px solid var(--wb-border); border-radius: 14px; background: var(--wb-surface-solid); color: var(--wb-text-soft); text-align: left; transition: transform 180ms var(--wb-ease); }
.qs-preset:hover { transform: translateY(-2px); }
.qs-preset > span:last-child { font-size: 10px; padding-inline: 2px; }
.qs-preset-art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border-radius: var(--wb-r-sm); background: var(--wb-surface-sunk); }
.qs-preset-art svg { display: block; width: 100%; height: 100%; max-height: 140px; }
.qs-copy-styles { display: flex; flex-direction: column; gap: 8px; }
.qs-copy-style { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--wb-border); border-radius: var(--wb-r-sm); background: transparent; color: var(--wb-text); font-size: 11px !important; text-align: left; }
.qs-copy-style > span { width: 40px; height: 40px; flex-shrink: 0; }
.qs-copy-style svg { width: 100%; height: 100%; }
.qs-list-row { margin-bottom: 12px; padding: 12px; border: 1px solid var(--wb-border); border-radius: var(--wb-r-sm); }
.qs-upload { display: grid; gap: 8px; }
.qs-upload input { width: 100%; font-size: 11px; }
.qs-upload input::file-selector-button { font: inherit; color: var(--wb-text); border: 1px solid var(--wb-border); background: var(--wb-surface-sunk); border-radius: var(--wb-r-sm); padding: 8px; margin-right: 8px; }
.qs-upload small { color: var(--wb-muted); font-size: 10px; overflow-wrap: anywhere; }
.qs-upload progress { width: 100%; height: 6px; accent-color: var(--wb-accent); }
.qs-canvas {
  min-width: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--wb-surface-sunk);
  background-image: radial-gradient(var(--wb-border-strong) .7px, transparent .7px);
  background-size: 18px 18px;
  border-radius: 0 0 var(--wb-r-lg) 0;
}
.qs-canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 18px 20px 0; z-index: 2; }
.qs-canvas-head .qs-segments { background: var(--wb-surface-solid); }
.qs-bg-sample { display: block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--wb-border-strong); }
.qs-bg-sample--light { background: #fff; }
.qs-bg-sample--dark { background: #16161a; }
.qs-bg-sample--checker { background: repeating-conic-gradient(var(--wb-surface-solid) 0% 25%, var(--wb-border-strong) 0% 50%) 50% / 6px 6px; }
.qs-stage { position: relative; display: grid; align-items: center; justify-items: center; flex: 1; width: 100%; min-height: 0; padding: 30px; overflow: auto; }
.qs-plate { position: relative; width: min(380px, 100%); padding: 6px; background: var(--wb-surface-sunk); border: 1px solid var(--wb-border); border-radius: var(--wb-r-lg); box-shadow: var(--wb-shadow-lg); flex-shrink: 0; transform-origin: center; }
.qs-art { position: relative; display: grid; place-items: center; padding: 24px; min-height: 160px; aspect-ratio: 1; background: #fff; border-radius: calc(var(--wb-r-lg) - 6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); overflow: hidden; }
.qs-art > svg { display: block; width: 100%; height: 100%; max-height: 430px; object-fit: contain; }
.qs-canvas[data-preview-bg="dark"] .qs-art { background: #16161a; }
.qs-canvas[data-preview-bg="checker"] .qs-art { background: repeating-conic-gradient(#fff 0% 25%, #ddd 0% 50%) 50% / 16px 16px; }
.qs-plate.qs-scanned::after { content: ''; pointer-events: none; position: absolute; left: 16px; right: 16px; top: 12px; height: 1px; background: var(--wb-ok); opacity: 0; animation: qs-scan 600ms var(--wb-ease) 1; }
@keyframes qs-scan { 0% { top: 10%; opacity: 0; } 15% { opacity: .8; } 85% { opacity: .8; } 100% { top: 90%; opacity: 0; } }
.qs-empty-art { display: flex; flex-direction: column; align-items: center; gap: 15px; color: var(--wb-muted); font-size: 12px; text-align: center; }
.qs-empty-art svg { width: 58px; height: 58px; }
.qs-canvas-toolbar { display: flex; align-items: center; gap: 6px; padding: 5px 7px; margin-top: 8px; border: 1px solid var(--wb-border-strong); border-radius: var(--wb-r-pill); background: var(--wb-surface); backdrop-filter: blur(var(--wb-blur)); box-shadow: var(--wb-shadow-sm); z-index: 2; }
.qs-zoom-label { background: none; border: 0; color: var(--wb-text-soft); min-width: 50px; padding: 4px; font-size: 11px !important; font-variant-numeric: tabular-nums; }
.qs-toolbar-divider { height: 18px; width: 1px; background: var(--wb-border); margin: 0 3px; }
.qs-canvas-note { margin: 14px 12px 20px; color: var(--wb-muted); font-size: 10px; text-align: center; }
.qs-canvas-error { padding: 10px 20px; color: var(--wb-muted); font-size: 11px; text-align: center; }
.qs-mockups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 100%; align-self: start; }
.qs-mockup { min-width: 0; text-align: center; }
.qs-mockup-scene { perspective: 700px; height: 210px; padding: 20px; display: grid; place-items: center; background: #e5dfd4; border-radius: var(--wb-r); overflow: hidden; }
.qs-mockup-surface { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; background: #fffefa; color: #24251f; padding: 16px; width: 180px; max-width: 100%; box-shadow: 0 12px 24px #24251f26; border-radius: 3px; transition: transform 160ms var(--wb-ease); }
.qs-mockup-brand { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-mockup-qr { width: 64px; height: 64px; display: grid; place-items: center; }
.qs-mockup-qr svg { width: 100%; height: 100%; }
.qs-mockup-caption { font-size: 7px; }
.qs-mockup-label { display: block; font-size: 10px; color: var(--wb-muted); margin-top: 9px; }
.qs-mockup--1 .qs-mockup-scene { background: #d9c5ad; }
.qs-mockup--1 .qs-mockup-surface { width: 115px; height: 160px; transform: rotateX(7deg); border-bottom: 9px solid #a9967c; }
.qs-mockup--2 .qs-mockup-scene { background: #c5c7c0; }
.qs-mockup--2 .qs-mockup-surface { width: 115px; height: 170px; border: 5px solid #34392f; border-radius: 0; }
.qs-mockup--3 .qs-mockup-scene { background: #d3d7dd; }
.qs-mockup--3 .qs-mockup-surface { width: 92px; height: 180px; border: 5px solid #242529; border-top-width: 13px; border-bottom-width: 10px; border-radius: 16px; padding: 8px; }
.qs-pop { position: absolute; z-index: 20; top: 75px; right: 14px; width: min(360px, calc(100% - 28px)); padding: 22px; border: 1px solid var(--wb-border-strong); border-radius: var(--wb-r-lg); background: var(--wb-surface-solid); color: var(--wb-text); box-shadow: var(--wb-shadow-lg); max-height: min(78dvh, 800px); overflow: auto; }
.qs-export { background: var(--wb-surface); backdrop-filter: blur(var(--wb-blur)); }
.qs-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 20px; }
.qs-pop-head h2 { font: 700 22px/1.2 'Bricolage Grotesque', sans-serif; margin: 0; }
.qs-formats { width: 100%; flex-wrap: wrap; border-radius: var(--wb-r); }
.qs-formats .qs-segment { flex: 1; padding: 8px 7px; }
.qs-export details { font-size: 11px; color: var(--wb-muted); margin-bottom: 18px; }
.qs-export summary { padding: 3px; cursor: pointer; }
.qs-export details button { margin-top: 8px; }
.qs-export .wb-field { margin-top: 14px; margin-bottom: 14px; }
.qs-export #qs-export-error { margin: 12px 0; }
.qs-scan-pop { right: 170px; width: 310px; font-size: 12px; }
.qs-scan-pop p { line-height: 1.65; color: var(--wb-muted); }
.qs-scan-pop .qs-warning { padding: 10px 12px; border-radius: var(--wb-r-sm); background: var(--wb-warn-bg); color: var(--wb-warn); }
.qs-scan-pop .qs-warning[data-tone="bad"] { background: var(--wb-bad-bg); color: var(--wb-bad); }
.qs-notice { position: absolute; bottom: 18px; right: 18px; z-index: 25; max-width: min(440px, calc(100% - 36px)); padding: 12px 16px; background: var(--wb-surface-solid); border: 1px solid var(--wb-border-strong); border-radius: var(--wb-r); box-shadow: var(--wb-shadow); font-size: 12px; }
.qs-skeleton { display: block; width: 100%; height: 130px; border-radius: var(--wb-r-sm); background: linear-gradient(100deg, var(--wb-surface-sunk) 30%, var(--wb-surface) 50%, var(--wb-surface-sunk) 70%); background-size: 220% 100%; animation: qs-shimmer 1000ms var(--wb-ease) 1; }
@keyframes qs-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.qs-spinner { width: 11px; height: 11px; border: 1.5px solid var(--wb-border-strong); border-right-color: var(--wb-muted); border-radius: 50%; display: inline-block; }
@media (min-width: 900px) and (max-width: 1250px) {
  .qs-topbar { gap: 7px; padding-inline: 10px; flex-wrap: wrap; }
  .qs-heading p { display: none; }
  .qs-name-wrap { flex-basis: 100px; }
  .qs-topbar .qs-short { max-width: 125px; }
  .qs-stage { padding: 20px; }
  .qs-workspace { grid-template-columns: 64px 310px minmax(0, 1fr); }
  .qs-back span { display: none; }
  .qs-mockups { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .qs-topbar { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .qs-heading { margin-right: auto; }
  .qs-heading h1 { font-size: 17px; }
  .qs-name-wrap { order: 5; flex-basis: calc(100% - 130px); padding: 0; border: 0; }
  .qs-history { order: 6; }
  .qs-topbar .qs-scan { order: 7; margin-left: auto; }
  .qs-topbar .qs-short { order: 8; max-width: 100%; }
  .qs-back { padding: 5px !important; }
  .qs-back span { display: none; }
  .qs-workspace { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .qs-canvas { order: 0; position: sticky; top: 0; z-index: 3; height: 340px; flex-shrink: 0; border-radius: 0; border-bottom: 1px solid var(--wb-border); background-color: var(--wb-surface-solid); }
  .qs-canvas-head { padding: 10px 12px 0; }
  .qs-canvas-head .qs-segments { margin-bottom: 0; }
  .qs-stage { padding: 10px 25px; }
  .qs-plate { width: 205px; }
  .qs-art { min-height: 0; padding: 12px; }
  .qs-canvas-toolbar { padding: 2px 5px; gap: 1px; margin: 0 0 8px; }
  .qs-canvas-toolbar .qs-icon-btn { width: 27px; height: 27px; }
  .qs-canvas-note { display: none; }
  .qs-rail { order: 1; flex-direction: row; gap: 5px; overflow-x: auto; padding: 9px; border-right: 0; border-bottom: 1px solid var(--wb-border); border-radius: 0; scrollbar-width: thin; }
  .qs-rail button { min-height: 54px; min-width: 65px; padding: 7px 10px; gap: 4px; }
  .qs-rail button span { font-size: 10px; }
  .qs-panel { order: 2; padding: 22px; overflow: visible; border-right: 0; border-radius: 0 0 var(--wb-r-lg) var(--wb-r-lg); min-height: 350px; }
  .qs-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qs-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qs-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qs-mockups { gap: 8px; }
  .qs-mockup-scene { height: 160px; padding: 12px; }
  .qs-mockup--1 .qs-mockup-surface, .qs-mockup--2 .qs-mockup-surface, .qs-mockup--3 .qs-mockup-surface { height: 135px; }
  .qs-mockup-label { margin: 3px 0; font-size: 9px; }
  .qs-pop { position: fixed; top: auto; bottom: 12px; right: 12px; width: min(380px, calc(100vw - 24px)); max-height: 85dvh; }
  .qs-notice { position: fixed; bottom: 16px; right: 16px; }
}
@media (max-width: 450px) {
  .qs-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qs-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qs-panel { padding: 20px 15px; }
  .qs-heading p { display: none; }
  .qs-canvas-head .qs-segment { padding-inline: 8px; }
}
@media (prefers-reduced-transparency: reduce) {
  .qs-topbar, .qs-export, .qs-canvas-toolbar { background: var(--wb-surface-solid); backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qs-studio *, .qs-studio *::before, .qs-studio *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .qs-mockup-surface { transform: none !important; }
}
