:root{
  --zf-stage4-shell-max: 720px;
}

/* ===== Stage 4: core flow cleanup + stage2/stage3 corrective pass ===== */

/* Home hero: quieter trust/micro surfaces and lighter premium CTA */
.micro--hero,
.heroTrustItem{
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  padding-inline:0 !important;
}

.micro--hero{
  min-height:auto;
  margin-top:10px;
  color:rgba(246,241,234,.72);
}

.heroTrust{
  margin-top:8px;
}
.heroTrustItem{
  min-height:auto;
  width:auto;
  font-size:12.5px;
  color:rgba(246,241,234,.66);
}

.heroExamplesWrap--modal{
  margin-top:10px;
}
.heroExamplesModalBtn{
  width:auto;
  min-width:170px;
  max-width:220px;
  min-height:44px;
  padding:0 18px;
  margin-inline:auto;
  border-radius:16px;
}

/* Chat shell corrective pass */
.overlay,
.overlay.fullscreen{
  padding-top:max(10px, env(safe-area-inset-top));
}

.chatPanel{
  overflow:hidden;
}

.chatTop{
  padding-top:max(10px, env(safe-area-inset-top));
}

.chatBody{
  padding-top:12px;
  padding-bottom:calc(164px + env(safe-area-inset-bottom, 0px));
}

.chatComposer{
  gap:0;
  padding-top:8px;
}

.chatQuick{
  margin-bottom:6px;
}

.composerLegal{
  max-width:none;
  margin:4px auto 0;
  padding:4px 4px 0;
  font-size:11.5px;
  line-height:1.2;
  text-align:center;
  color:rgba(244,238,229,.5);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.composerLegal .inlineLink{
  white-space:nowrap;
}

/* Footer / floating surfaces discipline */
.edgeDock{
  bottom:max(82px, calc(env(safe-area-inset-bottom) + 70px));
}
.edgeDrawer{
  bottom:max(12px, calc(env(safe-area-inset-bottom) + 8px));
}

@media (max-width: 820px){
  .center{
    transform:translateY(-2.2svh);
  }
  .chatPanel{
    max-height:calc(100dvh - 6px);
    border-radius:26px;
  }
  .chatTop{
    min-height:58px;
    padding-left:12px;
    padding-right:12px;
  }
  .chatBody{
    padding-left:12px;
    padding-right:12px;
    padding-bottom:calc(158px + env(safe-area-inset-bottom, 0px));
  }
  .chatComposer{
    padding-left:12px;
    padding-right:12px;
    padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .composerPill{
    min-height:58px;
  }
  .composerLegal{
    font-size:10.8px;
    margin-top:3px;
  }
  .heroExamplesModalBtn{
    max-width:200px;
    min-height:42px;
  }
}

@media (max-width: 560px){
  .center{
    width:calc(100vw - 20px);
    transform:translateY(-1.2svh);
  }
  .micro--hero{
    font-size:11.5px;
  }
  .heroTrustItem{
    width:auto;
    padding:0;
    font-size:11.5px;
  }
  .heroExamplesWrap--modal{
    margin-top:9px;
  }
  .heroExamplesModalBtn{
    min-width:160px;
    max-width:190px;
    padding-inline:16px;
  }
  .chatTop{
    padding-top:max(8px, env(safe-area-inset-top));
  }
  .chatHeaderRight{
    gap:4px;
  }
  .chatHeaderRight .actionIcon,
  .topBtn{
    width:36px;
    min-width:36px;
    height:36px;
  }
  .composerLegal{
    letter-spacing:-.01em;
  }
}

@media (max-width: 390px){
  .micro--hero,
  .heroTrustItem{
    font-size:11px;
  }
  .composerLegal{
    font-size:10.4px;
  }
}
