/* Own page scope, independent of desktop shell classes. */
html body.peter-experience-pilot main#main:has(> .gq-workspace), html body main#main:has(> .gq-workspace) { overflow:hidden!important; min-height:0; padding-bottom:16px!important; display:flex!important; flex-direction:column; }
.gq-workspace { height:100%; flex:1; min-height:0; display:flex; flex-direction:column; color:var(--ink-strong,#1d1d1f); font-family:var(--font-sans,-apple-system,BlinkMacSystemFont,sans-serif); font-size:14px; }
.gq-workspace * { box-sizing:border-box; }
.gq-workspace h1,.gq-workspace h2,.gq-workspace h3,.gq-workspace p { margin:0; }
.gq-workspace h1 { font-size:20px; }.gq-workspace h2 { font-size:18px; }.gq-workspace h3 { font-size:15px; }
.gq-workspace button,.gq-workspace input,.gq-workspace textarea { font:inherit; color:inherit; }
.gq-workspace button { min-height:var(--gc-field-height,36px); padding:6px 12px; border:1px solid var(--line,#e5e5ea); border-radius:var(--gc-field-radius,8px); background:var(--surface,#fff); cursor:pointer; }
.gq-workspace button:hover { background:var(--bg-hover,#f9f9fb); }
.gq-workspace button:disabled { opacity:.5; cursor:default; }
.gq-workspace input:not([type=checkbox]):not(.prod-qc-search-input),.gq-workspace textarea { width:100%; min-width:0; height:var(--gc-field-height,36px); border:1px solid var(--line-strong,#d1d1d6); border-radius:var(--gc-field-radius,8px); background:var(--surface,#fff); padding:6px 9px; }
.gq-workspace input[type=number] { text-align:right; font-variant-numeric:tabular-nums; }
.gq-workspace input[type=checkbox] { accent-color:#007aff; width:16px; height:16px; flex-shrink:0; }
.gq-workspace :is(button,a,summary):focus-visible { outline:2px solid var(--apple-blue); outline-offset:2px; }
html body .gq-workspace :is(input:not(.prod-qc-search-input),textarea):focus { outline:none!important; border-color:var(--apple-blue)!important; box-shadow:var(--focus-ring)!important; }
.gq-workspace label { display:flex; flex-direction:column; min-width:0; gap:5px; }
.gq-workspace label>span,.gq-workspace small { color:var(--ink-mute,#6b6b6e); font-size:12px; }
.gq-workspace fieldset { border:0; padding:0; margin:0; min-width:0; }
.gq-toolbar { display:flex; align-items:center; gap:14px; flex:0 0 auto; padding:4px 0 12px; }
.gq-layout { display:grid; grid-template-columns:240px minmax(0,1fr); flex:1; min-height:0; border:1px solid var(--line,#e5e5ea); border-radius:12px; overflow:hidden; background:var(--surface,#fff); }
.gq-sidebar { min-height:0; min-width:0; display:flex; flex-direction:column; border-right:1px solid var(--line,#e5e5ea); }
.gq-search-slot { display:flex; align-items:center; flex:0 0 auto; min-width:0; padding:12px; border-bottom:1px solid var(--line,#e5e5ea); }
#gqList { flex:1; min-height:0; overflow:auto; padding:4px 8px 12px; }
.gq-workspace .gq-style { display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:0; padding:10px; margin-bottom:4px; }
.gq-style img,.gq-thumb-empty { width:48px; height:62px; object-fit:contain; flex-shrink:0; background:var(--bg,#f5f5f7); border-radius:6px; }
.gq-thumb-empty { display:grid; place-items:center; font-size:12px; }
.gq-style>span:last-child { display:flex; flex-direction:column; gap:5px; min-width:0; overflow-wrap:anywhere; }.gq-style b { font-size:13px; }
.gq-workspace .gq-style.is-selected { background:var(--apple-blue-bg); color:var(--apple-blue-hover); }
#gqEditor { min-width:0; min-height:0; display:flex; flex-direction:column; }
.gq-editor-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line,#e5e5ea); flex-shrink:0; overflow-wrap:anywhere; }
.gq-editor-head span { display:block; margin-top:5px; color:var(--ink-mute,#6b6b6e); font-size:13px; }
.gq-editor-scroll { min-height:0; flex:1; overflow:auto; padding:16px; overscroll-behavior:contain; }
.gq-identity { display:grid; grid-template-columns:252px minmax(0,1fr); gap:16px; padding-bottom:12px; border-bottom:1px solid var(--line,#e5e5ea); margin-bottom:12px; }
.gq-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; align-items:start; }
.gq-photos>a,.gq-photos>div { height:108px; display:grid; place-items:center; border:1px solid var(--line,#e5e5ea); border-radius:var(--gc-field-radius,8px); overflow:hidden; color:var(--ink-mute,#6b6b6e); font-size:12px; text-align:center; }
.gq-photos img { width:100%; height:100%; object-fit:contain; }
.gq-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding-bottom:16px!important; align-content:start; }
.gq-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(250px,.9fr); gap:24px; }.gq-costs { min-width:0; }
.gq-section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.gq-cost-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,.7fr); gap:12px; align-items:center; border-bottom:1px solid var(--line,#e5e5ea); padding:3px 0; }
.gq-workspace .gq-cost-row input[readonly] { border-color:transparent; background:transparent; padding-left:0; }
.gq-fabrics { min-width:0; height:108px; overflow:auto; overscroll-behavior:contain; }.gq-fabrics h3 { margin-bottom:4px; }
.gq-fabric-note { padding:4px 0; line-height:1.6; overflow-wrap:anywhere; }.gq-fabric-note img { max-width:160px!important; max-height:160px!important; object-fit:contain; }.gq-fabric-note table { max-width:100%; }.gq-fabric-note .rich-display { margin-top:6px; }
.gq-fabric-item { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:12px; padding:10px 0; border-bottom:1px solid var(--line,#e5e5ea); font-size:13px; overflow-wrap:anywhere; }
.gq-material small { display:block; margin-top:5px; overflow-wrap:anywhere; }
.gq-use { align-items:center; }.gq-use input { margin:23px 0 0; }.gq-use span { font-size:11px; }
.gq-subtotal { display:flex; flex-direction:column; gap:8px; text-align:right; font-size:12px; }.gq-subtotal b { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.gq-cost-row.is-excluded { opacity:.65; }.gq-material-confirm { flex-direction:row!important; align-items:center; margin-top:14px; font-size:13px; }
.gq-pricing { border-left:1px solid var(--line,#e5e5ea); padding-left:20px; }.gq-pricing fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }.gq-pricing fieldset>button { align-self:end; font-size:13px; }.gq-pricing>h3 { margin-bottom:12px; }
.gq-total { display:flex; justify-content:space-between; gap:10px; padding:6px 0; font-size:13px; }.gq-total b { font-size:17px; }
.gq-price-result { display:grid; grid-template-columns:1fr auto; gap:4px; padding:7px 0; border-top:1px solid var(--line,#e5e5ea); font-size:13px; }.gq-price-result small { grid-column:1/-1; }
.gq-workspace .gq-loss { color:var(--danger); }.gq-warning { color:var(--warn); font-size:13px; margin-top:10px!important; line-height:1.6; }
.gq-note { margin-top:16px; }.gq-workspace .gq-note textarea { height:56px; resize:vertical; }.gq-history { margin-top:24px; }.gq-history h3 { margin-bottom:12px; }
.gq-workspace .gq-history-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; width:100%; border:0; border-bottom:1px solid var(--line,#e5e5ea); border-radius:0; text-align:left; }
.gq-footer { display:flex; gap:10px; align-items:center; flex-shrink:0; border-top:1px solid var(--line,#e5e5ea); padding:12px 20px; }.gq-footer>span { margin-right:auto; color:var(--ink-mute,#6b6b6e); font-size:13px; }
.gq-workspace .gq-primary { background:var(--apple-blue); color:white; border-color:var(--apple-blue); }.gq-workspace .gq-primary:hover { background:var(--apple-blue-hover); }
.gq-empty { padding:24px; color:var(--ink-mute,#6b6b6e); }.gq-select-toggle { display:none; }
/* quotation-split-workbench-v4: reference and calculation have independent scroll ownership. */
.gq-layout { grid-template-columns:220px minmax(0,1fr); }
.gq-editor-head { background:var(--bg-elevated); padding:12px 16px; }
.gq-editor-head h2 { font-size:16px; line-height:1.3; }
.gq-editor-head>b { font-size:12px; font-weight:500; color:var(--ink-mute); }
.gq-editor-content { flex:1; min-height:0; display:grid; grid-template-columns:240px minmax(0,1fr); }
.gq-reference { min-width:0; min-height:0; overflow:auto; padding:16px; border-right:1px solid var(--line); background:var(--bg-elevated); overscroll-behavior:contain; }
.gq-photos { margin-bottom:20px; gap:6px; }
.gq-photos>a,.gq-photos>div { height:96px; }
.gq-fabrics { height:auto; overflow:visible; }
.gq-fabric-note { font-size:13px; line-height:1.65; }
.gq-fabric-note .rich-display { max-width:100%; }
.gq-fabric-note .rich-display * { max-width:100%!important; overflow-wrap:anywhere; white-space:normal!important; }
.gq-fabric-note img { display:inline-block; max-width:100%!important; height:auto!important; }
.gq-fabric-item { grid-template-columns:minmax(0,1fr); gap:4px; }
.gq-editor-scroll { padding:16px 20px; }
.gq-fields { background:transparent; padding:0 0 16px!important; margin:0 0 16px!important; border-bottom:1px solid var(--line); gap:10px; }
.gq-fields label>span { min-height:16px; }
.gq-body { grid-template-columns:minmax(210px,1fr) minmax(250px,1fr); gap:20px; }
.gq-pricing { padding-left:20px; }
.gq-pricing fieldset { grid-template-columns:minmax(0,1fr); gap:10px; }
.gq-pricing fieldset>button { min-height:30px; padding:4px 8px; justify-self:start; border:0; color:var(--apple-blue); background:transparent; }
.gq-pricing fieldset>label:first-child>input { font-size:18px; font-weight:650; }
.gq-cost-row { grid-template-columns:minmax(0,1fr) 112px; padding:5px 0; }
.gq-section-head { margin-bottom:8px; }
.gq-section-head>span { color:var(--ink-mute); font-size:12px; }
.gq-extra-costs>summary { cursor:pointer; min-height:36px; padding:9px 0; color:var(--ink-mute); font-size:13px; }
.gq-extra-costs>summary:focus-visible { outline:2px solid var(--apple-blue); outline-offset:2px; }
.gq-workspace .gq-style { background:transparent; margin:0; padding:8px; border-radius:6px; }
.gq-sidebar { background:var(--bg-elevated); }
.gq-workspace .gq-style:hover { background:var(--bg); }
.gq-workspace .gq-style.is-selected { background:var(--apple-blue-bg); }
.gq-style b { line-height:1.4; }
.gq-style small { line-height:1.4; }
.gq-footer { background:var(--bg-elevated); padding:10px 16px; }
.gq-note { margin-top:20px; }
.gq-workspace input:disabled,.gq-workspace textarea:disabled { background:var(--bg); color:var(--ink-mute); }
html body .gq-workspace input:not(.prod-qc-search-input) { height:36px!important; min-height:36px!important; border-radius:var(--gc-field-radius,8px); }
@media(max-width:1500px) { .gq-layout { grid-template-columns:minmax(0,1fr); position:relative; }.gq-select-toggle { display:block; margin-left:auto; }.gq-sidebar { display:none; }.gq-select-open .gq-sidebar { display:flex; position:absolute; inset:0 auto 0 0; width:min(320px,100%); z-index:5; box-shadow:var(--shadow-md); }.gq-editor-content { grid-template-columns:260px minmax(0,1fr); } }
@media(max-width:1100px) { .gq-editor-content { grid-template-columns:200px minmax(0,1fr); }.gq-reference { padding:12px; }.gq-photos>a,.gq-photos>div { height:80px; }.gq-editor-scroll { padding:12px; }.gq-body { grid-template-columns:minmax(0,1fr); }.gq-pricing { padding:16px 0 0; border-left:0; border-top:1px solid var(--line); }.gq-pricing fieldset { grid-template-columns:repeat(2,minmax(0,1fr)); }.gq-pricing fieldset>button { align-self:end; min-height:36px; }.gq-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.gq-fields>label:first-child { grid-column:1/-1; } }
@media(max-width:720px) { .gq-editor-content { display:block; overflow:auto; }.gq-reference { display:grid; grid-template-columns:180px minmax(0,1fr); gap:12px; border-right:0; border-bottom:1px solid var(--line); overflow:visible; }.gq-photos { margin:0; }.gq-fabrics { height:112px; overflow:auto; }.gq-editor-scroll { overflow:visible; }.gq-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }.gq-fields>label:first-child { grid-column:auto; }.gq-toolbar { gap:8px; }.gq-toolbar h1 { font-size:17px; }.gq-workspace button { min-height:44px; }.gq-workspace input:not(.prod-qc-search-input),html body .gq-workspace input:not(.prod-qc-search-input) { height:44px!important; min-height:44px!important; }.gq-footer { flex-wrap:wrap; }.gq-footer>span:empty { display:none; }.gq-footer>span:not(:empty) { flex-basis:100%; }.gq-extra-costs>summary { min-height:44px; padding:12px 0; } }
@media(max-width:480px) { .gq-reference { grid-template-columns:minmax(0,1fr); }.gq-photos { width:216px; }.gq-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.gq-fields>label:first-child { grid-column:1/-1; } }

/* quotation-labels-gallery-footer-v5 */
.gq-cost-label { color:var(--ink); line-height:1.4; cursor:default; }
.gq-reference img[role=button] { cursor:zoom-in; }
.gq-reference img[role=button]:focus-visible { outline:2px solid var(--apple-blue); outline-offset:2px; }
html body .gq-workspace .gq-footer { padding:6px 12px; gap:8px; }
html body .gq-workspace .gq-footer button { height:32px!important; min-height:32px!important; padding:4px 10px!important; font-size:13px!important; line-height:20px!important; }
@media(max-width:720px) { html body .gq-workspace .gq-footer button { height:44px!important; min-height:44px!important; } }

.gq-fabric-cost { padding:8px 0 12px; border-bottom:1px solid var(--line); }
.gq-fabric-inputs { display:grid; grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr); gap:6px; align-items:end; margin:8px 0; }
.gq-fabric-inputs>span { align-self:center; padding-top:18px; color:var(--ink-mute); }
.gq-fabric-cost>small { display:block; line-height:1.5; }
.gq-fabric-cost b { font-size:14px; font-variant-numeric:tabular-nums; }

/* peter-workbench-system-v1: compact numbers; keep full references and immutable history. */
@media screen {
  html body.peter-workbench-frame-pilot .gq-fields {
    grid-template-columns:160px 170px 140px; justify-content:start; gap:12px;
    padding-bottom:12px!important; margin-bottom:12px!important;
  }
  html body.peter-workbench-frame-pilot .gq-fields>label:first-child { grid-column:auto; }
  html body.peter-workbench-frame-pilot .gq-editor-head { padding:10px 16px; }
  html body.peter-workbench-frame-pilot .gq-editor-scroll { padding:12px 16px; }
  html body.peter-workbench-frame-pilot .gq-body { gap:16px; }
  html body.peter-workbench-frame-pilot .gq-pricing { padding-left:16px; }
  html body.peter-workbench-frame-pilot .gq-pricing fieldset { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin:8px 0 12px; }
  html body.peter-workbench-frame-pilot .gq-pricing fieldset>label { display:grid; grid-template-columns:minmax(0,1fr) 112px; align-items:center; gap:8px; }
  html body.peter-workbench-frame-pilot .gq-pricing .gq-section-head { flex-wrap:wrap; gap:4px 8px; }
  html body.peter-workbench-frame-pilot .gq-pricing [data-action=suggest] { min-height:32px; padding:0 4px; border:0; background:transparent; color:var(--apple-blue); font-size:12px; font-weight:600; }
  html body.peter-workbench-frame-pilot .gq-workspace input:not(.prod-qc-search-input) { font-size:var(--gc-type-body); }
  html body.peter-workbench-frame-pilot .gq-cost-row { padding:4px 0; }
  html body.peter-workbench-frame-pilot .gq-fabric-inputs { grid-template-columns:minmax(80px,112px) 12px minmax(80px,112px); }
  html body.peter-workbench-frame-pilot .gq-photos { margin-bottom:12px; }
  html body.peter-workbench-frame-pilot .gq-note { margin-top:12px; }
  html body.peter-workbench-frame-pilot .gq-history { margin-top:16px; }
  html body.peter-workbench-frame-pilot .gq-footer button { font-weight:600!important; }
}
@media screen and (max-width:1100px) {
  html body.peter-workbench-frame-pilot .gq-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
  html body.peter-workbench-frame-pilot .gq-pricing { padding:12px 0 0; }
}
@media screen and (max-width:720px) {
  html body.peter-workbench-frame-pilot .gq-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html body.peter-workbench-frame-pilot .gq-fields>label:first-child { grid-column:1/-1; max-width:200px; }
  html body.peter-workbench-frame-pilot .gq-pricing [data-action=suggest] { min-height:var(--gc-ui-touch-target-height); }
}
