/* Dedicated Shopify phone layout. Desktop uses shopify-listing.css.
   Same forms, identity, approvals and jobs; no duplicated business state. */
@media (max-width:767px), (max-width:1100px) and (max-height:500px) and (pointer:coarse) {
 body main[data-section].shopify-listing-workspace { width: calc(100% - 12px); padding: 6px; }
 body main[data-section] #app > .platforms-page.shopify-listing-page {
  --subtab-inset: 8px;
  padding: 0 8px max(12px,env(safe-area-inset-bottom));
 }
 body #app .shopify-listing-page > .section-subtabs { margin-bottom: 8px; }
 .shopify-listing-page .shopify-studio { padding-top: 0; }
 body #app .shopify-studio :is(button,summary) { min-height: 44px; touch-action: manipulation; }
 body #app .shopify-studio :is(input:not([type=checkbox]),textarea,select),
 body #app .shopify-studio .sl-content-form :is(input,textarea) {
  font-size: 16px; line-height: 1.5; min-height: 44px; padding: 9px 10px;
 }
 body #app .shopify-studio input[type=checkbox] { width: 22px; height: 22px; margin: 0 7px 0 0; flex-shrink: 0; vertical-align: middle; }
 .shopify-studio :is(input,textarea,select) { scroll-margin-block: 90px; }
 .sl-toolbar { gap: 8px; flex-wrap: wrap; padding: 8px 0; }
 .sl-toolbar .sl-search { flex: 1 1 230px; width: 100%; }
 .sl-toolbar > .sl-quota { margin-left: auto; }
 .sl-editor-heading { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 6px 0 10px; }
 .sl-editor-heading > [data-back] { grid-column: 1; grid-row: 1; font-size: 12px; padding: 8px; }
 .sl-editor-heading h3 { grid-column: 2; grid-row: 1; font-size: 16px; overflow-wrap: anywhere; }
 body #app .shopify-studio .sl-mobile-search { display: block; grid-column: 3; grid-row: 1; width: 44px; font-size: 25px; padding: 4px; }
 .sl-editor-heading > [data-workflow] { grid-column: 1/3; grid-row: 2; min-width: 0; order: initial; }
 .sl-editor-heading .sl-editor-summary { display: flex; gap: 10px; align-items: center; }
 .sl-editor-heading .sl-editor-summary > .sl-progress { width: min(160px,100%); }
 .sl-editor-heading .sl-editor-summary > .sl-live { display: inline-flex; font-size: 10px; margin: 0; max-width: 100px; }
 .sl-editor-heading .sl-quota { grid-column: 3; grid-row: 2; order: initial; font-size: 10px; gap: 2px; justify-self: end; }
 .sl-editor-heading .sl-quota > span:first-child { display: none; }
 .sl-editor-heading .sl-search { grid-column: 1/-1; grid-row: 3; margin: 0; width: 100%; order: initial; }
 .sl-editor-heading[data-search-open=false] .sl-search { display: none; }
 .sl-editor-heading .sl-color-picker { grid-column: 1/-1; grid-row: 4; width: 100%; display: flex; gap: 10px; }
 .sl-editor-heading .sl-color-picker > span { display: inline; font-size: 12px; }
 .sl-editor-heading .sl-color-picker select { width: 100%; max-width: none; min-width: 0; }
 .sl-editor-heading > [data-image-manager] { grid-column: 1/-1; grid-row: 5; margin: 0; text-align: left; }
 .sl-editor-frame { border: 0; overflow: visible; background: transparent; }
 .sl-editor-body { padding: 0; }
 .sl-parent-content-state { margin-bottom: 10px; font-size: 12px; padding: 9px 11px; }
 .sl-content-form { gap: 12px; }
 .sl-content-editor > .sl-content-block { display: grid; grid-template-columns: minmax(0,1fr); padding: 12px; gap: 8px; }
 .sl-content-block > .sl-section-heading { margin-bottom: 0; gap: 8px; }
 .sl-form .sl-section-heading label { font-size: 14px; }
 .sl-section-heading > span { font-size: 11px; white-space: nowrap; }
 .sl-content-block > input { height: 44px; margin-top: 0; }
 .sl-content-form textarea { min-height: 140px; max-height: 520px; resize: vertical; }
 .sl-content-block > .sl-actions { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; margin: 0; }
 body #app .shopify-studio .sl-content-block > .sl-actions button { width: 100%; font-size: 12px; padding: 8px 6px; white-space: normal; }
 body #app .shopify-studio [data-content-approve],body #app .shopify-studio [data-price-save] { background: var(--sl-blue); border-color: var(--sl-blue); color: #fff; }
 .sl-prices { padding: 12px; }
 .sl-price-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 12px; }
 .sl-prices label { font-size: 12px; }
 .sl-price-input { gap: 5px; flex-wrap: wrap; }
 .sl-price-input input { width: 100%; min-width: 0; }
 .sl-price-input > span { font-size: 11px; }
 .sl-price-suggestion { font-size: 11px; gap: 6px; }
 body #app .sl-price-suggestion button { width: 100%; font-size: 11px; padding: 8px 5px; }
 .sl-price-confirm { grid-column: 1/-1; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
 .sl-price-confirm .sl-note { font-size: 11px; }
 .sl-size-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .sl-size-grid label { display: grid; grid-template-columns: 75px minmax(0,1fr); align-items: center; gap: 8px; }
 .sl-size-grid [data-size-amount] { grid-column: 2; width: 100%; }
 .sl-prices summary,.sl-tools summary { font-size: 12px; display: flex; align-items: center; }
 .sl-image-entry { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; }
 .sl-image-entry button { width: 100%; }
 .sl-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .sl-product-card > img,.sl-product-placeholder { height: 145px; }
 .sl-product-card .sl-progress b { font-size: 16px; }
 .sl-badges { font-size: 11px; }
 .sl-card-action { font-size: 12px; min-height: 44px; }
 .sl-reference-tools { padding: 5px 10px 10px; }
 .sl-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
 .sl-image { padding: 8px; min-width: 0; }
 .sl-image img { height: 160px; }
 .sl-image label { font-size: 12px; padding: 6px 0; }
 .sl-image label:has(input[type=checkbox]) { display: flex; align-items: center; min-height: 44px; }
 .sl-image select { width: 100%; }
 .sl-image p { font-size: 11px; }
 body #app .sl-image button:not(.sl-open-image) { width: 100%; font-size: 12px; }
 .sl-mobile-image-nav { display: flex; overflow-x: auto; gap: 8px; padding: 2px 0 10px; margin-bottom: 4px; overscroll-behavior-x: contain; }
 body #app .sl-mobile-image-nav button { flex: 0 0 auto; font-size: 12px; padding: 9px 12px; }
 .sl-recipe-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
 .sl-recipe { padding: 12px; scroll-margin-top: 16px; }
 .sl-recipe h4 { font-size: 16px; }
 .sl-recipe > p,.sl-recipe label { font-size: 12px; }
 .sl-recipe label { display: flex; align-items: center; min-height: 44px; }
 body #app .sl-recipe > button { width: 100%; font-size: 14px; }
 .sl-recipe .sl-result-preview { max-height: 52vh; max-height: 52svh; }
 .sl-recipe .sl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
 body #app .sl-recipe .sl-actions button { font-size: 12px; padding: 8px 5px; white-space: normal; }
 .sl-approved-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; align-items: center; }
 .sl-approved-strip > strong,.sl-approved-strip > div { flex-shrink: 0; }
 .sl-approved-strip > strong { font-size: 12px; max-width: 85px; }
 .sl-history-row > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; padding: 10px 0; }
 .sl-history-row > summary::before { display: none; }
 .sl-history-row time { grid-column: 1; font-size: 11px; }
 .sl-history-row > summary > span { grid-column: 1; overflow-wrap: anywhere; }
 .sl-history-row > summary > small { grid-column: 2; grid-row: 1/3; }
 .sl-history-diff { grid-template-columns: 1fr; }
 .sl-image-dialog { width: calc(100vw - 12px); max-width: calc(100vw - 12px); padding: max(10px,env(safe-area-inset-top)) 8px max(10px,env(safe-area-inset-bottom)); max-height: 98vh; max-height: 98dvh; }
 .sl-image-dialog [data-full-image] { height: calc(90vh - 60px); height: calc(90dvh - 60px); }
 body #app .sl-image-dialog button { min-height: 44px; font-size: 14px; }
}
@media (max-width:1100px) and (max-height:500px) and (pointer:coarse) {
 .sl-content-form textarea { max-height: 220px; }
 .sl-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .sl-recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px), (max-width:1100px) and (max-height:500px) and (pointer:coarse) {
 .sl-content-form { display: flex; flex-direction: column; gap: 12px; }
 .sl-content-form > .sl-product-gallery { position: static; padding: 9px; }
 .sl-product-gallery .sl-gallery-heading { flex-direction: row; align-items: center; justify-content: space-between; }
 .sl-photo-track { height: 230px; height: clamp(160px,27svh,260px); }
 .sl-gallery-controls { margin: 5px 0; }
 body #app .sl-gallery-controls button { min-width: 48px; }
 .sl-product-gallery > small { display: block; text-align: center; }
}
@media (max-width:767px), (max-width:1100px) and (max-height:500px) and (pointer:coarse) {
 .sl-image-workspace { display: flex; flex-direction: column; gap: 12px; }
 .sl-review-originals { position: static; width: 100%; }
 .sl-image-workbench { width: 100%; }
 .sl-compare-pair { gap: 8px; }
 .sl-compare-pair h4 { font-size: 12px; min-height: 34px; }
 .sl-compare-photo { height: max(150px,calc(52vh - 80px)); height: max(150px,calc(52dvh - 80px)); }
 .sl-compare-pair small { font-size: 10px; }
 .sl-compare-dialog .sl-gallery-controls button { min-width: 44px; }
}

@media(max-width:767px),(max-width:1100px) and (max-height:500px) and (pointer:coarse){.shopify-studio .sl-slot-feedback textarea{font-size:16px}.sl-existing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sl-existing-grid img{height:170px}}
