/* The Apps page (288, apps.js): the catalog and an app's page, in the bot page's pieces (.bp-) */
.apps-title { margin: 4px 4px 16px; font-size: 28px; font-weight: 650; letter-spacing: -0.015em; }
.apps-inner { padding-top: 8px; }
.apps-list { overflow: hidden; }
/* an app's row, and in New bot's dialog Blank's and a ready-made bot's (.apps-make), which have no tag */
.apps-row, .apps-make { margin-top: 0; background: transparent; min-height: 76px; }
.apps-row .mark, .apps-make .mark { flex: none; }
.apps-name { font-weight: 600; }
.apps-line { font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.apps-row .apps-line, .apps-make .apps-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apps-sep { margin-left: 84px; }
.apps-tag { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.apps-tag.on { color: var(--add); }
.apps-empty { margin: 32px 18px; font-size: 16px; color: var(--muted); text-align: center; text-wrap: balance; }
/* A Free account's New bot dialog (FREE-PLAN-SHAPE, design review 2026-10-21): Blank, then one line
   and one button to the plans page, in place of the locked catalog a paid account's dialog still
   shows (drawPickerUpsell). Centered like the empty state beside it, never claiming a row of its own. */
.apps-upsell { margin-top: 18px; padding: 4px 18px 8px; text-align: center; }
.apps-upsell-line { margin: 0 0 14px; font-size: 15.5px; color: var(--text-2); text-wrap: balance; }

.apps-hero { padding: 4px 0 14px; gap: 6px; text-align: center; }
.apps-h { margin: 8px 0 0; font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.apps-line.hero { max-width: 40ch; margin: 0; font-size: 15px; text-wrap: balance; }
.apps-acts { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.apps-acts .btn { min-width: 168px; height: 44px; }
.apps-month { text-align: center; margin: 6px 0 0; }
.apps-about { margin-top: 22px; padding: 14px 18px; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.apps-about p { margin: 0; max-width: 68ch; }
.apps-about p + p { margin-top: 8px; }
.apps-facts { overflow: hidden; }
.apps-fact { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 8px 18px; font-size: 16px; }
.apps-fact .ic { display: inline-flex; color: var(--muted); }
.apps-fact svg.i { width: 18px; height: 18px; }
.apps-facts .apps-sep { margin-left: 50px; }
.apps-who .apps-fact { min-height: 60px; }
.apps-who .apps-sep { margin-left: 64px; }
.apps-remove { align-self: center; margin-top: 28px; color: var(--danger); }

/* ---------- New bot's dialog (APPS-IN-NEW-SHEET, apps.js) ----------
   The site's dialog card, as the look picker's: centered on a wide screen, a sheet from the bottom on a phone. Its
   rounded lists sit a step off the card (raised-2) so the rows read as rows in both themes. */
.apps-card {
  --card: var(--raised-2);
  --seg-on: var(--selected);
  width: min(100%, 520px); max-height: min(86dvh, 760px);
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
}
@media (prefers-color-scheme: light) { .apps-card { --seg-on: var(--raised); } }
.apps-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 20px; }
.apps-head .round-btn { width: 36px; height: 36px; }
.apps-head .round-btn svg.i { width: 17px; height: 17px; }
.apps-head #apps-dlg-back { margin-left: -6px; }
.apps-dlg-title { flex: 1; min-width: 0; margin: 0; text-wrap: balance; }
.apps-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 16px 20px; display: flex; flex-direction: column; }
/* the column scrolls; its cards keep their height rather than shrinking to fit it */
.apps-body > * { flex-shrink: 0; }
.apps-body > .notice { margin: 14px 4px 0; }
.apps-body .bp-label { margin: 22px 18px 8px; }
.apps-body .apps-row, .apps-body .apps-make { min-height: 68px; }
.apps-blank-ic { display: grid; place-items: center; color: var(--muted); }
.apps-blank-ic svg.i { width: 24px; height: 24px; }
.apps-body .apps-empty { margin: 22px 12px; font-size: 15px; }
.apps-body .apps-hero { padding-top: 0; }
.apps-body .apps-about { margin-top: 18px; }

/* Free | Paid: a segmented control, its track the chip's and the side that's on a raised thumb */
.apps-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 18px 0 12px; padding: 2px;
  border-radius: 10px; background: var(--chip);
}
.apps-seg-btn {
  height: 32px; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 550; color: var(--text-2);
  transition: background 160ms ease-out, color 160ms ease-out;
}
.apps-seg-btn[aria-selected="true"] { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 14%, transparent); }
@media (hover: hover) and (pointer: fine) { .apps-seg-btn:not([aria-selected="true"]):hover { color: var(--text); } }
.apps-seg-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.apps-seg-btn:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .apps-seg-btn { transition: none; } }

/* the older build's Apps tab draws the same choice under its title */
.apps-inner > .apps-seg { margin-top: 0; }

@media (max-width: 760px) {
  .dialog:has(> .apps-card) { align-items: flex-end; padding: 0; }
  .apps-card { width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .apps-body { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
