.mode-label,.mobile-flow,.mobile-editor-bar,.mobile-sheet,.mobile-order-preview{display:none}
@media(max-width:850px){
  body.mobile-active{height:100dvh;min-height:0;overflow:hidden;background:#f1f2f3}
  .mobile-active .site-header,.mobile-active .cart-button,.mobile-active .editor-panel>.brand,.mobile-active .panel-bottom{display:none}
  .mobile-active .app-shell{position:fixed;inset:0;height:100%;min-height:0;background:#f1f2f3}
  .mobile-active .editor-panel{display:contents}
  .mobile-active:not([data-mobile-step="2"]) .app-shell{display:none}
  .mobile-flow{position:fixed;inset:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 14px max(12px,env(safe-area-inset-bottom));background:radial-gradient(ellipse at 50% 40%,#fff,#eef0f2 75%);overflow:hidden}
  .mobile-active[data-mobile-step="2"] .mobile-flow{display:none}
  .mobile-active[data-mobile-step="4"] .mobile-flow{visibility:hidden}
  .mobile-topbar,.mobile-editor-bar{height:66px;min-height:66px;display:flex;gap:10px;align-items:center;justify-content:space-between}
  .mobile-logo{display:flex;align-items:center;gap:7px;color:#1d2225;min-width:0;text-decoration:none}
  .mobile-logo img{width:47px;height:47px;object-fit:contain}
  .mobile-logo strong{font-size:13px;letter-spacing:-.3px;line-height:1.15}
  .mobile-logo small{display:block;font-size:9px;font-weight:400;letter-spacing:0;margin-top:3px;color:#666e75}
  .mobile-round{width:44px;height:44px;flex:none;display:grid;place-items:center;border:1px solid #dfe2e6;border-radius:50%;background:#fff;color:#1d2225;font-size:24px;padding:0}
  .mobile-next{height:44px;padding:0 19px;border:0;border-radius:24px;background:var(--brand-yellow);font-size:14px;font-weight:700;color:var(--brand-ink)}
  .mobile-next:disabled{background:#e2e4e6;color:#999fa4;box-shadow:none}
  .mobile-colors{display:flex;gap:5px;justify-content:space-between;align-items:center;margin:2px 0 6px;padding:5px 2px}
  .mobile-color{width:32px;height:32px;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #d3d7db;flex:none;position:relative}
  .mobile-color[aria-pressed="true"]{box-shadow:0 0 0 2px #00a3d6}
  .mobile-color[aria-pressed="true"]:after{content:"";position:absolute;inset:9px;border-radius:50%;background:#ffe500;box-shadow:0 0 0 1px #333}
  .mobile-shirt-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;perspective:1100px;touch-action:none;position:relative}
  .mobile-shirt-rotator{position:relative;width:min(100%,520px);aspect-ratio:1;transform-style:preserve-3d;transition:transform .4s cubic-bezier(.2,.65,.2,1);will-change:transform}
  .mobile-shirt-rotator.dragging{transition:none}
  .mobile-shirt-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform:rotateY(0deg)}
  .mobile-shirt-face[data-face="back"]{transform:rotateY(180deg)}
  .mobile-shirt-photo{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;filter:drop-shadow(0 9px 10px #16242f14)}
  .mobile-print{position:absolute;transform:translateX(-50%);height:auto;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
  .mobile-create{position:absolute;top:25%;left:32%;width:36%;height:43%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#ffffffe6;border:2px dashed #566168;border-radius:13px;color:#20292e;font-size:14px;line-height:1.3;text-shadow:none}
  .mobile-create b{font-size:35px;font-weight:300;line-height:1}
  .mobile-create small{font-size:12px}
  .mobile-side-label{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:11px;color:#737b81;pointer-events:none}
  .mobile-size-label{font-size:12px;font-weight:700;text-align:center;margin:4px 0 8px}
  .mobile-sizes{display:flex;gap:8px;justify-content:center}
  .mobile-sizes button{flex:1;min-width:0;max-width:150px;border:1px solid #dce0e4;border-radius:16px;background:#ffffff7a;padding:11px 4px;color:#717980}
  .mobile-sizes strong{display:block;font-size:21px;white-space:nowrap}
  .mobile-sizes small{display:block;font-size:11px;margin-top:3px}
  .mobile-sizes button[aria-pressed="true"]{background:#fff;border-color:#222;color:#1d2225;box-shadow:0 5px 14px #28303b12}
  .mobile-size-chart{display:block;margin:12px auto;border:0;background:transparent;color:#5c6670;text-underline-offset:3px;text-decoration:underline;font-size:12px;padding:4px}
  .mobile-help{padding:12px 15px;margin:8px 0;border:1px solid #dfe3e7;border-radius:16px;background:#ffffffb3;text-align:center;font-size:13px;line-height:1.5;color:#5d676d}
  .mobile-step{font-size:10px;letter-spacing:1px;text-align:center;color:#727b83;text-transform:uppercase;margin:4px 0 0}
  .mobile-step strong{color:#1d2225}
  .mobile-placement{display:flex;flex-direction:column;gap:7px}
  .mobile-download-status{margin:0;text-align:center;font-size:11px;color:var(--brand-ink)}
  .mobile-download-status:empty{display:none}
  .mobile-actions{display:flex;gap:4px;justify-content:space-around;margin:6px 0}
  .mobile-actions button{border:0;background:transparent;color:#4a535a;font-size:10px;display:flex;align-items:center;gap:5px;flex-direction:column;padding:2px;min-width:49px}
  .mobile-actions span{display:grid;place-items:center;width:42px;height:42px;background:#fff;border:1px solid #dfe3e7;border-radius:50%;font-size:21px}
  .mobile-actions button:disabled{opacity:.35}
  .mobile-dimensions{text-align:center;font-size:12px;font-weight:700;color:#46515b;margin:3px 0}
  .mobile-placement label{font-size:12px;display:flex;align-items:center;gap:12px;padding:0 8px}
  .mobile-placement input{width:100%;accent-color:#1d2225;min-height:24px}
  .mobile-editor-bar{position:absolute;inset:0 12px auto;z-index:3}
  .mobile-editor-bar .mobile-logo{margin-right:auto}
  .mobile-active .mode-tabs{position:absolute;left:0;right:0;top:66px;height:57px;margin:0;padding:6px 12px 10px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;z-index:3;white-space:nowrap;border:0}
  .mobile-active .mode-tabs::-webkit-scrollbar{display:none}
  .mobile-active .mode-tabs button{flex:none;width:auto;height:39px;border-radius:24px;padding:0 18px;background:#fff;font-size:14px;font-weight:600}
  .mobile-active .mode-tabs svg{display:none}
  .mobile-active .mode-label{display:inline}
  .mobile-active .mode-tabs button.active{background:var(--brand-yellow);border-color:var(--brand-yellow);box-shadow:none}
  .mobile-active [data-mode="collage"]{order:0}.mobile-active [data-mode="papa"]{order:1}.mobile-active [data-mode="patronymic"]{order:2}.mobile-active [data-mode="eyes"]{order:3}.mobile-active [data-mode="polaroid"]{order:4}.mobile-active [data-mode="heart"]{order:5}.mobile-active [data-mode="sport"]{order:6}.mobile-active [data-mode="custom"]{order:7}
  .mobile-active .workspace{position:absolute;inset:123px 0 var(--mobile-sheet-height,330px);height:auto;min-height:0;margin:0;padding:0;width:auto}
  .mobile-active .stage-scroll{height:100%;width:100%;min-height:0;padding:0;display:block;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#aeb5bc transparent;-webkit-overflow-scrolling:touch}
  .mobile-sheet{position:absolute;inset:auto 0 0;height:var(--mobile-sheet-height,330px);max-height:calc(100% - 205px);min-height:100px;display:flex;flex-direction:column;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -5px 28px #1d28351a;padding:0 16px max(10px,env(safe-area-inset-bottom));z-index:5;overflow:hidden}
  .mobile-sheet-handle{height:25px;min-height:25px;width:100%;border:0;background:transparent;display:grid;place-items:center;touch-action:none;cursor:ns-resize}
  .mobile-sheet-handle:after{content:"";width:36px;height:4px;background:#bdc2c7;border-radius:4px}
  .mobile-sheet-tabs{display:flex;gap:4px;background:#edf0f2;border-radius:13px;padding:4px;flex:none;margin-bottom:10px}
  .mobile-sheet-tabs button{flex:1;min-height:39px;border:0;background:transparent;border-radius:10px;color:#7a8289;font-weight:700;font-size:15px}
  .mobile-sheet-tabs button[aria-selected="true"]{background:#fff;color:#1d2225;box-shadow:0 2px 7px #18273813}
  .mobile-active .controls{min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:6px 6px 12px;flex:1;scrollbar-width:thin;font-size:13px}
  .mobile-sheet.collapsed .controls{display:none}
  .mobile-controls-content{display:flow-root}
  .mobile-active .input-shell{min-height:44px;border-radius:12px;padding:0 11px;box-shadow:none}
  .mobile-active input:not([type="range"]):not([type="checkbox"]):not([type="color"]):not([type="file"]),.mobile-active textarea{font-size:16px}
  .mobile-active .input-shell input{font-size:16px;width:100%;min-width:0}
  .mobile-active .segmented{border-radius:12px;padding:4px;gap:3px}
  .mobile-active .segmented button{min-height:35px;font-size:13px;border-radius:9px}
  .mobile-active .control-group{margin-bottom:10px}
  .mobile-active .row.control-group>.segmented{width:112px;flex:none}
  .mobile-active .row.control-group>.segmented button{flex:1;padding:0 6px}
  .mobile-active .row.control-group>.input-shell{flex:1;min-width:0;width:0}
  .mobile-placement label{white-space:nowrap}
  .mobile-active .toggle-row{font-size:12px;margin:11px 0}
  .mobile-active .toggle-pair{font-size:12px;gap:8px}
  .mobile-active .tiny-button{font-size:12px;min-height:34px}
  .mobile-active .range-field{font-size:12px;margin:12px 0}
  .mobile-active .range-field input{margin-top:10px;min-height:20px}
  .mobile-active .upload-box{height:76px;border-radius:14px;gap:5px;font-size:14px;margin:0}
  .mobile-active .upload-box strong{font-size:25px}
  .mobile-active .papa-photo-tile{height:68px}
  .mobile-active .papa-text-row{flex-wrap:wrap;margin:8px 0 14px}
  .mobile-active .papa-text-row .input-shell{flex-basis:100%}
  .mobile-active .papa-align{flex:1}
  .mobile-active .papa-align button{flex:1;width:auto;height:34px;text-align:center}
  .mobile-active .papa-font-select{width:130px;height:40px;font-size:12px}
  .mobile-photo-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .mobile-photo-pair label{font-size:12px}
  .mobile-caption{display:block;font-size:12px;margin:10px 0}
  .mobile-caption textarea{width:100%;border:1px solid #ddd;border-radius:12px;min-height:66px;padding:10px;margin-top:6px}
  .mobile-hint{font-size:12px;color:#737b84;line-height:1.5;margin:8px 0}
  .mobile-active .order-overlay{padding:0;background:#f1f2f3;z-index:20}
  .mobile-active .order-dialog{width:100%;max-width:none;height:100dvh;max-height:none;border-radius:0;box-shadow:none;border-top:3px solid var(--brand-yellow)}
  .mobile-active .order-header{padding:16px 20px}
  .mobile-active .order-header h2{font-size:20px}
  .mobile-active .order-body{padding:0 20px 16px}
  .mobile-active .order-footer{padding:12px 20px max(12px,env(safe-area-inset-bottom))}
  .mobile-active .order-footer button{height:48px}
  .mobile-order-preview{display:flex;gap:6px;margin:0 -10px 16px}
  .mobile-order-side{width:50%;text-align:center;font-size:11px;color:#727b84}
  .mobile-order-side>div{position:relative;aspect-ratio:1}
  .mobile-order-side .mobile-print{pointer-events:none}
  .mobile-size-dialog{width:min(92vw,420px);border:1px solid #ddd;border-top:4px solid var(--brand-yellow);border-radius:18px;padding:22px;color:#1d2225;margin:auto;box-shadow:0 20px 70px #0003}
  .mobile-size-dialog::backdrop{background:#17232e66}
  .mobile-size-dialog h2{font-size:19px;margin:0 0 17px}
  .mobile-size-dialog table{border-collapse:collapse;width:100%;font-size:12px;margin-bottom:15px}
  .mobile-size-dialog th,.mobile-size-dialog td{padding:10px 5px;text-align:left;border-bottom:1px solid #eee}
  .mobile-size-dialog p{font-size:12px;line-height:1.5;color:#737b84}
  .mobile-size-dialog button{width:100%;margin-top:12px}
  @media(max-height:680px){.mobile-topbar,.mobile-editor-bar{height:57px;min-height:57px}.mobile-active .mode-tabs{top:57px}.mobile-active .workspace{top:114px}.mobile-help{font-size:11px;padding:8px;margin:4px 0}.mobile-size-chart{margin:6px auto}.mobile-sizes button{padding:7px 3px}.mobile-sizes strong{font-size:18px}.mobile-color{width:28px;height:28px}.mobile-step{font-size:9px}}
  @media(max-height:480px){.mobile-flow{overflow-y:auto}.mobile-shirt-stage{flex:none;min-height:230px}.mobile-sheet{max-height:calc(100% - 190px)}}
}
@media(prefers-reduced-motion:reduce){.mobile-shirt-rotator{transition:none}}

@media(max-width:850px){.mobile-actions{grid-template-columns:repeat(3,1fr)}}
