/* The "app" card on the home page, the courses page and the course pages (includes/pwa.php, assets/js/pwa.js). Theme tokens only.
   One slim row: icon, title, a small install button and ×; the description line on wider screens only. Same width as the
   content around it (it sits inside the page's padded column), with room below before the next section. */
.ts-app-card { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "icon title actions close" "icon line actions close" "ios ios ios ios"; align-items: center; column-gap: 12px; width: 100%; max-width: 1200px; margin: 20px auto 32px; padding: 8px; padding-inline-start: 12px; border: 1px solid var(--ts-primary-line); border-radius: var(--r-md); background: var(--ts-card); }
.ts-app-card [hidden] { display: none !important; }
.ts-app-icon { grid-area: icon; width: 36px; height: 36px; border-radius: var(--r-sm); }
.ts-app-text { display: contents; }
.ts-app-title { grid-area: title; align-self: end; margin: 0; color: var(--ts-heading); font-size: var(--fs-sm); font-weight: 700; line-height: var(--lh-snug); }
.ts-app-line { grid-area: line; align-self: start; margin: 0; color: var(--ts-muted); font-size: var(--fs-xs); line-height: var(--lh-body); }
.ts-app-ios { grid-area: ios; margin: 6px 0 2px; color: var(--ts-muted); font-size: var(--fs-xs); line-height: var(--lh-body); }
.ts-app-actions { grid-area: actions; display: flex; align-items: center; margin: 0; }
.ts-app-card .ts-app-install:not(.menu-toggle):not(.dropdown-menu-toggle) { min-height: 36px; padding: 4px 16px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; line-height: var(--lh-snug); white-space: nowrap; }
.ts-app-card .ts-app-close:not(.menu-toggle):not(.dropdown-menu-toggle) { grid-area: close; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ts-muted); font-size: var(--fs-md); line-height: 1; }
.ts-app-card .ts-app-close:not(.menu-toggle):not(.dropdown-menu-toggle):hover, .ts-app-card .ts-app-close:not(.menu-toggle):not(.dropdown-menu-toggle):focus-visible { background: var(--ts-raised); color: var(--ts-text); }
@media (max-width: 767px) {
	.ts-app-card { grid-template-areas: "icon title actions close" "ios ios ios ios"; column-gap: 10px; margin: 16px auto 28px; }
	.ts-app-icon { width: 32px; height: 32px; }
	.ts-app-title { align-self: center; }
	.ts-app-line, .ts-app-more { display: none; } /* phones: «ثبّت» */
}
