.enlarge-page{
  padding-top:12px;
}
.enlarge-editor-heading{
  grid-template-columns:minmax(230px,380px) 1fr;
  margin-bottom:16px;
}
.enlarge-editor-heading h1{
  font-size:clamp(2rem,3.5vw,3.4rem);
  margin:.15rem 0;
}
.enlarge-editor-heading .creative-editor-help{
  max-width:760px;
}

.enlarge-creative-workspace{
  grid-template-columns:minmax(245px,300px) minmax(0,1.35fr) minmax(295px,350px);
  gap:14px;
  align-items:start;
}
.enlarge-stage-panel{min-width:0}
.enlarge-canvas-wrap{
  min-height:640px;
}
.enlarge-stage{
  position:relative;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  background:#fff;
  box-shadow:0 18px 45px rgba(0,0,0,.16);
  transition:width .18s ease,height .18s ease,aspect-ratio .18s ease;
  max-width:100%;
  max-height:74vh;
}
.enlarge-stage.portrait{width:min(100%,560px);aspect-ratio:2/3}
.enlarge-stage.landscape{width:min(100%,840px);aspect-ratio:3/2}
.enlarge-stage.has-frame{
  background:var(--enlarge-frame-color,#242424);
  background-image:var(--enlarge-frame-image,none);
  background-size:100% 100%;
  background-repeat:no-repeat;
  background-position:center;
}
.enlarge-canvas{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  background:#fff;
  overflow:hidden;
}
.enlarge-image-area{
  position:relative;
  min-height:0;
  flex:1;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  touch-action:none;
}
.enlarge-image-area.drag-ready{cursor:grab}
.enlarge-image-area.dragging{cursor:grabbing}
.enlarge-image-area img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  transform-origin:center center;
  user-select:none;
  pointer-events:none;
  will-change:transform,object-position;
}
.enlarge-placeholder{
  display:grid;
  place-items:center;
  gap:4px;
  text-align:center;
  color:#7a8581;
  padding:24px;
}
.enlarge-placeholder strong{font-size:1rem}
.enlarge-placeholder span{font-size:.8rem}
.enlarge-caption{
  flex:none;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  padding:0 5%;
  background:#fff;
  overflow:hidden;
}
.enlarge-caption span{
  display:block;
  width:100%;
  line-height:1.15;
  overflow-wrap:anywhere;
}

.enlarge-quality-badge{
  position:absolute;
  top:10px;
  right:10px;
  z-index:8;
  min-width:34px;
  width:34px;
  height:34px;
  padding:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  box-shadow:0 5px 18px rgba(0,0,0,.16);
}
.enlarge-quality-badge .quality-symbol{margin:0}
.enlarge-quality-badge.hidden{display:none}

.enlarge-media-toolbar{margin-top:12px}
.enlarge-media-toolbar .creative-media-filters{margin-bottom:8px}
.enlarge-media-toolbar .creative-sort-controls{justify-content:flex-start}
.creative-asset.enlarge-selected{
  opacity:1;
  border-color:var(--brand);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 20%,transparent);
}
.creative-asset.enlarge-selected::after{
  content:'✓';
  position:absolute;
  top:5px;
  right:5px;
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--brand);
  color:#fff;
  font-weight:900;
  font-size:.75rem;
}
.creative-asset.enlarge-used:not(.enlarge-selected){opacity:.68}

.enlarge-settings{
  padding:14px;
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 150px);
  position:sticky;
  top:98px;
}
.enlarge-settings .creative-order-head{margin-bottom:12px}
.enlarge-settings .creative-order-head h3{margin:.2rem 0;font-size:1.35rem}
.enlarge-settings .creative-price-wrap strong{white-space:nowrap}
.enlarge-panel-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr));
  margin:0 -4px 12px;
  flex:0 0 auto;
}
.enlarge-panel-tabs button{min-width:0;padding:8px 2px}
.enlarge-panel-tabs small{font-size:.62rem}
.enlarge-panel-tabs button.hidden{display:none}
.enlarge-tab-panels{
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  padding-right:6px;
  margin-right:-6px;
}
.enlarge-tab-panel{display:none;gap:14px;padding-bottom:6px}
.enlarge-tab-panel.active{display:grid}
.enlarge-field{
  display:grid;
  gap:6px;
  font-size:.76rem;
  font-weight:800;
  color:#51605c;
}
.enlarge-field>span,.font-choices>span,.creative-text-color-control>span,.creative-background-control>span{
  font-size:.76rem;
  font-weight:800;
  color:#51605c;
}
.enlarge-field select,.enlarge-field input[type=text]{
  width:100%;
  min-height:42px;
  border:1px solid #d9d4ca;
  border-radius:10px;
  padding:0 10px;
  background:#fff;
}
.enlarge-field small,.enlarge-help{
  color:#74807c;
  font-weight:500;
  line-height:1.45;
  font-size:.72rem;
}
.enlarge-action-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.enlarge-action-row .small-btn{
  width:100%;
  min-height:40px;
  border-radius:12px;
}
.enlarge-action-row .small-btn.filled,
.enlarge-rotate-row .small-btn.filled{
  background:#fff;
  border:1px solid #d9d4ca;
  box-shadow:0 1px 0 rgba(16,24,40,.04);
  color:#334155;
  font-weight:800;
}
.enlarge-action-row .small-btn.filled:hover,
.enlarge-rotate-row .small-btn.filled:hover{
  border-color:#bfb7aa;
  background:#faf8f4;
}
.enlarge-action-row .small-btn.active{
  background:#151a18;
  color:#fff;
  border-color:#151a18;
}
.enlarge-feature-switch{margin:0}
.enlarge-subcontrols{display:grid;gap:14px;padding:12px 0 0}
.enlarge-subcontrols[hidden]{display:none}
.enlarge-orientation-buttons{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.enlarge-orientation-buttons button{
  min-height:42px;
  border:1px solid #d9d4ca;
  border-radius:10px;
  background:#fff;
  font-weight:800;
  color:#46534f;
  cursor:pointer;
}
.enlarge-orientation-buttons button.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.enlarge-alignment{display:grid;grid-template-columns:repeat(3,1fr)}
.enlarge-alignment button{min-width:0}
.enlarge-status{min-height:18px;margin-top:12px;flex:0 0 auto}
.enlarge-settings>.btn{margin-top:8px;flex:0 0 auto}

.enlarge-options{display:grid;gap:14px}
.enlarge-option-group{display:grid;gap:8px}
.enlarge-option-group-title{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.enlarge-option-group-title small{color:#7a8581;font-size:.7rem}
.enlarge-option-list{display:grid;gap:7px}
.enlarge-option-card{
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:8px;
  border:1px solid #ddd7cf;
  border-radius:11px;
  background:#fff;
  cursor:pointer;
}
.enlarge-option-card:has(input:checked){border:2px solid var(--brand);padding:7px}
.enlarge-option-card input{position:absolute;opacity:0}
.enlarge-option-thumb{width:34px;height:34px;border-radius:8px;background-color:#f2f4f7;background-position:center;background-size:contain;background-repeat:no-repeat;border:1px solid #e1ddd5}
.enlarge-option-name{display:grid;gap:2px}
.enlarge-option-name strong{font-size:.78rem}
.enlarge-option-name small{font-size:.68rem;color:#78837f}
.enlarge-option-price{font-size:.7rem;font-weight:800;white-space:nowrap}
.enlarge-options-empty.hidden{display:none}

.enlarge-color-swatch{width:30px;height:30px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #d5d0c8;background:var(--swatch);cursor:pointer}
.enlarge-color-swatch.active{box-shadow:0 0 0 2px var(--brand)}
.font-choices{display:grid;gap:8px}
.font-choices #enlargeCaptionFontChoices{display:flex;gap:10px;flex-wrap:wrap}
.font-choices #enlargeCaptionFontChoices button{
  min-width:52px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0 8px;
  border:1px solid #ddd7cf;
  border-radius:12px;
  background:#fff;
  font-size:1.35rem;
  line-height:1;
  cursor:pointer;
}
.font-choices #enlargeCaptionFontChoices button.active{
  border:2px solid var(--brand);
  padding:0 7px;
}
.font-choices #enlargeCaptionFontChoices button small{display:none}
.range-with-value{display:grid;gap:7px;font-size:.76rem;font-weight:800;color:#51605c}
.range-with-value>span{display:flex;justify-content:space-between;gap:12px}
.range-with-value input[type=range]{width:100%}

.enlarge-switch-row{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  font-weight:700;
  color:#1f2a27;
}
.enlarge-switch-row>input[type=checkbox]{
  position:absolute;
  left:16px;
  top:50%;
  width:44px;
  height:24px;
  margin:0;
  transform:translateY(-50%);
  opacity:0;
  cursor:pointer;
  z-index:2;
}
.enlarge-switch-row .switch-track{
  width:44px;
  height:24px;
  flex:0 0 44px;
  border-radius:999px;
  background:#cbd2cf;
  padding:3px;
  transition:background .18s ease;
}
.enlarge-switch-row .switch-track i{
  display:block;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(24,39,34,.2);
  transition:transform .18s ease;
}
.enlarge-switch-row>input[type=checkbox]:checked~.switch-track{background:var(--brand)}
.enlarge-switch-row>input[type=checkbox]:checked~.switch-track i{transform:translateX(20px)}
.enlarge-switch-row>input[type=checkbox]:focus-visible~.switch-track{box-shadow:0 0 0 3px var(--brand-soft-strong)}
.enlarge-switch-row>span:last-child{flex:1 1 auto}

.enlarge-quality-suggestions{
  margin:0;
  padding-left:18px;
  color:#4f5f5a;
  font-size:.92rem;
}
.enlarge-quality-suggestions.hidden{display:none}

@media (max-width:1200px){
  .enlarge-creative-workspace{grid-template-columns:220px minmax(0,1fr)}
  .enlarge-settings{
    grid-column:1/-1;
    position:static;
    max-height:none;
  }
  .enlarge-canvas-wrap{min-height:520px}
}

@media (max-width:760px){
  .enlarge-page{padding-top:0}
  .enlarge-editor-heading{grid-template-columns:1fr}
  .enlarge-creative-workspace{grid-template-columns:1fr}
  .enlarge-stage-panel{order:1}
  .enlarge-assets{order:2}
  .enlarge-settings{
    order:3;
    grid-column:auto;
    position:static;
    max-height:none;
  }
  .enlarge-canvas-wrap{min-height:390px;padding:10px}
  .enlarge-stage{max-height:62vh}
  .enlarge-panel-tabs{position:sticky;top:0;background:#fff;z-index:3;padding-top:4px}
  .enlarge-tab-panels{overflow:visible;max-height:none}
  .creative-asset-grid{grid-template-columns:repeat(4,1fr);max-height:260px}
}

.enlarge-subcontrols .creative-color-picker-row{padding:3px 3px 3px 2px;margin-left:0}
.enlarge-inner-border-switch{margin-top:14px}
.enlarge-image-area{outline-offset:-1px}

.enlarge-switch-row[hidden]{display:none !important}

.enlarge-mobile-dock,.enlarge-mobile-sheet-head,.enlarge-mobile-backdrop{display:none}
.enlarge-view-switch{display:none}
.enlarge-crop-overview[hidden],.enlarge-crop-mask[hidden],.enlarge-design-preview[hidden]{display:none!important}
.enlarge-design-preview{display:none}
@media(max-width:900px){
 body.enlarge-mobile-sheet-open{overflow:hidden}
 body.enlargement-editor-active .site-footer{display:none!important}
 #enlargeSourceModal,#enlargeLibraryModal,#enlargeQrModal,#enlargeQualityInfoModal{z-index:143}
 .creative-page.enlarge-page:not(.gallery-mode){height:auto;min-height:0;overflow:visible;padding:7px 0 90px}
 .creative-page.enlarge-page .creative-shell{width:calc(100% - 16px);height:auto;min-height:0}
 .creative-page.enlarge-page .creative-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
 .creative-page.enlarge-page .creative-editor-heading-main{min-width:0}
 .creative-page.enlarge-page .creative-editor-heading #enlargeWallVisualizer{flex:none;width:auto;min-height:40px;padding:8px 12px;margin:0;font-size:12px;white-space:nowrap}
 .creative-page.enlarge-page .creative-editor-heading h1{font-size:1.35rem}
 .creative-page.enlarge-page .creative-editor-help{display:none}
 .creative-page.enlarge-page .enlarge-creative-workspace{display:block;height:auto;flex:none}
 .creative-page.enlarge-page .enlarge-stage-panel{display:flex;flex-direction:column;gap:8px;height:auto;min-height:0;max-height:none;padding:8px}
 .enlarge-view-switch{display:flex;flex:none;width:100%;margin:0}
 .enlarge-view-switch button{flex:1;min-height:40px;font-size:13px}
 .creative-page.enlarge-page .enlarge-canvas-wrap{height:var(--enlarge-preview-space,60dvh);min-height:0!important;padding:10px}
 .creative-page.enlarge-page .enlarge-stage{width:min(100%,calc(var(--enlarge-preview-space,60dvh) * var(--enlarge-aspect,.667)));height:auto;max-height:none;min-height:0;flex:none}
 .enlarge-stage-panel.has-crop-overview .enlarge-canvas-wrap>.enlarge-stage{position:absolute;opacity:0;pointer-events:none}
 .enlarge-crop-overview{position:absolute;inset:10px;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0}
 .enlarge-crop-surface{position:relative;overflow:hidden;touch-action:none;cursor:grab;flex:none}
 .enlarge-crop-surface.fit{touch-action:pan-y;cursor:default}
 .enlarge-crop-surface img{position:absolute;pointer-events:none;user-select:none;transform-origin:center}
 .enlarge-crop-mask{position:absolute;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 2000px rgba(219,32,45,.4);pointer-events:none;z-index:2}
 .creative-page.enlarge-page .enlarge-assets,
 .creative-page.enlarge-page .enlarge-settings{position:fixed;inset:auto 0 0;z-index:141;transform:translateY(105%);visibility:hidden;width:100%;height:min(76dvh,680px);max-height:calc(100dvh - 52px);min-height:0;margin:0;padding:12px 14px calc(16px + env(safe-area-inset-bottom));border:1px solid var(--line);border-radius:20px 20px 0 0;background:var(--surface-card,#fff);box-shadow:0 -18px 60px rgba(16,24,20,.22);overflow-y:auto;overscroll-behavior:contain;transition:transform .2s ease;grid-column:auto;box-sizing:border-box}
 .creative-page.enlarge-page .mobile-sheet-open{transform:translateY(0);visibility:visible}
 .enlarge-mobile-sheet-head{display:flex;position:sticky;top:-12px;z-index:8;align-items:center;justify-content:space-between;flex:none;min-height:44px;margin:-12px -14px 8px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--surface-card,#fff)}
 .enlarge-mobile-sheet-head button{width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--surface-muted,#f4f3ef);color:var(--ink);font:inherit;font-size:1.4rem;cursor:pointer}
 .enlarge-mobile-backdrop{position:fixed;z-index:140;inset:0;display:block;background:rgba(16,24,20,.42)}
 .enlarge-mobile-backdrop[hidden]{display:none}
 .enlarge-mobile-dock{position:fixed;z-index:139;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;min-height:58px;padding:5px;border:1px solid var(--line);border-radius:18px;background:var(--surface-card,#fff);box-shadow:0 8px 30px rgba(16,24,20,.18)}
 .enlarge-mobile-dock button{min-width:0;min-height:48px;padding:4px 2px;border:0;border-radius:13px;background:transparent;color:var(--ink);display:grid;place-items:center;align-content:center;gap:3px;font:inherit;cursor:pointer}
 .enlarge-mobile-dock button>span{font-size:1.1rem;line-height:1;font-weight:800}
 .enlarge-mobile-dock button>small{font-size:.6rem;font-weight:800;line-height:1}
 .enlarge-mobile-dock .enlarge-mobile-cart{background:var(--brand);color:#fff}
 .enlarge-mobile-dock button.hidden{display:none}
 .enlarge-mobile-cart:disabled{opacity:.55;cursor:default}
 .creative-page.enlarge-page .enlarge-panel-tabs{display:none}
 .creative-page.enlarge-page .enlarge-panel-tabs button{display:grid;place-items:center;gap:3px;min-height:48px;border:0;border-radius:10px;background:transparent;color:var(--muted);font:inherit;cursor:pointer}
 .creative-page.enlarge-page .enlarge-panel-tabs button.active{background:var(--surface-card,#fff);color:var(--brand);box-shadow:0 2px 6px rgba(0,0,0,.06)}
 .creative-page.enlarge-page .enlarge-panel-tabs button.hidden{display:none}
 .creative-page.enlarge-page .enlarge-tab-panels{flex:none;overflow:visible;max-height:none}
 .creative-page.enlarge-page .enlarge-assets{overflow:hidden}
 .creative-page.enlarge-page .enlarge-assets>.creative-asset-grid{order:2;flex:1;min-height:0;max-height:none;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;overflow:auto;margin-top:12px}
 .creative-page.enlarge-page .enlarge-media-toolbar{order:3;flex:none;margin-top:8px;padding-top:10px;border-top:1px solid var(--line);background:var(--surface-card,#fff)}
 .creative-page.enlarge-page .creative-sort-controls{flex-wrap:wrap}
 .enlarge-settings .creative-price-wrap{display:flex;align-items:center;gap:8px}
 .enlarge-settings:is([data-mobile-action=image],[data-mobile-action=design],[data-mobile-action=options])>.creative-order-head,
 .enlarge-settings:is([data-mobile-action=image],[data-mobile-action=design],[data-mobile-action=options])>[data-enlarge-product-description]{display:none}
 .enlarge-settings .compact-mobile-charges{margin:0;padding:0}
 .enlarge-settings .compact-mobile-charges>div{display:none}
 .enlarge-settings .mobile-product-charge-info{display:block}
 .enlarge-design-preview{display:flex;position:sticky;top:48px;z-index:7;flex:none;height:152px;align-items:center;justify-content:center;background:var(--surface-muted,#f4f3ef);border-radius:12px;margin-bottom:12px;padding:8px;overflow:hidden}
 .enlarge-design-preview .enlarge-stage{position:relative;opacity:1;transition:none;max-height:none}
 .enlarge-settings[data-mobile-action=design] .enlarge-tab-panel[data-enlarge-panel-item=text]{border-top:1px solid var(--line);padding-top:16px;margin-top:12px}
 .enlarge-placeholder{cursor:pointer}
}
