.head-tools{border:2px solid #acd6b7;border-radius:14px;padding:12px;margin:12px 0;background:#f6fff8}.head-tools p{font-size:13px;line-height:1.45;margin:8px 0}.head-tools button,#head-dialog button{font:700 15px system-ui;min-height:44px;border:2px solid #192b24;border-radius:12px;background:#fff;padding:9px 12px;cursor:pointer}.head-tools button:disabled,#head-dialog button:disabled{opacity:.45;cursor:default}#head-remove,#head-apply{background:#ffe535!important;color:#191b29}.head-tools [hidden]{display:none!important}
#head-dialog{width:min(680px,calc(100vw - 20px));max-height:92dvh;overflow:auto;border:3px solid #191b29;border-radius:20px;padding:18px;background:#fff;color:#191b29;box-sizing:border-box}#head-dialog::backdrop{background:#101b28b8}.head-heading{display:flex;gap:12px;align-items:flex-start;justify-content:space-between}.head-heading h2{font-family:Fredoka,system-ui;font-size:25px;margin:0}.head-heading button{flex-shrink:0}#head-help,.head-note,#head-status{font:14px/1.5 system-ui}.head-note{color:#53665d}.head-scroll{width:100%;max-height:52dvh;overflow:auto;background:repeating-conic-gradient(#e3e7e5 0% 25%,#fff 0% 50%) 0/20px 20px}.head-scroll canvas{display:block;touch-action:none;max-width:none;height:auto;cursor:crosshair}.head-zoom{display:flex;align-items:center;gap:12px;margin:10px 0}.head-zoom input{flex:1;min-width:0}.head-actions{display:flex;flex-wrap:wrap;gap:8px}.head-actions button{flex:1 1 40%}
#garment-photo-wrap.is-cutout{border-radius:0;background:transparent;border:0;box-shadow:none;overflow:visible}#garment-photo-wrap.is-cutout img{object-fit:contain}
.design-steps{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important}.design-steps a{border:2px solid #245d40!important;border-radius:18px!important;padding:14px!important;display:flex;flex-direction:column;text-align:center;font-size:17px!important;gap:8px!important;background:#e9f9df!important;color:#193d2b!important}.design-steps a:nth-child(2){background:#a9e5a5!important}.design-steps a:nth-child(3){background:#217647!important;color:#fff!important}.design-steps b{width:52px!important;height:52px!important;background:#fff!important;color:#193d2b!important;border:2px solid currentColor;font:700 36px Fredoka,system-ui}.design-steps small{font:13px/1.45 system-ui;display:block}.compact-editor .step-round{flex-basis:52px!important;width:52px!important;height:52px!important;font-size:32px!important;background:#e9f9df!important;color:#193d2b!important}.compact-editor .step-round.inverse{background:#a9e5a5!important}.request-step{display:inline-grid;place-items:center;width:52px;height:52px;background:#217647;color:white;border-radius:50%;font-size:32px;margin-right:8px}
@media(max-width:600px){.design-steps{grid-template-columns:1fr!important;gap:8px!important}.design-steps a{display:grid;grid-template-columns:52px 1fr;text-align:left;padding:11px!important}.design-steps b{grid-row:1 / 3}.design-steps strong,.design-steps small{grid-column:2}.head-heading h2{font-size:21px}}
#head-remove,#head-apply{background:#217647!important;color:#fff!important}.v18-style-page .preview-view-button.is-active,.v18-style-page .side-choice input:checked+span{background:#a9e5a5!important;color:#193d2b!important}.v18-style-page .compact-editor .review-next{background:#217647!important;color:white!important}.v18-style-page .compact-editor .preview-panel{box-shadow:5px 5px #a9e5a5!important}

/* V44: fit the whole photo and keep exit/actions visible on a phone. */
#head-dialog{width:min(680px,calc(100vw - 16px));height:min(760px,calc(100dvh - 16px));max-height:calc(100dvh - 16px);padding:12px;overflow:hidden;margin:auto}
#head-dialog[open]{display:grid;grid-template-rows:auto auto minmax(60px,1fr) auto auto auto;gap:8px}
#head-dialog .head-heading{align-items:center}#head-dialog .head-heading h2{font-size:22px}
#head-dialog #head-help,#head-dialog #head-status{font-size:12px;line-height:1.3;margin:0}
#head-dialog .head-scroll{min-height:0;height:100%;max-height:none;overflow:auto;overscroll-behavior:contain}
#head-dialog .head-scroll canvas{margin:0 auto;max-width:none}
#head-dialog .head-zoom{margin:0;gap:8px;font-size:13px}
#head-dialog .head-zoom input{width:50px}#head-dialog .head-actions{gap:6px}
#head-dialog button{font-size:13px;min-height:44px;padding:7px 9px}
#head-dialog #head-close{background:white;color:#191b29;border-color:#ef48bd}
@media(max-height:500px){#head-dialog #head-help{display:none}#head-dialog[open]{grid-template-rows:auto minmax(50px,1fr) auto auto auto}#head-dialog .head-actions{flex-wrap:nowrap}#head-dialog .head-actions button{flex:1;font-size:11px}}

/* V46 automatic removal inside the fitted editor. */
#head-dialog [hidden]{display:none!important}
#head-auto{background:#ff52cf;color:#191927;border:2px solid #191927}
#head-touch{flex-basis:100%;background:white}
#head-apply{background:#ffe839;color:#191927}
#head-dialog #head-auto{background:#ff52cf;color:#191927;border-color:#191927}
#head-dialog #head-apply{background:#ffe839;color:#191927}

/* V48: smooth zoom, separate move mode and a finger-sized brush slider. */
#head-dialog[open]{grid-template-rows:auto auto minmax(80px,1fr) auto auto auto auto}
#head-dialog .head-zoom{display:grid;grid-template-columns:auto auto minmax(80px,1fr) 42px}
#head-dialog .head-zoom input{width:100%;min-height:36px;accent-color:#e735b5;touch-action:pan-y}
#head-brush-tools{display:flex;gap:8px;align-items:center;font:12px system-ui}
#head-brush{min-width:50px;width:100%;min-height:36px;accent-color:#e735b5}
#head-brush-tools label,#head-pan{flex-shrink:0}
#head-dialog .head-actions{max-height:28dvh;overflow:auto}
#head-dialog #head-touch{flex-basis:auto}
#head-dialog #head-apply{flex-basis:100%}
@media(max-height:600px){#head-dialog{overflow:auto}#head-dialog[open]{display:flex;flex-direction:column}#head-dialog .head-scroll{flex:1 0 150px}#head-dialog .head-actions{max-height:none;flex-wrap:wrap}}
