/* PentaAds v4.1 responsive hardening.
   Additive only: preserves the v4 motion system while preventing narrow-screen overflow. */
.v4-command-grid>*,.v4-live-head>*,.v4-portal>*,.v4-scenario-grid>*,.split>*{min-width:0}
.v4-route-card,.v4-panel,.v4-scenario-panel,.v4-ad-slot,.v4-article,.v4-console{overflow-wrap:anywhere;word-break:normal}
.v4-code,.codeblock,.terminal,.table-wrap{max-width:100%;overflow:auto}
.v4-code pre,.codeblock pre,.terminal pre{max-width:100%;overflow:auto;white-space:pre}
img,svg,video,canvas,iframe{max-width:100%}
.v4-stage-controls,.v4-action-row,.hero__actions,.callout__actions{max-width:100%}

@media(max-width:760px){
  .v4-route-hero{padding:54px 0 34px}
  .v4-route-hero h1,.v4-live-head h2{font-size:clamp(38px,11vw,48px);line-height:.95;overflow-wrap:anywhere}
  .v4-live-head{gap:22px}
  .v4-command-grid{gap:14px}
  .v4-stage-top{align-items:flex-start}
  .v4-ad-slot p{font-size:12px}
  .v4-panel,.v4-scenario-panel{max-width:100%}
  .v4-console{max-width:100%;overflow:auto}
}

@media(max-width:480px){
  .shell{width:min(100% - 22px,var(--shell))}
  .v4-route-hero{padding:42px 0 28px}
  .v4-route-hero h1,.v4-live-head h2{font-size:clamp(34px,10.8vw,42px);letter-spacing:-.055em}
  .v4-live-shell{padding-bottom:62px}
  .v4-dual-stage{min-height:0;padding:14px;border-radius:20px}
  .v4-dual-canvas{min-height:0;margin-top:16px}
  .v4-ad-slot--wide,.v4-ad-slot--rect{min-height:225px;padding:18px;border-radius:20px}
  .v4-ad-slot h3,.v4-ad-slot--rect h3{font-size:27px}
  .v4-stage-top{flex-direction:column;gap:10px}
  .v4-stage-controls{width:100%;display:grid;grid-template-columns:1fr}
  .v4-stage-controls>*{width:100%;min-width:0}
  .v4-telemetry,.v4-api-metrics,.v4-flow{grid-template-columns:1fr}
  .v4-scenario-panel,.v4-panel,.v4-route-card{padding:18px;border-radius:20px}
  .v4-scenario-button{min-width:185px}
  .v4-action-row{display:grid;grid-template-columns:1fr;width:100%}
  .v4-action-row>*{width:100%;min-width:0}
  .v4-format-pills{gap:6px}
  .v4-format-pills span{max-width:100%;overflow-wrap:anywhere}
  .v4-api-strip{padding:15px;border-radius:18px}
  .v4-inventory-chip{min-width:235px}
  .footer__grid{grid-template-columns:1fr}
  .footer__grid>div:first-child,.footer__grid>div:last-child{grid-column:auto}
  .footer__bottom{display:grid;gap:9px}
}

@media(max-width:360px){
  .v4-route-hero h1,.v4-live-head h2,.hero h1,.page-hero h1{font-size:34px}
  .brand{font-size:16px}
  .brand__mark{width:35px;height:35px}
  .v4-ad-slot h3,.v4-ad-slot--rect h3{font-size:24px}
  .button{padding-inline:14px}
}

@media(prefers-reduced-motion:reduce){
  .v4-river-track{transform:none!important}
}
