.qr3d-workbench{
  width:min(1480px,calc(100vw - 32px));
  margin:-10px calc(50% - min(740px,calc(50vw - 16px))) 0;
  display:grid;
  gap:16px;
}

.qr3d-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  padding:4px 0 0;
}

.qr3d-head h1{
  margin:0;
  font-size:clamp(2rem,3vw,3rem);
  line-height:1;
}

.qr3d-eyebrow{
  width:auto;
  margin-bottom:10px;
  background:#e8f6f3;
  color:#196963;
}

.qr3d-actions,
.qr3d-export-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.qr3d-studio{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(340px,400px);
  gap:18px;
  align-items:stretch;
  min-height:720px;
}

.qr3d-stage{
  position:relative;
  min-height:720px;
  border:1px solid #cfdbe8;
  border-radius:8px;
  overflow:hidden;
  background:
    linear-gradient(90deg,rgba(16,42,76,.045) 1px,transparent 1px),
    linear-gradient(180deg,rgba(16,42,76,.045) 1px,transparent 1px),
    linear-gradient(140deg,#f8fbff 0%,#edf4f3 48%,#f8f5ec 100%);
  background-size:38px 38px,38px 38px,100% 100%;
  box-shadow:0 24px 70px rgba(16,42,76,.11);
}

.qr3d-stage canvas{
  width:100%;
  height:100%;
  display:block;
  touch-action:none;
}

.qr3d-embed{
  position:relative;
  width:100%;
  height:360px;
  min-height:0;
  border:1px solid #d4e0ee;
  border-radius:8px;
  overflow:hidden;
  background:var(--qr3d-space-background,#f4f7fb);
  background-size:34px 34px,34px 34px,100% 100%;
}

.qr3d-embed canvas{
  width:100%;
  height:100%;
  display:block;
  touch-action:none;
}

.public-qr3d-embed{
  height:520px;
}

.public-builder-preview{
  position:sticky;
  top:92px;
  align-self:start;
  z-index:4;
}

.public-builder-preview.is-3d-active{
  box-shadow:0 20px 48px rgba(16,42,76,.12);
}

.public-builder-preview.is-3d-active .public-qr3d-embed{
  height:clamp(380px,54vh,560px);
}

@media (min-width: 1181px){
  .home-hero-fullbleed.home-3d-active{
    overflow:visible;
  }

  .home-hero-fullbleed.home-3d-active .public-builder-card{
    position:sticky;
    top:88px;
    height:calc(100vh - 108px);
    overflow:hidden;
  }

  .home-hero-fullbleed.home-3d-active .public-builder-form{
    min-height:0;
    height:100%;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-right:4px;
  }

  .home-hero-fullbleed.home-3d-active .public-builder-preview{
    position:static;
    top:auto;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    overflow:hidden;
    z-index:4;
    grid-template-rows:auto auto minmax(0,1fr);
  }

  .home-hero-fullbleed.home-3d-active .public-builder-shell{
    grid-template-columns:minmax(300px,420px) minmax(560px,1fr);
    height:100%;
    min-height:0;
    align-items:start;
  }

  .home-hero-fullbleed.home-3d-active .public-builder-preview.is-3d-active .public-qr3d-embed{
    height:100%;
    min-height:360px;
  }
}

.qr3d-builder-embed{
  height:330px;
}

.qr3d-view-embed{
  height:420px;
  margin-top:10px;
}

.qr-view-3d-block{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.qr-view-3d-block h3{
  margin:0;
}

.qr3d-embed-export{
  position:absolute;
  top:10px;
  right:10px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid #cad8e8;
  border-radius:8px;
  background:rgba(255,255,255,.88);
  color:#102a4c;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(16,42,76,.10);
}

.qr3d-embed-export:hover{
  border-color:#54a39a;
  color:#17645d;
}

.qr3d-export-video{
  top:62px;
}

.qr3d-export-gif{
  top:114px;
}

.qr3d-2d-thumb{
  position:absolute;
  top:14px;
  left:14px;
  z-index:3;
  width:118px;
  aspect-ratio:1/1;
  padding:8px;
  border:1px solid #d4e0ee;
  border-radius:6px;
  background:#ffffff;
  box-shadow:0 14px 34px rgba(16,42,76,.18);
  pointer-events:none;
}

.qr3d-2d-thumb canvas{
  width:100%;
  height:100%;
  display:block;
}

.qr3d-2d-hidden{
  display:none!important;
}

.qr3d-stage-toolbar{
  position:absolute;
  top:14px;
  left:14px;
  display:flex;
  gap:8px;
  padding:8px;
  border:1px solid rgba(186,202,221,.72);
  border-radius:8px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(14px);
  box-shadow:0 14px 34px rgba(16,42,76,.10);
}

.qr3d-icon-btn{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid #cbd8e8;
  border-radius:8px;
  background:#fff;
  color:#102a4c;
  cursor:pointer;
}

.qr3d-icon-btn:hover,
.qr3d-icon-btn.active{
  border-color:#54a39a;
  background:#e8f6f3;
  color:#17645d;
}

.qr3d-panel{
  display:grid;
  grid-template-rows:auto 1fr;
  min-width:0;
  border:1px solid #cfdbe8;
  border-radius:8px;
  background:#fff;
  box-shadow:0 24px 70px rgba(16,42,76,.10);
  overflow:hidden;
}

.qr3d-tabs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-bottom:1px solid #d9e3ef;
  background:#f5f8fb;
}

.qr3d-tab{
  min-height:48px;
  border:0;
  border-right:1px solid #d9e3ef;
  background:transparent;
  color:#52677f;
  font-weight:900;
  cursor:pointer;
}

.qr3d-tab:last-child{
  border-right:0;
}

.qr3d-tab.active{
  background:#fff;
  color:#196963;
  box-shadow:inset 0 -3px 0 #54a39a;
}

.qr3d-panel-section{
  display:none;
  gap:16px;
  align-content:start;
  padding:18px;
  overflow:auto;
}

.qr3d-panel-section.active{
  display:grid;
}

.qr3d-control-grid{
  display:grid;
  gap:12px;
}

.qr3d-control-grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.qr3d-control-grid.three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.qr3d-panel input[type="color"]{
  height:48px;
  padding:5px;
  border-radius:8px;
}

.qr3d-panel input,
.qr3d-panel select,
.qr3d-panel textarea{
  border-radius:8px;
}

.stacked-checks{
  display:grid;
  gap:8px;
  align-content:center;
}

.qr3d-range{
  position:relative;
  padding-top:4px;
}

.qr3d-range-value{
  position:absolute;
  top:0;
  right:0;
  padding:4px 8px;
  border-radius:999px;
  background:#eef7f5;
  color:#196963;
  font-size:.78rem;
  line-height:1;
}

.qr3d-range input[type="range"]{
  padding:0;
  height:34px;
  accent-color:#2f9188;
}

.qr3d-toggle{
  display:flex;
  grid-template-columns:auto 1fr;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid #d8e4f0;
  border-radius:8px;
  background:#f8fbff;
}

.qr3d-toggle input[type="checkbox"]{
  width:22px;
  min-width:22px;
  margin:0;
}

.qr3d-toggle span{
  font-weight:800;
}

.qr3d-export-row{
  justify-content:stretch;
}

.qr3d-export-row .btn{
  flex:1 1 150px;
}

.qr3d-logo-box{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid #d8e4f0;
  border-radius:8px;
  background:#f8fbff;
}

.qr3d-logo-details{
  display:block;
}

.qr3d-logo-details summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  font-weight:900;
}

.qr3d-logo-details summary::-webkit-details-marker{
  display:none;
}

.qr3d-logo-details summary i{
  transition:transform .16s ease;
}

.qr3d-logo-details[open] summary{
  margin-bottom:12px;
}

.qr3d-logo-details[open] summary i{
  transform:rotate(180deg);
}

.qr3d-logo-box h2{
  margin:0;
  font-size:1rem;
}

.qr3d-logo-library{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.qr3d-logo-item{
  display:grid;
  place-items:center;
  aspect-ratio:1 / 1;
  border:1px solid #ccd9e8;
  border-radius:8px;
  background:#fff;
  padding:6px;
  cursor:pointer;
}

.qr3d-logo-item.active,
.qr3d-logo-item:hover{
  border-color:#54a39a;
  box-shadow:0 0 0 3px rgba(84,163,154,.16);
}

.qr3d-logo-item img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.qr3d-hidden-host{
  position:absolute;
  left:-9999px;
  top:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

@media (max-width: 1180px){
  .public-builder-preview{
    position:static;
  }

  .public-builder-preview.is-3d-active .public-qr3d-embed{
    height:420px;
  }

  .qr3d-workbench{
    width:min(100% - 24px,1280px);
    margin-inline:auto;
  }

  .qr3d-studio{
    grid-template-columns:1fr;
    min-height:0;
  }

  .qr3d-stage{
    min-height:620px;
  }
}

@media (max-width: 720px){
  .qr3d-workbench{
    width:min(100% - 18px,1280px);
  }

  .qr3d-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .qr3d-actions{
    width:100%;
    justify-content:stretch;
  }

  .qr3d-actions .btn{
    flex:1 1 0;
    min-width:0;
  }

  .qr3d-studio{
    gap:12px;
  }

  .qr3d-stage{
    min-height:520px;
  }

  .qr3d-panel{
    width:100%;
  }

  .qr3d-panel-section{
    padding:14px;
  }

  .qr3d-control-grid.two,
  .qr3d-control-grid.three{
    grid-template-columns:1fr;
  }
}
