/* Standalone Visualizer — viewport-safe shell.
   Keep the Sales Hub visualizer itself intact; only replace the outer app chrome/layout. */
html,body{
  width:100%;
  height:100%;
  min-height:0;
  margin:0;
  overflow:hidden!important;
  background:#080808;
}
body{position:fixed;inset:0;}

/* Remove Sales Hub chrome. */
.sidebar,.workspace-header,.design-return-bar{display:none!important;}

/* Make the visualizer the viewport. */
.suite-shell{
  display:block!important;
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
}
.workspace{
  display:block!important;
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}
.view-container{
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:14px 18px 16px!important;
  overflow:hidden!important;
}

/* The design app gets exactly the available viewport height. */
.design-app{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  align-content:stretch!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-width:1600px!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
}
.design-topbar{
  min-height:0!important;
  padding:0 2px 12px!important;
  flex:0 0 auto;
}

/* Critical fix: do not retain the Sales Hub's 620px minimum / viewport clamp.
   In standalone mode this panel simply occupies the remaining screen. */
.design-workspace{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  box-sizing:border-box!important;
}
.design-canvas-panel,.design-controls,.design-canvas,.control-scroll{
  min-height:0!important;
}
.control-scroll{overflow:auto!important;}
.design-canvas{overflow:hidden!important;}

/* Avoid source-photo minimums forcing the whole page taller than the viewport. */
.design-image-stage,.compare-stage{
  min-height:0!important;
}

@media(max-width:900px){
  .view-container{padding:10px!important;}
  .design-topbar{padding-bottom:9px!important;}
}

/* On short laptop/browser viewports, compact the heading so the canvas still has room. */
@media(max-height:720px) and (min-width:801px){
  .view-container{padding:8px 12px 10px!important;}
  .design-topbar{padding-bottom:7px!important;}
  .design-topbar h2{font-size:clamp(1.65rem,2.6vw,2.45rem)!important;}
  .design-topbar p:not(.eyebrow){margin-top:3px!important;}
}

/* Mobile keeps normal document scrolling because the two-column visualizer stacks. */
@media(max-width:800px){
  html,body{height:auto!important;min-height:100dvh!important;overflow:auto!important;position:static!important;}
  body{position:static!important;}
  .suite-shell,.workspace,.view-container{
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  .view-container{padding:12px!important;}
  .design-app{height:auto!important;min-height:0!important;overflow:visible!important;}
  .design-workspace{height:auto!important;min-height:0!important;}
}

/* v5 — MOBILE SCROLL FIX
   On phones the visualizer must be one normal document flow. Do not let the
   desktop viewport shell or the Sales Hub controls panel clip the lower controls. */
@media (max-width:760px){
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch;
  }
  body{
    position:static!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch;
  }
  .suite-shell,
  .workspace,
  .view-container,
  .design-app,
  .design-workspace,
  .design-canvas-panel,
  .design-controls,
  .control-scroll{
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .suite-shell,
  .workspace,
  .view-container{
    min-height:100dvh!important;
  }
  .design-workspace{
    display:flex!important;
    flex-direction:column!important;
  }
  .design-controls{
    display:block!important;
    border-left:0!important;
    border-top:1px solid var(--line)!important;
  }
  .control-scroll{
    display:block!important;
    padding:18px!important;
  }
  .generate-dock{
    position:static!important;
    bottom:auto!important;
  }
  .design-canvas-panel{
    min-height:520px!important;
  }
  .design-canvas{
    min-height:440px!important;
  }
}

/* Home-show lead capture */
.lead-capture-modal{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.76);backdrop-filter:blur(10px);display:grid;place-items:center;padding:22px}.lead-capture-card{width:min(680px,100%);max-height:92dvh;overflow:auto;background:#151515;border:1px solid rgba(197,164,91,.5);border-radius:18px;box-shadow:0 28px 80px rgba(0,0,0,.55);padding:28px;color:#fff}.lead-capture-card h2{font-family:Oswald,sans-serif;font-size:30px;margin:3px 0 8px}.lead-capture-card>p{color:#bbb;margin:0 0 22px}.lead-capture-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.lead-capture-grid label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;letter-spacing:.04em;color:#ddd}.lead-capture-grid label.full{grid-column:1/-1}.lead-capture-grid input{width:100%;box-sizing:border-box;background:#0c0c0c;border:1px solid #3a3a3a;border-radius:10px;padding:13px 14px;color:#fff;font:inherit;font-size:16px}.lead-capture-grid input:focus{outline:none;border-color:#c5a45b;box-shadow:0 0 0 3px rgba(197,164,91,.12)}.lead-capture-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.lead-capture-actions button{padding:12px 18px;border-radius:10px;font-weight:800}.lead-capture-actions .primary{background:#c5a45b;color:#111;border:0}.lead-capture-actions .secondary{background:transparent;color:#ddd;border:1px solid #444}.lead-address-wrap{position:relative}.lead-address-suggestions{position:absolute;left:0;right:0;top:100%;z-index:10001;background:#fff;color:#111;border-radius:0 0 10px 10px;box-shadow:0 14px 30px rgba(0,0,0,.3);overflow:hidden}.lead-address-suggestions:empty{display:none}.lead-address-suggestions button{display:block;width:100%;text-align:left;padding:11px 13px;border:0;border-bottom:1px solid #eee;background:#fff;color:#111;font:inherit}.lead-address-suggestions button:hover,.lead-address-suggestions button:focus{background:#f4f1e9}.lead-capture-error{color:#ffb3a7;font-size:13px;margin-top:12px;min-height:18px}@media(max-width:600px){.lead-capture-card{padding:20px}.lead-capture-grid{grid-template-columns:1fr}.lead-capture-grid label.full{grid-column:auto}}
/* Home show generation-time lead reveal */
.generation-lead-modal{background:rgba(0,0,0,.28);backdrop-filter:blur(3px);align-items:center;justify-items:center;padding:clamp(46px,7vh,90px) clamp(22px,8vw,120px)}
.generation-lead-card{width:min(720px,78vw);background:rgba(18,18,18,.94);backdrop-filter:blur(18px);border:1px solid rgba(197,164,91,.72);box-shadow:0 32px 100px rgba(0,0,0,.72);padding:30px 34px}
.generation-lead-modal.design-ready{background:rgba(0,0,0,.12);backdrop-filter:blur(1px)}
.generation-lead-modal.design-ready .generation-lead-card{background:rgba(18,18,18,.91);box-shadow:0 24px 90px rgba(0,0,0,.6),0 0 0 1px rgba(197,164,91,.15)}
.generation-lead-card .lead-capture-actions{justify-content:stretch}.generation-lead-card .lead-capture-actions .primary{width:100%;font-size:16px;padding:14px 18px}.lead-capture-tease{margin:13px 0 0!important;text-align:center;color:#8f8f8f!important;font-size:12px}
@media(max-width:700px){.generation-lead-modal{padding:70px 18px 28px}.generation-lead-card{width:100%;max-height:82dvh}.generation-lead-card .lead-capture-grid{grid-template-columns:1fr 1fr}}

/* v3: hidden must win over modal display so lead capture only opens on Generate */
.lead-capture-modal[hidden]{display:none!important}
