#modal:has(.guest-local-shell)[open]{display:flex;flex-direction:column;box-sizing:border-box;width:min(760px,100%);height:min(860px,94dvh);max-height:100dvh;max-width:100%;padding:0;overflow:hidden;overscroll-behavior:contain}
#modal:has(.guest-local-shell) .modal-top{position:static;flex:none;padding:9px 16px}
#modal:has(.guest-local-shell) .modal-body{flex:1;min-height:0;overflow:hidden;padding:0 12px}
.guest-local-shell{display:grid;height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr) minmax(0,clamp(138px,25dvh,220px)) auto auto;gap:6px;overflow:hidden}
.g-local-nav,.g-local-rail,.g-local-foot{display:flex;gap:6px;align-items:center}.g-local-nav,.g-local-rail{overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;touch-action:pan-x}
.g-local-nav button,.g-local-rail button,.g-local-foot button,.g-local-controls>button{min-height:40px;padding:4px 10px;border-radius:9px}.g-local-nav [aria-current=step],.g-local-rail [aria-pressed=true]{color:#b73500;background:#ffede6}
.g-local-stage{display:grid;place-items:center;min-height:0;background:#211f1e;overflow:hidden;border-radius:10px}
.g-local-frame{position:relative;overflow:hidden}.g-local-frame canvas{display:block;width:100%;height:100%;position:absolute;inset:0}.g-local-frame canvas+canvas{touch-action:none}
.g-local-controls{overflow:auto;overscroll-behavior:contain}.g-local-rail button{flex:none;display:grid;justify-items:center;font-size:11px}.g-local-rail button span{display:grid;place-items:center;border:1px solid;border-radius:50%;width:32px;height:32px;font-size:16px}
.g-local-controls .retouch-slider input{touch-action:none}.g-local-choice{display:inline-flex;gap:5px;align-items:center;margin:4px}.g-local-foot{justify-content:space-between;padding-bottom:max(5px,env(safe-area-inset-bottom));border-top:1px solid #8884}.guest-local-shell>p{margin:0;font-size:12px}
@media(max-width:600px){#modal:has(.guest-local-shell)[open]{inset:0;margin:0;height:100dvh;border-radius:0;padding-top:env(safe-area-inset-top)}}
#modal .g-local-nav{position:static;inset:auto;transform:none;z-index:auto;width:auto;min-width:0;min-height:0;height:auto;justify-content:flex-start;box-shadow:none;border:0;border-radius:0;padding:0;background:transparent}
#modal .g-local-nav button{flex:1 0 auto;min-width:0}
.g-local-stage{position:relative}.g-original{position:absolute;right:8px;top:8px;z-index:2;touch-action:none;user-select:none;min-height:36px;border-radius:99px;background:#fff;color:#292420;font-size:12px;padding:6px 10px}
.g-local-stage canvas{user-select:none;-webkit-user-select:none}.g-local-controls fieldset{border:0;padding:0;margin:0}.g-local-controls fieldset legend{font-size:12px}.g-local-nav [aria-current=step]{font-weight:700}

#modal:has(.guest-local-shell) .modal-top h3{min-width:0;overflow-wrap:anywhere}
#modal:has(.guest-local-shell) .modal-top .round{flex:none;min-width:44px;min-height:44px}
.guest-local-shell .g-local-nav button,.guest-local-shell .g-local-foot button,.guest-local-shell .g-local-rail button,.g-local-controls .retouch-slider input{min-height:44px}
.g-local-controls{min-width:0;overflow-x:hidden}
.g-local-controls select,.g-local-controls button{max-width:100%}
.g-local-choice{min-height:36px;max-width:100%;overflow-wrap:anywhere}
.g-local-rail :focus-visible,.g-local-nav :focus-visible,.g-local-foot :focus-visible{outline:2px solid #bb3800;outline-offset:-2px}
@media(max-width:600px){
 #modal:has(.guest-local-shell) .modal-body{padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))}
}
@media(min-width:601px) and (max-width:959px) and (min-height:600px){
 #modal:has(.guest-local-shell)[open]{width:min(calc(100% - 48px),850px);height:min(91dvh,980px)}
 #modal:has(.guest-local-shell) .modal-body{padding-inline:18px}
 .guest-local-shell{gap:10px}
}
@media(min-width:960px), (min-width:600px) and (max-height:520px){
 #modal:has(.guest-local-shell)[open]{width:min(calc(100% - 40px),1240px);height:min(89dvh,880px)}
 #modal:has(.guest-local-shell) .modal-body{padding-inline:16px}
 .guest-local-shell{grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;
  grid-template-areas:"steps steps" "preview controls" "preview message" "footer footer";gap:10px 16px}
 .guest-local-shell .g-local-nav{grid-area:steps}
 .guest-local-shell .g-local-stage{grid-area:preview}
 .guest-local-shell .g-local-controls{grid-area:controls;padding:.25rem .25rem 1rem}
 .guest-local-shell>p{grid-area:message}
 .guest-local-shell .g-local-foot{grid-area:footer}
}
@media(min-width:600px) and (max-height:520px){
 #modal:has(.guest-local-shell)[open]{inset:0;margin:0;width:100%;height:100dvh;border-radius:0}
 #modal:has(.guest-local-shell) .modal-body{padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))}
 #modal:has(.guest-local-shell) .modal-top{padding-block:1px}
 .guest-local-shell{gap:4px 8px}
}
#modal:has(#vm-guest-gallery) {width:min(calc(100% - 24px),900px);max-width:100%}
#vm-guest-gallery .photo-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,clamp(104px,22vw,164px)),1fr));gap:clamp(7px,1.4vw,14px)}
#vm-guest-gallery .photo-grid>.form{min-width:0;align-content:start}
#vm-guest-gallery .photo-grid button{min-height:44px;white-space:normal;overflow-wrap:anywhere;padding-inline:6px}
