/* =============================================================================
   touchstar-apps.css - the APPSTAR phone apps section on the TOUCHSTAR page:
   the live APPSTAR Bluetooth app demo (appstar-demo.js + appstar.css) beside
   the setup steps. Scoped to .ts-apps; light only; fonts and headings come
   from the site.
   ============================================================================= */
.ts-apps {
  --tsa-bg: #ffffff; --tsa-panel: #f1f2f4; --tsa-ink: #16181c; --tsa-muted: #5d636d; --tsa-line: #dfe2e6;
  background: var(--tsa-bg); color: var(--tsa-ink); text-align: left;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 28px 18px;
}
.ts-apps *, .ts-apps *::before, .ts-apps *::after { box-sizing: border-box; }
.ts-apps .tsa-wrap { max-width: 1200px; margin: 0 auto; }
.ts-apps p { margin: 0; }

/* the phone demo beside the steps */
.ts-apps .appstar { padding: 0; background: none; display: grid; gap: 18px; justify-items: center; }
.ts-apps .appstar > .split { width: 100%; grid-template-columns: 330px minmax(0, 1fr); gap: 32px; }
.ts-apps .appstar .stick { gap: 14px; min-width: 0; width: 100%; }
.ts-apps .appstar .stick .as-phone { width: 100%; max-width: 330px; min-width: 0; }
.ts-apps .appstar .as-addr { min-width: 0; max-width: 100%; }
.ts-apps .appstar > .split > div { min-width: 0; }
@media (max-width: 900px) {
  .ts-apps .appstar > .split { grid-template-columns: minmax(0, 1fr); }
  .ts-apps .appstar .stick { position: static; }
  .ts-apps .appstar .stick .as-phone { max-width: 340px; }
}

/* numbered steps */
.ts-apps .tsa-small { color: var(--tsa-muted); font-size: .9rem; }
.ts-apps .tsa-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: tsa; }
.ts-apps .tsa-steps > li { counter-increment: tsa; position: relative; padding: 16px 18px 16px 64px; background: var(--tsa-panel);
  border: 1px solid var(--tsa-line); border-radius: 14px; }
.ts-apps .tsa-steps > li::before { content: counter(tsa); position: absolute; left: 18px; top: 14px; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; background: var(--tsa-bg); color: var(--tsa-muted); border: 1px solid var(--tsa-line); }
.ts-apps .tsa-steps h3 { margin: 0 0 4px; }
.ts-apps .tsa-steps p { color: var(--tsa-muted); }
.ts-apps .tsa-steps p + p { margin-top: 6px; }
.ts-apps .k { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .03em; padding: 1px 7px; border-radius: 6px;
  background: #222428; color: #fff; vertical-align: 1px; white-space: nowrap; }

/* =============================================================================
   Joystick section (touchstar-joystick.js): the picture changes with the card
   you point at. Uses touchstar.css for the cards and layout.
   ============================================================================= */
.touchstar .ts-joy { position: relative; width: min(100%, 420px); aspect-ratio: 534 / 308; margin: 0 auto; }
.touchstar .ts-joy img { position: absolute; inset: 0; width: 100%; height: 100%; }
.touchstar .card[data-joy] { cursor: pointer; }
.touchstar .card[data-joy] > .n i { font-size: .9rem; }
