#models.section {
  padding-bottom: 58px;
}

#models + .section {
  padding-top: 58px;
}

.demo-models .pager[data-compact="true"] {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.demo-models .pager[data-compact="true"]::-webkit-scrollbar {
  display: none;
}

.demo-models .pager button[hidden] {
  display: none;
}

.demo-models .pager .pager-ellipsis {
  display: inline-flex;
  min-width: 24px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  color: #70899a;
  font-size: 18px;
  line-height: 1;
}

/* Keep the creator directory inside the viewport at 100% browser zoom. */
.demo-models .layout > section,
.demo-models .grid,
.demo-models .card,
.demo-models .details,
.demo-models .tags,
.demo-models .tag {
  min-width: 0;
}

.demo-models .layout > section,
.demo-models .grid,
.demo-models .card {
  max-width: 100%;
}

.demo-models .grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-models .details,
.demo-models .tags,
.demo-models .tag {
  overflow-wrap: anywhere;
}

.demo-models .pager {
  max-width: 100%;
  flex-wrap: wrap;
}

@media (min-width: 1200px) {
  .demo-models .wrap {
    max-width: 1440px;
  }
}

@media (max-width: 1199px) {
  .demo-models .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .demo-models .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .demo-models .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .demo-home .section.wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .demo-home #models .heading,
  .demo-home #models .heading > div {
    width: 100%;
    min-width: 0;
  }

  .demo-home #models .heading h2 {
    max-width: 100%;
    font-size: 30px;
    line-height: 1.22;
    letter-spacing: -0.5px;
    overflow-wrap: anywhere;
  }

  .demo-home .nav {
    height: 68px;
    gap: 10px;
    padding-inline: 16px;
  }

  .demo-home .nav .brand {
    min-width: 0;
    gap: 6px;
    font-size: 20px;
    white-space: nowrap;
  }

  .demo-home .nav .brand img {
    width: 34px;
    height: 34px;
    flex: none;
  }

  .demo-home #headerConsultLabel {
    min-height: 42px;
    flex: none;
    margin-left: auto;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .demo-models,
  .demo-models main,
  .demo-models .layout,
  .demo-models .layout > *,
  .demo-models .results-bar,
  .demo-models .grid,
  .demo-models .card {
    min-width: 0;
    max-width: 100%;
  }

  .demo-models .layout > section,
  .demo-models .grid,
  .demo-models .card {
    width: 100%;
  }

  .demo-models .details,
  .demo-models .tags,
  .demo-models .tag {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .demo-models .pager {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .demo-models .pager button {
    min-width: 44px;
    height: 44px;
  }

  .demo-models .photo {
    height: min(300px, 76vw);
  }

  .demo-home .hero {
    background-position: 58% center;
  }

  .demo-home .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      rgba(247, 252, 255, 0.97) 0%,
      rgba(234, 247, 255, 0.88) 48%,
      rgba(234, 247, 255, 0.24) 100%
    );
  }

  .demo-home .hero::after {
    background-position: 58% center;
  }

  .demo-home .hero .wrap {
    min-height: 440px;
    padding-top: 38px;
    padding-bottom: 36px;
  }

  .demo-home .hero h1 {
    max-width: 292px;
    margin-top: 11px;
    margin-bottom: 13px;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -1.2px;
  }

  .demo-home .hero p {
    max-width: 310px;
    margin-block: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #47677c;
  }

  .demo-home .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .demo-home .hero-actions .button {
    padding: 11px 17px;
    font-size: 13px;
  }

  .demo-home .wecom-float,
  .demo-models .wecom-float {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }

  #models.section {
    padding-top: 46px;
    padding-bottom: 42px;
  }

  #models + .section {
    padding-top: 42px;
  }
}

@media (max-width: 360px) {
  .demo-home .nav .brand {
    font-size: 18px;
  }

  .demo-home #headerConsultLabel {
    padding-inline: 12px;
    font-size: 12px;
  }
}

/* 2026-09-16: compact two-column model directory for phones. */
@media (max-width: 620px) {
  #directory #grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 10px !important; }
  #directory #grid .card { min-width: 0; overflow: hidden; border-radius: 15px; box-shadow: 0 7px 20px rgba(25, 74, 101, 0.08); }
  #directory #grid .photo { width: 100%; height: auto !important; aspect-ratio: 4 / 3; background-position: center top; }
  #directory #grid .play-dot { width: 38px; height: 38px; font-size: 14px; }
  #directory #grid .details { width: auto; height: auto !important; min-height: 143px; padding: 11px 10px 12px !important; }
  #directory #grid .details h2 { margin: 0 0 7px; overflow: hidden; font-size: 17px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  #directory #grid .creator-badge { min-width: 0; gap: 5px; margin-bottom: 8px; }
  #directory #grid .creator-badge img { width: 17px; height: 17px; flex: 0 0 17px; }
  #directory #grid .creator-badge span { overflow: hidden; font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  #directory #grid .tags { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; }
  #directory #grid .tag { max-width: 100%; padding: 4px 6px; overflow: hidden; font-size: 10px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  #directory #grid .tag:nth-child(3) { display: block; width: 100%; }
  #directory #grid .tag:nth-child(n + 4) { display: none; }
}

/* Full model tag disclosure for abbreviated mobile summaries. */
#directory #grid .card .tags .tag:nth-child(3)[role="button"]{cursor:pointer}
#directory #grid .card .tags .tag:nth-child(3)[role="button"]:focus-visible{outline:2px solid #079bd8;outline-offset:2px}
.ws-model-tag-dialog{width:min(430px,calc(100vw - 28px));padding:0;border:0;border-radius:20px;background:#fff;color:#0d3652;box-shadow:0 24px 80px rgba(11,49,72,.3)}
.ws-model-tag-dialog::backdrop{background:rgba(12,38,56,.5);backdrop-filter:blur(4px)}
.ws-model-tag-dialog article{position:relative;padding:27px}.ws-model-tag-dialog button{position:absolute;right:13px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:#edf7fc;color:#315d75;font-size:26px;cursor:pointer}.ws-model-tag-dialog small{color:#078fc9;font-weight:800}.ws-model-tag-dialog h2{margin:7px 44px 18px 0;font-size:25px}.ws-model-tag-dialog article>div{display:flex;flex-wrap:wrap;gap:9px}.ws-model-tag-dialog article>div span{padding:8px 11px;border-radius:999px;background:#edf7fc;color:#315d75;font-size:13px}
@media(max-width:620px){.ws-model-tag-dialog article{padding:23px 20px}.ws-model-tag-dialog h2{font-size:22px}}
