/* The course pages: the course list (.cs-*), the public page before buying (.cp-*) and the student's page after buying (.lc-*).
   The first two are built on the glass theme (theme-base.css, theme-parts.css) and css/features/pages.css; the .lc-* part
   belongs to the student screens. Colours come from the theme tokens, so the dark and the bright theme both work. */

:root { --cp-tint: rgba(139, 92, 246, .10); --cp-tint-line: rgba(139, 92, 246, .32); --cp-bar-bg: rgba(22, 18, 52, .95); }
:root[data-theme="light"] { --cp-tint: rgba(139, 92, 246, .07); --cp-tint-line: rgba(139, 92, 246, .28); --cp-bar-bg: rgba(255, 255, 255, .95); }

/* ---------- Course list ---------- */
.cs-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 10px 6px; text-align: center; }
.cs-cat b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.cs-cat.on { background: var(--g-tile-hover); border-color: var(--g-accent); box-shadow: inset 0 0 0 1px var(--g-accent); }
.cs-cat.on .g-ico { background: var(--g-brand); color: #fff; }
/* A lone last tile on a phone row takes the whole row, so the grid never ends with two holes. */
@media (max-width: 767px) { .cs-cat:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; min-height: 60px; } }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cs-grid > .card { height: auto; }
.cs-grid .card h3 { flex-grow: 1; }
@media (min-width: 600px) { .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  /* One row of tiles, however many categories the admin has switched on. */
  .cs-cats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .cs-cat { min-height: 132px; gap: 10px; }
  .cs-cat .g-ico { width: 46px; height: 46px; }
  .cs-cat .g-ico svg { width: 24px; height: 24px; }
  .cs-cat b { font-size: 16px; }
  .cs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

/* ---------- Before buying (course.blade.php) ---------- */

/* Phones: the two columns dissolve (display: contents) so their blocks can be put in the order
   cover, intro, price card, then everything else. From 900px they become real columns again. */
.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cp-main, .cp-side { display: contents; }
.cp-cover { order: 1; }
.cp-intro { order: 2; }
.cp-buy { order: 3; }
.cp-main > :not(.cp-intro) { order: 4; min-width: 0; }

.cp-cover { position: relative; aspect-ratio: 16 / 9; border-radius: var(--g-r-panel); overflow: hidden; display: grid; place-items: center; padding: 0; text-align: center;
  border: 3px solid var(--g-panel-line); background: linear-gradient(135deg, #5b31e1, #3f47e0); color: #fff; font-size: 22px; font-weight: 700; box-shadow: var(--g-panel-shadow); }
.cp-cover img, .cp-cover iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.cp-cover > span { padding: 14px; }
.cp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 17px; font-weight: 700; }
.cp-play:hover { color: #fff; background: rgba(15, 23, 42, .85); }

.cp-intro { display: flex; flex-direction: column; gap: 10px; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cp-tags .cc-tag { box-shadow: none; border: 1px solid var(--g-line); }
.cp-intro h1 { margin: 0; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.cp-summary { margin: 0; color: var(--g-muted); font-size: 16px; }
.cp-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cp-stats li { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 12px; border-radius: 999px; background: var(--g-tile);
  border: 1px solid var(--g-tile-line); font-size: 15px; font-weight: 700; white-space: nowrap; }
.cp-stats svg { color: var(--g-accent); }
.cp-share { margin: 4px 0 0; }

/* Jump links to the parts of the page. */
.cp-jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
.cp-jump::-webkit-scrollbar { display: none; }
.cp-jump a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--g-tile);
  border: 1px solid var(--g-tile-line); color: var(--g-accent); font-size: 15px; font-weight: 700; }
.cp-block, .cp-books { scroll-margin-top: 84px; }

/* The price card. */
.cp-label { display: block; margin: 0; font-size: 15px; font-weight: 700; color: var(--g-muted); }
.cp-fee { margin-bottom: 12px; }
.cp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--g-accent); }
.cp-price s { font-size: 18px; font-weight: 400; color: var(--g-muted); }
.cp-save { margin: 6px 0 0; color: var(--g-pink-text); font-size: 15px; font-weight: 700; }
.cp-buy form { margin: 0; }
.cp-buy .g-btn { font-size: 18px; }
.cp-buy .note { margin: 8px 0 0; font-size: 15px; color: var(--g-muted); }
.cp-call { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; color: var(--g-accent); font-size: 15px; font-weight: 700; }
.cp-feat-title { margin: 14px 0 8px; font-size: 17px; }
.cp-feat-title svg { width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px; color: var(--g-accent); }
.cp-feats { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cp-feats li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 6px; border-radius: 14px; background: var(--g-tile); border: 1px solid var(--g-tile-line); font-size: 16px; }
.cp-feats li > svg { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--g-icon-bg); color: var(--g-accent); }
.cp-feats span { flex: 1; min-width: 0; color: var(--g-muted); }
.cp-feats b { flex: none; color: var(--g-text); }
.cp-feats b.urgent { color: var(--g-pink-text); }

/* Blocks of the main column. */
.cp-block > h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.35; }
.cp-block > h2 svg { margin-right: 8px; vertical-align: -4px; color: var(--g-accent); }
.cp-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--g-accent); font-size: 16px; font-weight: 700; }

/* Free books: a panel of their own, the covers in one sideways row; a tap opens a cover large with its title. */
.cp-books { padding: 18px 12px; border-radius: var(--g-r-panel); background: var(--g-panel); border: 1px solid var(--g-panel-line); box-shadow: var(--g-panel-shadow); }
@media (min-width: 768px) { .cp-books { padding: 24px 28px; } }
.cp-books-title { margin: 0; font-size: 19px; line-height: 1.4; }
.cp-books-title svg { width: 22px; height: 22px; margin-right: 6px; vertical-align: -4px; color: var(--g-green); }
.cp-books-count { margin: 2px 0 0; color: var(--g-muted); font-size: 15px; }
.cp-books-count b { color: var(--g-green-text); font-size: 19px; }
.cp-shelf { display: flex; gap: 10px; overflow-x: auto; margin: 12px -12px 0; padding: 0 12px 8px; scroll-padding: 0 12px; list-style: none; scroll-snap-type: x proximity; scrollbar-width: thin; }
.cp-shelf li { flex: none; width: 96px; scroll-snap-align: start; }
.cp-books--show .cp-shelf li { width: 112px; }
.cp-shelf a { display: block; }
.cp-bookcover { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; border: 2px solid var(--g-panel-line); background: var(--g-icon-bg); box-shadow: 0 4px 10px rgba(30, 20, 90, .15); }
.cp-bookcover img { width: 100%; height: 100%; object-fit: cover; }
.cp-booktitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; color: var(--g-muted); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.cp-shelf a:hover .cp-bookcover { border-color: var(--g-accent); }
.cp-shelf a:hover .cp-booktitle { color: var(--g-accent); }
.cp-books-hint { margin: 4px 0 0; color: var(--g-muted); font-size: 14px; }
.cp-books-note { margin: 6px 0 0; color: var(--g-muted); font-size: 15px; line-height: 1.5; }

.cp-high { padding: 14px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.cp-high h3 { margin: 0 0 10px; font-size: 18px; }
.cp-high ul { display: grid; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.cp-high li { display: flex; align-items: flex-start; gap: 10px; font-size: 17px; line-height: 1.5; }
.cp-high li span { min-width: 0; overflow-wrap: anywhere; }
.cp-high svg { flex: none; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--g-brand); color: #fff; }
.cp-text { margin: 14px 0 0; font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }

/* Syllabus and question accordions. */
.cp-sec { margin-bottom: 8px; padding: 0 14px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.cp-sec summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 0; font-size: 17px; font-weight: 700; line-height: 1.45; cursor: pointer; list-style: none; }
.cp-sec summary::-webkit-details-marker { display: none; }
.cp-sec summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--g-accent); }
.cp-sec[open] summary { color: var(--g-accent); }
.cp-sec[open] summary::after { content: "\2212"; }
.cp-sec summary .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-sec summary small { flex: none; max-width: 45%; color: var(--g-muted); font-size: 13.5px; font-weight: 400; text-align: right; }
.cp-sec[open] { padding-bottom: 12px; }
.cp-lessons { margin: 0; padding: 0; list-style: none; }
.cp-item { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--g-line); background: var(--g-field); color: var(--g-text); font-size: 16px; line-height: 1.4; }
.cp-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
a.cp-item:hover { border-color: var(--g-accent); }
.cp-item.locked { color: var(--g-muted); }
.cp-item .kind { flex: none; background: var(--g-icon-bg); color: var(--g-accent); }
.cp-lock { flex: none; color: var(--g-muted); }
.cp-free { flex: none; padding: 1px 10px; border-radius: 999px; background: rgba(16, 185, 129, .14); color: var(--g-green-text); font-size: 14px; font-weight: 700; white-space: nowrap; }
.cp-faq .cp-text { margin: 0; color: var(--g-muted); font-size: 16px; }
/* Links staff type in a course answer (FaqText makes /paths and https addresses clickable). */
.cp-faq .cp-text a { color: var(--g-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- Class routine before buying (.cpr-*): the course page's "ক্লাস রুটিন" part and the full routine page.
   Days are a numbered list; each row is a small tile: time and tag on top, then the class and the teacher.
   From 768px a row becomes one line: time | class | tag. The week and month buttons are at least 44px tall. ---------- */
.cpr-lead { margin: -4px 0 12px; color: var(--g-muted); font-size: 16px; line-height: 1.5; }
/* Phones: which days are shown on its own line, the two buttons side by side under it. From 600px all on one line. */
.cpr-nav { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "label label" "prev next"; align-items: center; gap: 8px; margin-bottom: 4px; }
.cpr-nav > :first-child { grid-area: prev; }
.cpr-nav > :last-child { grid-area: next; }
.cpr-nav .cpr-span { grid-area: label; }
@media (min-width: 600px) { .cpr-nav { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "prev label next"; } }
.cpr-step { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--g-tile-line); background: var(--g-tile); color: var(--g-accent); font-size: 15px; font-weight: 700; white-space: nowrap; }
a.cpr-step:hover { border-color: var(--g-accent); background: var(--g-tile-hover); }
.cpr-step.is-off { color: var(--g-muted); opacity: .5; }
.cpr-span { margin: 0; text-align: center; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--g-text); }
.cpr-window[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
.cpr-days { margin: 0; padding: 0; list-style: none; }
.cpr-day { margin-top: 14px; }
.cpr-date { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
.cpr-date__words { min-width: 0; }
.cpr-date svg { flex: none; color: var(--g-accent); }
.cpr-near { flex: none; padding: 1px 10px; border-radius: 999px; background: var(--g-icon-bg); color: var(--g-accent); font-size: 13.5px; }
.cpr-day.is-today .cpr-date { color: var(--g-accent); }
.cpr-day.is-today .cpr-near { background: var(--g-brand); color: #fff; }
.cpr-day.is-today .cpr-item { border-color: var(--g-accent); }
.cpr-day.is-past { opacity: .7; }
.cpr-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cpr-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time tag" "main main"; align-items: start; gap: 2px 10px;
  padding: 10px 12px; border-radius: var(--g-r-small); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.cpr-item:not(:has(.cpr-time)) { grid-template-areas: "main tag"; }
.cpr-time { grid-area: time; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--g-accent); }
.cpr-main { grid-area: main; min-width: 0; }
.cpr-main b { display: block; font-size: 16.5px; line-height: 1.4; overflow-wrap: anywhere; }
.cpr-main small { display: block; margin-top: 2px; color: var(--g-muted); font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
/* On the course page a long lesson name stays to two lines, so two weeks still fit a phone; the full page shows it all. */
.cp-block.cpr .cpr-detail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cpr-teacher svg { display: inline-block; margin-right: 4px; vertical-align: -2px; }
.cpr-tag { grid-area: tag; justify-self: end; padding: 1px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cpr-tag.k-class { background: var(--g-icon-bg); color: var(--g-accent); }
.cpr-tag.k-exam { background: rgba(16, 185, 129, .16); color: var(--g-green-text); }
.cpr-tag.k-off { background: rgba(148, 163, 184, .2); color: var(--g-muted); }
.cpr-tag.k-postponed { background: rgba(245, 158, 11, .18); color: var(--g-orange-text); }
.cpr-tag.k-other { background: rgba(20, 137, 240, .14); color: var(--g-blue-text); }
.cpr-item.k-off, .cpr-item.k-postponed { border-style: dashed; border-color: var(--g-line); }
.cpr-item.k-postponed .cpr-main b { text-decoration: line-through; text-decoration-thickness: 1px; }
.cpr-none { margin: 14px 0 0; padding: 14px; border-radius: var(--g-r-small); background: var(--g-tile); color: var(--g-muted); font-size: 16px; text-align: center; }
.cpr-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; color: var(--g-accent); font-size: 16px; font-weight: 700; }
.cpr-full { margin-top: 16px; }
.cpr-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; color: var(--g-muted); font-size: 14px; line-height: 1.5; }
.cpr-note svg { flex: none; margin-top: 3px; }

/* The full routine page. */
.cpr-top h1 { margin: 2px 0 6px; font-size: 24px; line-height: 1.35; overflow-wrap: anywhere; }
.cpr-top .cpr-lead { margin: 0; }
.cpr-kicker { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--g-accent); font-size: 15px; font-weight: 700; }
.cpr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cpr-actions .g-btn { flex: 1 1 160px; }
.cpr-actions .g-btn[hidden] { display: none; }
.cpr-monthbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cpr-monthbar h2 { margin: 0; font-size: 22px; }
.cpr-monthsteps { display: flex; gap: 8px; }
/* The month row can be long (a course that ran for two years): it scrolls inside its own box, never the page. */
.cpr-chips { display: flex; gap: 6px; margin-top: 12px; }
.cpr-months { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cpr-chips .g-chip { flex: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--g-tile-line); background: var(--g-tile); color: var(--g-muted); font-size: 15px; letter-spacing: 0; white-space: nowrap; }
.cpr-chips .g-chip.on { background: var(--g-brand); border-color: transparent; color: #fff; }
.cpr-chips a.g-chip:not(.on):hover { border-color: var(--g-accent); color: var(--g-accent); }
.cpr-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cpr-cta h2 { margin: 0; font-size: 20px; }

@media (min-width: 768px) {
  .cpr-item { grid-template-columns: 120px minmax(0, 1fr) auto; grid-template-areas: "time main tag"; }
  .cpr-item:not(:has(.cpr-time)) { grid-template-areas: "main main tag"; }
  .cpr-top h1 { font-size: 30px; }
  .cpr-actions .g-btn { flex: none; }
}

@media print {
  /* Paper is white whatever theme the screen had: dark ink. */
  :root[data-theme] { --g-text: #000; --g-muted: #333; --g-accent: #3a1fb0; --g-tile: #fff; --g-line: #999; --g-icon-bg: #eee; color-scheme: light; }
  .cpr-noprint, .ticker, header, footer, .tabbar, nav { display: none !important; }
  body { background: #fff !important; padding: 0 !important; }
  body::before { display: none !important; }
  .cpr-page .g-panel { border: 0; box-shadow: none; background: none; padding: 0; }
  .cpr-day { break-inside: avoid; }
  .cpr-item { border-color: #999; background: none; }
  .cpr-day.is-past { opacity: 1; }
}

.cp-teachers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.cp-teacher { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.cp-teacher img, .cp-initial { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--g-icon-bg); }
.cp-initial { display: grid; place-items: center; color: var(--g-accent); font-size: 22px; font-weight: 700; }
.cp-teacher div { min-width: 0; }
.cp-teacher b { display: block; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.cp-teacher small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--g-muted); }

.cp-reviews { display: grid; gap: 8px; }
.cp-review { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 14px; border-radius: var(--g-r-tile); background: var(--g-tile); border: 1px solid var(--g-tile-line); }
.cp-review blockquote { margin: 0; font-size: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cp-review figcaption { display: flex; flex-direction: column; line-height: 1.35; }
.cp-review figcaption small { color: var(--g-muted); font-size: 14px; }
.cp-stars { display: flex; gap: 3px; }
.cp-stars i { width: 15px; height: 15px; background: #d6d3e8; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.cp-stars i.on { background: #f59e0b; }

/* Phones: price and button stay in reach, in a glass pill just above the site's bottom bar (no blur). From 768px the
   bottom bar is gone, so the pill drops to the screen edge; from 900px the sticky side card takes over. */
.cp-bar { position: fixed; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 29;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 20px;
  border-radius: 999px; border: 1px solid var(--g-panel-line); background: var(--cp-bar-bg); box-shadow: 0 8px 22px rgba(60, 40, 160, .16); }
.cp-bar p { min-width: 0; margin: 0; line-height: 1.25; }
.cp-bar .cp-label { font-size: 13px; }
.cp-bar b { font-size: 21px; color: var(--g-accent); white-space: nowrap; }
.cp-bar s { margin-left: 6px; color: var(--g-muted); font-size: 14px; }
.cp-bar form { margin: 0; }
.cp-bar .g-btn { min-height: 48px; padding: 0 24px; border-radius: 999px; }
/* Room for the floating pill under the footer, so the end of the page is never hidden behind it. */
body:has(> .cp-bar) { padding-bottom: calc(var(--g-bar-space) + 76px); }
@media (min-width: 768px) { .cp-bar { bottom: calc(12px + env(safe-area-inset-bottom)); } }

@media (min-width: 560px) {
  .cp-high ul, .cp-teachers, .cp-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  body:has(> .cp-bar) { padding-bottom: var(--g-bar-space); }
  .cp-bar { display: none; }
  .cp-grid { grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr); gap: 24px; align-items: start; }
  .cp-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .cp-jump { margin: 0; padding: 0; flex-wrap: wrap; }
  /* The sticky enrolment card: cover, price, button and what is included stay in view while the page scrolls. */
  .cp-side { display: block; position: sticky; top: 92px; max-height: calc(100vh - 108px); overflow-y: auto; scrollbar-width: thin; padding: 12px; border-radius: var(--g-r-panel);
    background: var(--g-panel); border: 1px solid var(--g-panel-line); box-shadow: var(--g-panel-shadow); }
  .cp-side > .cp-cover { border: 0; border-radius: var(--g-r-tile); box-shadow: none; }
  .cp-side > .g-panel { padding: 16px 4px 4px; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .cp-intro h1 { font-size: 34px; }
  .cp-shelf { margin: 12px 0 0; padding: 0 0 8px; }
  .cp-books--show .cp-shelf li { width: 128px; }
}
@media (min-width: 1024px) { .cp-side { padding: 16px; } .cp-side > .g-panel { padding: 16px 8px 4px; } .cp-reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.lc-find { display: flex; gap: 8px; margin: 0 0 12px; }
.lc-find input { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--field); color: inherit; font: inherit; font-size: 16.500px; }
.lc-find .btn { flex: none; border-radius: 99px; }

/* The row runs to the edges of the panel on phones so chips can scroll off the side without looking cut. */
.lc-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 8px; padding: 2px 16px 10px; scrollbar-width: none; }
.lc-chips::-webkit-scrollbar { display: none; }
.lc-chips a { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15.500px; font-weight: 600; white-space: nowrap; }
.lc-chips i { font-style: normal; font-size: 13px; padding: 1px 7px; border-radius: 99px; background: var(--field); color: var(--muted); }
.lc-chips a.on { background: var(--grad); border-color: transparent; color: #fff; }
.lc-chips a.on i { background: rgba(255, 255, 255, .22); color: #fff; }

.lc-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.lc-sub:first-child { margin-top: 0; }
.lc-sub h2 { min-width: 0; font-size: 20px; overflow-wrap: anywhere; }
.lc-sub a, .lc-sub span { flex: none; font-size: 15px; font-weight: 600; color: var(--muted); }
.lc-sub a { color: var(--accent); }

.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lc-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: border-color .15s; }
.lc-card:hover { border-color: var(--p2); }
.lc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lc-count, .lc-badge { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--field); color: var(--soft); font-size: 12.500px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.lc-badge.k-video { background: rgba(139, 92, 246, .18); color: var(--accent); }
.lc-badge.k-live { background: rgba(248, 113, 113, .18); color: var(--bad); }
.lc-badge.k-exam { background: rgba(52, 211, 153, .18); color: var(--good); }
.lc-badge.k-pdf, .lc-badge.k-note { background: rgba(250, 204, 21, .18); color: var(--warn); }
.lc-badge.k-link { background: rgba(56, 189, 248, .18); color: var(--info); }
/* Two lines at most. Where cards sit side by side it always takes the height of two, so a row lines up. */
.lc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 17.500px; font-weight: 700; line-height: 1.4; color: var(--head); overflow-wrap: anywhere; }
.lc-meta { display: block; min-height: 1.500em; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.lc-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.lc-progress .minibar { flex: 1; margin: 0; height: 6px; }
.lc-progress small { flex: none; font-size: 13.500px; font-weight: 600; color: var(--muted); }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15.500px; font-weight: 700; color: var(--accent); }
.lc-foot .tick { color: var(--good); }
.lc-content.seen .lc-title { color: var(--muted); }

.lc-back { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 100%; margin-bottom: 12px; font-size: 15.500px; font-weight: 600; color: var(--muted); }
.lc-back b { color: var(--head); overflow-wrap: anywhere; }
.lc-back:hover { color: var(--accent); }
.lc-folder { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 14px; border-radius: 18px; border: 1px solid var(--cp-tint-line); background: var(--cp-tint); }
.lc-folder small { display: block; font-size: 12.500px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.lc-folder h2 { font-size: 20px; overflow-wrap: anywhere; }

@media (min-width: 600px) {
  .lc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-title { min-height: 2.800em; }
}
@media (min-width: 1024px) {
  .lc-chips { margin: 0 0 8px; padding: 2px 0 10px; flex-wrap: wrap; }
}
@media (min-width: 1180px) {
  .lc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .lc-card, .cp-sec summary::after { transition: none; } }

/* Course and checkout pages hide the bottom menu (no-tabbar), so the enrol bar sits at the bottom edge and the page keeps room for it. */
@media (max-width: 899px) {
  body.no-tabbar .cp-bar { bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.no-tabbar:has(.cp-bar) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
