/* Touch controls and comparison detail for phone-sized purchase/editor flows. */
.cf-mobile-compare-toggle,.cf-mobile-upload-title{display:none}
@media(max-width:600px){
  body:has(.overlay:not([hidden])) .cf-motion-master,
  body:has(dialog[open]) .cf-motion-master{display:none!important}
  html body .cf-motion-master{width:auto!important;max-width:calc(100% - 24px);min-height:44px;height:auto;right:auto}
  html body #uploadModal .close,html body #checkoutModal .close,.cf-autofix-dialog .cf-autofix-close{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
  #uploadModal .close,#checkoutModal .close{right:10px;top:10px}
  .cf-editor-report button,.cf-artwork-report button,.cf-editor-compare button{min-height:44px}
  #uploadModal,#checkoutModal{box-sizing:border-box;max-height:var(--cf-purchase-visible-height,100dvh);overscroll-behavior:contain;scroll-padding-block:16px}
  .layout .fields>label{min-width:0}
  .layout .fields select,.mp-form select{display:block;overflow:hidden;text-overflow:ellipsis;min-height:44px;font-size:16px}
  .layout .fields input,.layout .fields select{box-sizing:border-box;min-width:0;max-width:100%}
  .cf-editor-compare,.cf-autofix-dialog{max-width:calc(100% - 16px);max-height:min(calc(100dvh - 16px),calc(var(--cf-purchase-visible-height,100dvh) - 16px));overscroll-behavior:contain;scroll-padding-block:16px}
  .cf-editor-compare [data-editor-page],.cf-autofix-dialog select{font-size:16px;min-height:44px;width:100%;max-width:100%;box-sizing:border-box;padding:8px 10px}
  :is(.cf-editor-compare,.cf-autofix-dialog,#checkoutModal,.layout .fields,.mp-form) select{appearance:none;-webkit-appearance:none;height:48px;min-height:48px;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%2364656d' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
  .cf-editor-compare [data-editor-page]{margin-bottom:12px;border:1px solid #d9dae0;border-radius:8px;background-color:#fff;color:#25272b}
  .cf-editor-compare .cf-editor-buttons{position:sticky;bottom:-14px;background:#fff;padding:12px 0 max(12px,env(safe-area-inset-bottom));border-top:1px solid #e3e4e8;flex-wrap:wrap;gap:8px;z-index:1}
  .cf-editor-compare .cf-editor-buttons button{flex:1 1 120px;min-width:0;white-space:normal}
  .cf-editor-compare-grid>section,.cf-autofix-compare>section{min-width:0}
  .cf-mobile-compare-toggle{display:block;margin:0 0 12px;border:1px solid #d9dae0;border-radius:9px;padding:10px 14px;background:#fff;color:#25272b;font:600 14px/1.4 Arial,sans-serif;min-height:44px;width:100%;cursor:pointer}
  .cf-compare-expanded .cf-editor-compare-grid,.cf-compare-expanded .cf-autofix-compare{grid-template-columns:minmax(0,1fr)}
  .cf-compare-expanded .cf-editor-art canvas,.cf-compare-expanded .cf-editor-art img,.cf-compare-expanded .cf-fix-art canvas{max-width:100%;max-height:60dvh;object-fit:contain}
  #uploadModal .dropzone>b,#uploadModal .dropzone>span:not(.cf-mobile-upload-title){display:none}
  #uploadModal .dropzone .cf-mobile-upload-title{display:block;font-weight:700}
  #uploadModal input:not([type=checkbox]):not([type=radio]),#checkoutModal input:not([type=checkbox]):not([type=radio]),#checkoutModal select,#checkoutModal textarea{font-size:16px;min-height:48px}
}
