/* PromptShare — safe site-wide polish (spacing, focus, CLS, empty, motion)
   Does NOT change: H1/blurb copy, logo, glass header geometry, chip hover blue /
   selected orange, carousel edge-to-edge, 9-per-page pager, versioned model chips,
   support@promptshare.fun-only email.
*/

html {
  scroll-behavior: smooth;
}

/* Equal-height cards in CSS grids */
.card-grid,
.ps-videos-grid,
.ps-ggrid,
.ps-ia-featured-grid {
  align-items: stretch;
}
.card-grid > .card,
.card-grid > a.card,
.ps-videos-grid > a.ps-videos-card,
.ps-ggrid > a.ps-gcard,
.ps-ia-featured-grid > a.ps-ia-featured-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card-body,
.ps-videos-card-body,
.ps-ia-card-body,
.ps-gcard .body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Media aspect locks — fill box edge-to-edge (object-fit cover), no letterbox bands */
.ps-videos-thumb,
.ps-ia-card-media,
.card .thumb,
.card-grid .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7e3dc;
}
.card .thumb img,
.card .media img,
.card-grid img.thumb,
.ps-ia-card-media img,
.ps-ia-card-media video,
.ps-videos-thumb img,
.ps-videos-thumb video,
.ps-videos-poster {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  background: #e7e3dc;
}
/* Games: equal media height via fixed 16/10 box — never height:100% (that made posters uneven) */
.ps-games-body .ps-gcard .ps-gcard-media,
a.ps-gcard .ps-gcard-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7e3dc;
  flex: none;
}
.ps-games-body .ps-gcard .ps-gcard-media > img,
a.ps-gcard .ps-gcard-media > img,
.ps-games-body .ps-gcard > img,
a.ps-gcard > img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  background: #e7e3dc;
}
/* Chip row under media: model + thumbs (Games: + difficulty), right-aligned.
   Title sits on its own full-width line below — never truncated. */
.ps-videos-card-body .card-row,
.card-body .card-row,
.ps-ia-card-body .card-row,
.ps-games-body .ps-gcard .ps-grow {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 0.45rem !important;
  min-height: 1.875rem;
  flex-wrap: nowrap;
}
.ps-videos-card-body .card-row .model-chip,
.ps-videos-card-body .card-row .ps-thumb-btn,
.card-body .card-row .model-chip,
.card-body .card-row .ps-thumb-btn,
.ps-ia-card-body .card-row .model-chip,
.ps-ia-card-body .card-row .ps-thumb-btn,
.ps-games-body .ps-gcard .ps-grow > .diff,
.ps-games-body .ps-gcard .ps-grow > .model-chip,
.ps-games-body .ps-gcard .ps-grow > .ps-thumb-btn,
.ps-games-body .ps-gcard .ps-grow > .ps-card-thumb {
  flex: none !important;
  margin-left: 0 !important;
}
/* Title on its own line under the chip row */
.ps-videos-card-body > h3,
.card-body > h3,
.ps-ia-card-body > h3,
.ps-videos-card-body .card-row h3,
.card-body .card-row h3,
.ps-ia-card-body .card-row h3 {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  min-width: 0 !important;
  margin: 0.2rem 0 0 !important;
  padding: 0 0 0.55rem !important; /* ~0.5–0.6rem under title before prompt */
  font-size: 1.1rem !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

/* Games cards: match Images border weight (keep game pill on image) */
.ps-games-body a.ps-gcard {
  border: 2px solid rgba(36, 89, 232, 0.28);
}
.ps-games-body a.ps-gcard:hover {
  border-color: rgba(36, 89, 232, 0.45);
}

/* Consistent keyboard focus — don't fight chip/button own rings */
a:focus-visible,
button:focus-visible,
.chip:focus-visible,
.model-chip:focus-visible,
.ps-thumb-btn:focus-visible,
.pager a:focus-visible,
.pager button:focus-visible,
.ps-page-btn:focus-visible {
  outline: 3px solid var(--ps-blue, #2459e8);
  outline-offset: 3px;
}

/* Empty states */
.empty-panel,
.ps-videos-empty,
.ps-games-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: 22px;
  border: 2px dashed rgba(36, 89, 232, 0.22);
  background: rgba(255, 253, 249, 0.7);
  color: var(--ps-ink-soft, #5c5c56);
}
.empty-panel h2,
.ps-videos-empty h2,
.ps-games-empty h2 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 560;
  color: var(--ps-ink, #242422);
  margin: 0 0 0.5rem;
}
.empty-panel p,
.ps-videos-empty p,
.ps-games-empty p {
  margin: 0 auto;
  max-width: 28rem;
  line-height: 1.5;
}

/* Footer rhythm on legal + games */
.ps-gfoot,
footer.site-foot,
.wrap footer,
footer.legal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
  padding: 1.4rem 0 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(36, 36, 34, 0.08);
  font-size: 0.92rem;
}
.ps-gfoot a,
footer.site-foot a,
.wrap footer a {
  color: var(--ps-blue, #2459e8);
  text-decoration: none;
}
.ps-gfoot a:hover,
footer.site-foot a:hover,
.wrap footer a:hover {
  text-decoration: underline;
}
.ps-gfoot .fine,
footer .fine {
  color: var(--ps-ink-soft, #5c5c56);
  margin-left: auto;
}

/* Pager chips — align sizing without changing 9/page behavior */
.pager,
.ps-pager,
.ps-page-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 0.4rem;
}
.pager a,
.pager button,
.ps-page-btn {
  min-width: 2.4rem;
  min-height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 404 polish if present */
.ps-404 {
  max-width: 36rem;
  margin: 4rem auto;
  text-align: center;
  padding: 0 1rem;
}
.ps-404 h1 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 560;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  a.ps-gcard,
  a.ps-videos-card,
  .card-grid > .card,
  .card-grid > a.card,
  .ps-ia-featured-card {
    transition: none !important;
  }
  a.ps-gcard:hover,
  a.ps-videos-card:hover,
  .card-grid > .card:hover,
  .card-grid > a.card:hover {
    transform: none !important;
  }
}


/* ---------- gamespill1: name only on poster pill; equal media; chips then prompt ---------- */
.ps-games-body .ps-gcard .ps-gcard-sr-title,
a.ps-gcard .ps-gcard-sr-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.ps-games-body .ps-gcard-title-pill,
a.ps-gcard .ps-gcard-title-pill {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  z-index: 2;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  padding: 0.42rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 253, 249, 0.94);
  color: #242422;
  font-family: Newsreader, "Iowan Old Style", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.36),
    0 0 0 3.5px rgba(126, 231, 245, 0.42),
    0 0 12px rgba(126, 231, 245, 0.28);
}
.ps-games-body .ps-gcard .body,
a.ps-gcard .body {
  padding-top: 0.7rem;
}
.ps-games-body .ps-gcard .ps-grow,
a.ps-gcard .ps-grow {
  margin-bottom: 0.35rem;
}
.ps-games-body .ps-gcard .prompt,
a.ps-gcard .prompt {
  margin-top: 0.15rem;
}
@media (max-width: 820px) {
  .ps-games-body .ps-gcard-title-pill,
  a.ps-gcard .ps-gcard-title-pill {
    font-size: 1.25rem;
    padding: 0.38rem 0.9rem;
    bottom: 0.7rem;
  }
}
@media (max-width: 390px) {
  .ps-games-body .ps-gcard-title-pill,
  a.ps-gcard .ps-gcard-title-pill {
    font-size: 1.15rem;
    padding: 0.34rem 0.8rem;
    bottom: 0.6rem;
  }
}
