.app-demo {
  --demo-top: calc(var(--public-nav-bottom, 80px) + 10px);
  --demo-gap: clamp(8px, 1.8svh, 18px);
  --demo-height: calc(100svh - var(--demo-top) - var(--module-size) * 1.45 - var(--demo-gap) * 2 - 2px);
  position: relative;
  /* Match the fixed navigation shell; viewport height only limits the height. */
  width: min(1204px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: 0 clamp(32px, 5vw, 64px);
  text-align: center;
}
.app-demo h2 {
  margin: 0 0 var(--demo-gap);
  scroll-margin-top: var(--demo-top);
}
.app-demo iframe {
  display: block;
  margin-inline: auto;
  border: 0;
  width: 100%;
  height: min(650px, var(--demo-height));
  border-radius: 18px;
  background: #0d0e12;
}
@media (max-width: 700px) {
  .app-demo { width: calc(100% - 16px); }
  .app-demo iframe { height: min(530px, var(--demo-height)); }
}
