
/* ── An entry's page ── */
.cst-detail { display: flex; flex-direction: column; gap: 12px; }
.cst-back {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  height: 40px; padding: 0 8px 0 0;
  border: 0; background: none;
  font-size: 15px; font-weight: 600; color: var(--cst-muted);
  cursor: pointer;
}
.cst-back:hover { color: var(--cst-text); }
.cst-back .cgal-ic { font-size: 20px; }
/* The gallery is as wide as the window's height lets it be, its thumbnails included,
   so on a low screen picture, name and key are all there with no scrolling. */
.cst-detail-grid {
  --cst-gal-w: calc((100dvh - 110px) * 1.5);
  display: grid; grid-template-columns: minmax(0, var(--cst-gal-w)) minmax(380px, 1fr); gap: 32px;
  align-items: start; padding-right: 54px;
}
.cst-detail-words { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 640px; }
.cst-kind { font-size: 14px; font-weight: 600; color: var(--cst-muted); }
.cst-detail .cst-name { font-size: clamp(32px, 2.6vw, 46px); line-height: 1.05; }
.cst-by { margin-bottom: 8px; font-size: 14.5px; color: var(--cst-muted); }
.cst-by a { color: inherit; }
.cst-tier { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 600; color: var(--cst-muted); }
.cst-tier .cgal-ic { font-size: 16px; }
.cst-detail .cgal-detail-cta { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.cst-detail .cgal-detail-cta:empty { display: none; }
.cst-detail .cgal-detail-desc { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--cst-text); opacity: 0.88; }
.cgal-detail-perfnote { margin: 0; font-size: 14px; line-height: 1.4; color: var(--cst-muted); }
.cst-offer-line { margin: 0; font-size: 15px; line-height: 1.35; color: var(--cst-muted); }
.cst-detail .cgal-detail-changelog { margin: 0; padding: 12px 14px; border: 0; border-radius: 10px; background: var(--cst-well); }
.cst-overlay .cst-detail .cgal-detail-changelog .cgal-changelog-label { font-size: 13.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--cst-muted); }
.cst-detail .cgal-changelog-text { font-size: 14.5px; color: var(--cst-text); }
.cst-overlay .cgal-authorstar { color: var(--cst-muted); }

/* A search that found nothing: Bit, and the way to ask. */
.cst-ask { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; }
.cst-ask h3 { margin: 0; font-size: 24px; font-weight: 700; }
.cst-ask p { margin: 0 0 12px; font-size: 16px; color: var(--cst-muted); }
.cst-ask-face { width: 64px; height: 64px; margin-bottom: 8px; }
.cst-ask-face svg { display: block; width: 100%; height: 100%; }
.cst-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 10px 0 0; padding-top: 12px;
  border-top: 1px solid var(--cst-sep);
}
.cst-fact:has(.cgal-installs:empty) { display: none; }
.cst-facts dt { font-size: 13px; color: var(--cst-muted); }
.cst-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; color: inherit; }
.cst-detail-more:not(:empty) { margin-top: 24px; }
.cst-detail .cgal-gal { min-width: 0; }
.cst-detail .cgal-gal-stage { border: 0; border-radius: 10px; aspect-ratio: 16 / 9; background: var(--cst-paper, var(--cst-sheet)); }
.cst-detail .cgal-gal-thumb { flex: 0 0 calc((100% - 50px) / 6); width: auto; height: auto; aspect-ratio: 16 / 10; border: 0; border-radius: 6px; opacity: 0.62; }
.cst-detail .cgal-gal-thumb:not(.on) { opacity: 0.78; }
.cst-detail .cgal-gal-thumb:hover { opacity: 1; }
.cst-detail .cgal-gal-thumb.on { border: 0; opacity: 1; }

/* ── Loading ── */
.cst-card.cgal-skel { cursor: default; pointer-events: none; }
.cst-card.cgal-skel .cgal-skel-line { background: var(--cst-well); }
.cst-card.cgal-skel .cgal-skel-line.w70 { margin-top: 12px; }

/* The keys a limited drop and the lists share, on the page's own terms. */
.cst .cgal-btn {
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 10px; box-shadow: none;
  font-size: 15px; font-weight: 700;
  color: var(--cst-text); background: var(--cst-well);
}
.cst .cgal-btn:hover:not(:disabled) { background: var(--cst-on); }
.cst .cgal-claim { color: var(--cst-key-ink); background: var(--cst-key); }
.cst .cgal-claim:hover:not(:disabled) { background: var(--cst-key); filter: brightness(1.06); }
.cst .cgal-havecode { min-height: 36px; font-size: 14.5px; font-weight: 600; color: var(--cst-muted); background: none; }
.cst .cgal-havecode:hover:not(:disabled) { color: var(--cst-text); background: none; }
.cst .cgal-limited-buttons { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cst .cgal-soldout {
  display: grid; place-items: center;
  height: 48px;
  border: 0; border-radius: 10px;
  font-size: 15.5px; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: var(--cst-muted); background: var(--cst-well);
}
.cst .cgal-loadmore { margin: 24px 0 0; }
.cst .cgal-status { padding: 56px 16px; font-size: 16px; text-align: center; color: var(--cst-muted); }
.cst .cgal-stale { padding: 0 0 12px; font-size: 14.5px; text-align: left; }

/* Installed and Sparks clear the close key. */
.cst-view.is-own { padding-right: 54px; }

/* Installed: rows on the page's wells, the keys quiet. One filled key per page, the
   next thing to do (Update all, or the first row waiting on you); removing is words in red. */
.cst-overlay .cst-view.is-own .inst-chip {
  height: 36px; padding: 0 12px;
  border: 0; border-radius: 6px;
  font-size: 14.5px; color: var(--cst-muted); background: none;
}
.cst-overlay .cst-view.is-own .inst-chip:hover { color: var(--cst-text); background: var(--cst-well); }
.cst-overlay .cst-view.is-own .inst-chip.active { color: var(--cst-text); background: var(--cst-on); }
.cst-overlay .cst-view.is-own .inst-row { padding: 12px 16px; border: 0; border-radius: 10px; background: var(--cst-well); }
.cst-overlay .cst-view.is-own .inst-thumb { border: 0; border-radius: 6px; }
.cst-overlay .cst-view.is-own .inst-thumb.is-glyph { color: var(--cst-muted); background: var(--cst-on); }
.cst-overlay .cst-view.is-own .inst-row-name { font-size: 15.5px; color: var(--cst-text); }
.cst-overlay .cst-view.is-own .inst-row-meta { font-size: 13.5px; color: var(--cst-muted); }
.cst-overlay .cst-view.is-own .inst-row-state { font-size: 14px; color: var(--cst-text); }
.cst-overlay .cst-view.is-own .inst-row-changelog { font-size: 13.5px; color: var(--cst-muted); }
.cst-overlay .cst-view.is-own :is(.inst-kind, .inst-origin, .inst-activity) {
  padding: 0; border: 0; border-radius: 0;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  background: none;
}
.cst-overlay .cst-view.is-own :is(.inst-kind, .inst-origin) { color: var(--cst-muted); }
.cst-overlay .cst-view.is-own :is(.inst-updbar, .inst-issues, .inst-rejected) { border: 0; border-radius: 10px; }
.cst-overlay .cst-view.is-own .inst-updbar { background: var(--cst-well); }
.cst-overlay .cst-view.is-own .inst-foot { border-top: 1px solid var(--cst-sep); }
.cst-overlay .cst-view.is-own .inst-foot .cgal-status { font-size: 14px; color: var(--cst-muted); }
.cst-overlay .cst-view.is-own .settings-btn {
  min-height: 38px; padding: 0 14px;
  border: 0; border-radius: 6px; box-shadow: none;
  font-size: 14px; font-weight: 600;
  color: var(--cst-text); background: var(--cst-on);
}
.cst-overlay .cst-view.is-own .settings-btn.primary { color: var(--cst-key-ink); background: var(--cst-key); }
.cst-overlay .cst-view.is-own .settings-btn.danger { color: var(--cst-danger); background: none; }
.cst-overlay .cst-view.is-own .settings-btn.danger:hover { background: var(--cst-on); }

/* Sparks in the Store: the same wells, no tinted frames. Green stays on the key. */
.cst-view .sparks-shop { max-width: none; }
.cst-view :is(.sparks-hero, .sparks-pack, .sparks-plan, .sparks-use) {
  border: 0; border-radius: 10px;
  background: var(--cst-well);
}
.cst-view .sparks-shop .sparks-pack:hover { border: 0; background: var(--cst-on); }
.cst-view .sparks-shop .sparks-pack.is-best { border: 0; background: var(--cst-on); }
.cst-view .sparks-plan-btn { border: 0; border-radius: 10px; color: var(--cst-key-ink); background: var(--cst-key); }

/* Supporters: the sheet for a PC with no code. Real packs on top, the price under
   them, what a month buys in two columns, the one green key. */
.cst-overlay .cgal-detail-scrim { background: rgba(4, 6, 9, 0.5); backdrop-filter: none; }
.cst-info {
  position: relative;
  display: flex; flex-direction: column;
  width: min(860px, 100%); max-height: 100%;
  border-radius: 10px; overflow: hidden;
  color: var(--cst-text); background: var(--cst-solid);
}
.cst-info .cst-close { top: 12px; right: 12px; background: var(--cst-solid); }
.cst-info .cst-close:hover { background: var(--cst-on); }
.cst-info-shots { display: grid; flex: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cst-info-shots .cgal-media { aspect-ratio: 16 / 9; border-radius: 0; }
.cst-info-body { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow-y: auto; padding: 24px 28px; }
.cst-info-name { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; }
.cst-info-line { margin: -12px 0 0; font-size: 17px; line-height: 1.35; color: var(--cst-text); }
.cst-info-perks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px;
  margin: 0; padding: 0; list-style: none;
}
.cst-info-perks li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; font-size: 14.5px; line-height: 1.4; color: var(--cst-muted); }
.cst-info-perks .cgal-ic, .cst-info-perks [data-xspark] { flex: none; width: 18px; height: 18px; margin-top: 1px; font-size: 18px; }
.cst-info-tick { color: var(--cst-text); }
.cst-info-keys { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.cst-info-keys .cst-key { min-width: 200px; }
.cst-info-note { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--cst-muted); }
.cst-info-note a { color: var(--cst-text); }
