.prompt-lab-page,
.prompt-category-page {
  background: #f7f9fc;
  color: #182338;
}

.prompt-lab-page .sa-shell,
.prompt-category-page .sa-shell {
  width: min(1200px, calc(100% - 48px));
}

.prompt-lab-hero {
  padding: 34px 0 22px;
  background: #f7f9fc;
  border-bottom: 1px solid #e6ebf2;
}

.prompt-lab-eyebrow {
  margin: 0 0 8px;
  color: #6d4ee5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.prompt-lab-hero h1,
.prompt-category-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #152036;
  font-size: 34px;
  line-height: 1.28;
  letter-spacing: 0;
}

.prompt-lab-hero > .sa-shell > p:last-child,
.prompt-category-hero > .sa-shell > p:last-child {
  max-width: 820px;
  margin: 12px 0 0;
  color: #667189;
  font-size: 15px;
  line-height: 1.75;
}

.prompt-lab-workbench,
.prompt-category-results {
  padding: 22px 0 48px;
}

.prompt-lab-search {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding-left: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce2ec;
  border-radius: 6px;
  box-shadow: 0 3px 14px rgba(31, 42, 67, 0.04);
}

.prompt-lab-search:focus-within {
  border-color: #7656eb;
  box-shadow: 0 0 0 3px rgba(118, 86, 235, 0.12);
}

.prompt-lab-search > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #7b8497;
}

.prompt-lab-search input {
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: #202b40;
  background: transparent;
  font: inherit;
  font-size: 14px;
}

.prompt-lab-search button {
  align-self: stretch;
  width: 92px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #7049e8;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-lab-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 12px 0 22px;
  color: #747e91;
  font-size: 12px;
}

.prompt-lab-popular strong {
  color: #3c465a;
}

.prompt-lab-popular button {
  padding: 0;
  border: 0;
  color: #606b80;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.prompt-lab-popular button:hover {
  color: #6745d4;
}

.prompt-lab-browser {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.prompt-lab-sidebar {
  position: sticky;
  top: 82px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
}

.prompt-category-links {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.prompt-category-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  color: #455066;
  border-left: 3px solid transparent;
  font-size: 13px;
  text-decoration: none;
}

.prompt-category-links a:hover,
.prompt-category-links a[aria-current="page"] {
  color: #6845dc;
  background: #f3f0ff;
  border-left-color: #7049e8;
}

.prompt-category-links small {
  color: #8b94a7;
  font-size: 11px;
}

.prompt-lab-gallery {
  min-width: 0;
  padding: 0;
  border: 0;
}

.prompt-download-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  min-height: 58px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
  align-items: center;
}

.prompt-download-toolbar p {
  margin: 0;
}

.prompt-download-toolbar p > strong,
.prompt-download-toolbar p > small {
  display: block;
}

.prompt-download-toolbar p > strong {
  color: #253147;
  font-size: 13px;
}

.prompt-download-toolbar p > small {
  margin-top: 4px;
  color: #788297;
  font-size: 11px;
}

.prompt-download-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-download-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #d7dce7;
  border-radius: 5px;
  color: #535e73;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.prompt-download-toolbar button[data-prompt-download] {
  color: #fff;
  background: #7049e8;
  border-color: #7049e8;
  font-weight: 700;
}

.prompt-download-toolbar button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.prompt-download-toolbar button svg {
  width: 15px;
  height: 15px;
  margin-right: 6px;
}

.prompt-download-toolbar progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  accent-color: #7049e8;
}

.prompt-download-status {
  grid-column: 1 / -1;
  min-height: 0;
  color: #5f697d;
  font-size: 11px;
}

.prompt-download-status:empty {
  display: none;
}

.prompt-lab-status {
  min-height: 18px;
  margin: 0 0 10px;
  color: #747e91;
  font-size: 12px;
}

.prompt-lab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  columns: auto;
}

.prompt-lab-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(31, 42, 67, 0.04);
}

.prompt-lab-card[hidden] {
  display: none;
}

.prompt-lab-card:has([data-prompt-select]:checked) {
  border-color: #7656eb;
  box-shadow: 0 0 0 2px rgba(118, 86, 235, 0.15);
}

.prompt-lab-card-media,
.prompt-lab-card-media.square,
.prompt-lab-card-media.portrait,
.prompt-lab-card-media.landscape {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f5;
}

.prompt-lab-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.prompt-lab-card:hover .prompt-lab-card-media img {
  transform: scale(1.02);
}

.prompt-lab-select {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(209, 216, 229, 0.95);
  border-radius: 5px;
  box-shadow: 0 2px 7px rgba(26, 35, 54, 0.12);
  cursor: pointer;
}

.prompt-lab-select input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #7049e8;
  cursor: pointer;
}

.prompt-lab-select > span {
  display: none;
}

.prompt-lab-card-copy {
  padding: 11px 12px 12px;
}

.prompt-lab-card-copy h2 {
  min-height: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

.prompt-lab-card-copy h2 a {
  color: #202b40;
  text-decoration: none;
}

.prompt-lab-card-copy h2 a:hover {
  color: #6745d4;
}

.prompt-lab-card-copy p {
  display: -webkit-box;
  min-height: 38px;
  margin: 6px 0 9px;
  overflow: hidden;
  color: #717b8f;
  font-size: 11px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.prompt-lab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.prompt-lab-meta a {
  padding: 3px 6px;
  color: #5c6680;
  background: #f1f3f7;
  border-radius: 4px;
  font-size: 10px;
  text-decoration: none;
}

.prompt-lab-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.prompt-lab-pagination > button,
.prompt-lab-pagination > div button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #dce2eb;
  border-radius: 4px;
  color: #59657a;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.prompt-lab-pagination > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  gap: 6px;
}

.prompt-lab-pagination > div button[aria-current="page"] {
  color: #fff;
  background: #7049e8;
  border-color: #7049e8;
}

.prompt-lab-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.prompt-lab-pagination svg {
  width: 15px;
  height: 15px;
}

.prompt-lab-pagination > span,
.prompt-lab-pagination > small {
  margin-left: 6px;
  color: #7b8496;
  font-size: 11px;
}

.prompt-category-hero {
  padding: 20px 0 24px;
  background: #fff;
  border-bottom: 1px solid #e5eaf1;
}

.prompt-category-hero .sa-breadcrumbs {
  margin-bottom: 26px;
}

.prompt-category-nav {
  margin-bottom: 18px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
}

.prompt-category-nav .prompt-category-links {
  flex-direction: row;
  width: max-content;
  min-width: 100%;
  padding: 5px;
}

.prompt-category-nav .prompt-category-links a {
  gap: 8px;
  min-height: 36px;
  border-left: 0;
  border-radius: 4px;
  white-space: nowrap;
}

.prompt-category-count {
  margin: 0 0 14px;
  color: #6f798d;
  font-size: 12px;
}

.prompt-category-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  margin: 0 0 18px;
  color: #737d91;
  font-size: 12px;
}

.prompt-category-popular strong {
  color: #394459;
}

.prompt-category-popular a {
  color: #6044c8;
  text-decoration-color: #c5b8f4;
  text-underline-offset: 3px;
}

.prompt-category-popular a:hover {
  color: #44299f;
  text-decoration-color: currentColor;
}

.prompt-category-page .prompt-lab-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prompt-lab-page button:focus-visible,
.prompt-lab-page a:focus-visible,
.prompt-lab-page input:focus-visible,
.prompt-category-page a:focus-visible {
  outline: 2px solid #7049e8;
  outline-offset: 3px;
}

@media (max-width: 1000px) {
  .prompt-lab-browser {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .prompt-lab-grid,
  .prompt-category-page .prompt-lab-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .prompt-lab-page .sa-shell,
  .prompt-category-page .sa-shell {
    width: calc(100% - 28px);
  }

  .prompt-lab-hero,
  .prompt-category-hero {
    padding: 24px 0 20px;
  }

  .prompt-lab-hero h1,
  .prompt-category-hero h1 {
    font-size: 27px;
  }

  .prompt-lab-hero > .sa-shell > p:last-child,
  .prompt-category-hero > .sa-shell > p:last-child {
    font-size: 13px;
  }

  .prompt-lab-workbench,
  .prompt-category-results {
    padding-top: 16px;
  }

  .prompt-lab-search {
    min-height: 44px;
    padding-left: 11px;
  }

  .prompt-lab-search input {
    height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }

  .prompt-lab-search button {
    width: 62px;
    font-size: 12px;
  }

  .prompt-lab-popular {
    gap: 8px 12px;
    margin-bottom: 16px;
    font-size: 11px;
  }

  .prompt-lab-browser {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .prompt-lab-sidebar {
    position: static;
    overflow-x: auto;
  }

  .prompt-lab-sidebar .prompt-category-links {
    flex-direction: row;
    width: max-content;
    padding: 5px;
  }

  .prompt-lab-sidebar .prompt-category-links a {
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border-left: 0;
    border-radius: 4px;
    white-space: nowrap;
  }

  .prompt-download-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-download-toolbar > div {
    width: 100%;
  }

  .prompt-download-toolbar button[data-prompt-download] {
    flex: 1;
  }

  .prompt-lab-grid,
  .prompt-category-page .prompt-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .prompt-lab-card-copy {
    padding: 9px;
  }

  .prompt-lab-card-copy h2 {
    font-size: 12px;
  }

  .prompt-lab-card-copy p {
    min-height: 34px;
    font-size: 10px;
  }

  .prompt-category-hero .sa-breadcrumbs {
    margin-bottom: 18px;
  }
}

@media (max-width: 360px) {
  .prompt-lab-grid,
  .prompt-category-page .prompt-lab-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-download-toolbar > div {
    align-items: stretch;
    flex-direction: column;
  }
}
