/**
 * Lush — component sheet.
 *
 * Every block is prefixed `lu-`, children are `lu-<block>__<part>`. Bare child
 * names (.title, .body, .price) are banned: in the previous project they
 * collided between components and one edit moved three screens at once.
 */

/* ---------- shell: tabs ---------- */

.lu-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  margin-bottom: var(--gap-3);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.lu-tab {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-1);
  padding: var(--gap-2) var(--gap-1);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--t-caption);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-tap) var(--ease-in-out), color var(--dur-tap) var(--ease-in-out);
}
.lu-tab[aria-selected='true'] {
  color: var(--accent-ink);
  background: var(--accent);
}
.lu-tab__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sector-hi);
  flex: none;
}

/* ---------- buttons ---------- */

.lu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-2);
  width: 100%;
  min-height: var(--tap);
  padding: 13px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) linear;
}
.lu-btn:active { transform: scale(.98); }

.lu-btn--secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.lu-btn--quiet {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  min-height: 36px;
  padding: var(--gap-2);
}
/* disabled keeps its contrast: a faded accent with white ink was unreadable */
.lu-btn[disabled] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}
.lu-btn__spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2.5px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: lu-spin .9s linear infinite;
}
@keyframes lu-spin { to { transform: rotate(360deg); } }

.lu-btn-row { display: flex; flex-direction: column; gap: var(--gap-2); }


/* ---------- price pair ---------- */

.lu-price {
  display: flex;
  align-items: baseline;
  gap: var(--gap-2);
  font-variant-numeric: tabular-nums;
}
.lu-price__now {
  font-size: var(--t-head);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.lu-price__was {
  font-size: var(--t-caption);
  color: var(--muted);
  text-decoration: line-through;
  white-space: nowrap;
}
.lu-price--lg .lu-price__now { font-size: var(--t-title); }
.lu-price--lg .lu-price__was { font-size: var(--t-body); }

/* ---------- chips ---------- */

.lu-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.lu-chip svg { width: 12px; height: 12px; display: block; flex: none; }
.lu-chip--accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.lu-chip--ok {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}
.lu-chip--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
.lu-chip--temp {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

/* ---------- collection progress ---------- */

.lu-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-2);
  margin-bottom: var(--gap-2);
}
.lu-progress__count {
  font-size: var(--t-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lu-progress__bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.lu-progress__fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 600ms var(--ease-out);
}

/* ---------- avatar block (heroine, 16 stages) ---------- */

.lu-hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: var(--gap-3);
}
.lu-hero__frame {
  position: relative;
  aspect-ratio: 2 / 1;          /* source render 1280x640 */
  background: var(--surface-2);
  overflow: hidden;
}
.lu-hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* stage swap: the new frame fades in over the old one */
.lu-hero__frame img.lu-is-entering {
  animation: lu-hero-in 520ms var(--ease-out) both;
}
@keyframes lu-hero-in {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}
.lu-hero__stage {
  position: absolute;
  left: var(--gap-3);
  bottom: var(--gap-2);
  display: inline-flex;
  align-items: center;
  gap: var(--gap-1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--t-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(20, 16, 19, .62);
  backdrop-filter: blur(6px);
}
.lu-hero__body { padding: var(--gap-3); }
.lu-hero__title {
  font-size: var(--t-body);
  font-weight: 700;
  margin: 0 0 var(--gap-1);
}

/* no artwork yet: the block keeps its size and says why it is empty */
.lu-hero--empty .lu-hero__frame {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg,
      var(--surface-2) 0 10px,
      transparent 10px 20px);
}
.lu-hero__placeholder {
  text-align: center;
  padding: var(--gap-3);
  color: var(--muted);
  font-size: var(--t-caption);
  line-height: var(--t-caption-lh);
}
.lu-hero__placeholder b {
  display: block;
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 700;
  margin-bottom: 2px;
}

/* ---------- course card ---------- */

.lu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-2);
}

/* Two targets, never nested: .lu-card__main opens the description,
   .lu-card__act holds the action. The card itself is not a button. */
.lu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  color: var(--text);
  transition: border-color var(--dur-tap) var(--ease-in-out);
}
.lu-card__main {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.lu-card__main:active { transform: scale(.985); }
.lu-card__act { padding: 0 var(--gap-2) var(--gap-2); }
.lu-btn--card {
  min-height: var(--tap);
  padding: 10px 12px;
  font-size: var(--t-caption);
  border-radius: 10px;
}

.lu-card__cover {
  display: block;                /* it is a <span> inside the card's button */
  position: relative;
  aspect-ratio: 1;               /* source render 640x640 */
  background: var(--surface-2);
  overflow: hidden;
}
.lu-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lu-card__lock {
  position: absolute;
  top: var(--gap-2);
  right: var(--gap-2);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 16, 19, .55);
  color: #fff;
  backdrop-filter: blur(4px);
}
.lu-card__lock svg { width: 14px; height: 14px; display: block; }

/* the owned mark sits where the lock was, so the eye checks one spot */
.lu-card__mark {
  position: absolute;
  top: var(--gap-2);
  right: var(--gap-2);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ok);
  color: var(--surface);
}
.lu-card__mark svg { width: 15px; height: 15px; display: block; }

.lu-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
  padding: var(--gap-2);
  flex: 1;
}
.lu-card__name {
  display: block;
  font-size: var(--t-caption);
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.lu-card__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-1);
  align-items: flex-start;
}
.lu-card__open {
  display: flex;
  align-items: center;
  gap: var(--gap-1);
  font-size: var(--t-caption);
  font-weight: 700;
  color: var(--accent);
}

/* state: locked — cover drained of colour, description still readable */
.lu-card--locked .lu-card__cover img { filter: var(--locked-filter); }

/* state: owned — cover in colour, a quiet mark instead of the price */
.lu-card--owned { border-color: color-mix(in srgb, var(--ok) 38%, transparent); }

/* state: just unlocked — the single loud moment in the interface */
.lu-card--fresh {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: lu-unlock var(--dur-unlock) var(--ease-pop) both;
}
@keyframes lu-unlock {
  0% { transform: scale(1); }
  18% { transform: scale(1.06); }
  38% { transform: scale(.995); }
  56% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.lu-card--fresh .lu-card__cover img { animation: lu-decolour var(--dur-unlock) var(--ease-in-out) both; }
@keyframes lu-decolour {
  0% { filter: var(--locked-filter); }
  55% { filter: grayscale(0) opacity(1) saturate(1.25); }
  100% { filter: none; }
}
.lu-card__fresh-tag {
  position: absolute;
  top: var(--gap-2);
  left: var(--gap-2);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
}

/* cover with no artwork yet: keeps the box, names the course */
.lu-cover-stub {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--gap-2);
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg,
      var(--surface-2) 0 8px,
      transparent 8px 16px);
}
.lu-card--locked .lu-cover-stub { filter: grayscale(1); }

/* ---------- tile: generic surface block ---------- */

.lu-tile {
  padding: var(--gap-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lu-tile + .lu-tile { margin-top: var(--gap-2); }
.lu-tile--accent {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent-soft) 100%, var(--surface));
}
.lu-tile--danger {
  border-color: color-mix(in srgb, var(--danger) 38%, transparent);
  background: color-mix(in srgb, var(--danger-soft) 100%, var(--surface));
}
.lu-tile--ok {
  border-color: color-mix(in srgb, var(--ok) 38%, transparent);
  background: color-mix(in srgb, var(--ok-soft) 100%, var(--surface));
}

/* teaser row: wheel entry, donation course, collection reward */
.lu-teaser {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  width: 100%;
  padding: var(--gap-3);
  margin-bottom: var(--gap-3);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lu-teaser__icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.lu-teaser__icon svg { width: 20px; height: 20px; display: block; }
.lu-teaser__txt { flex: 1; min-width: 0; }
.lu-teaser__txt b { display: block; font-size: var(--t-body); font-weight: 700; }
.lu-teaser__txt span { font-size: var(--t-caption); color: var(--muted); }
.lu-teaser__go { flex: none; color: var(--accent); font-weight: 700; }
/* at most one accented teaser per screen: the rest go calm, so the витрина
   does not turn into a wall of pink */
.lu-teaser--calm {
  border-color: var(--border);
  background: var(--surface);
}
.lu-teaser--locked {
  border-color: var(--border);
  background: var(--surface);
}
.lu-teaser--locked .lu-teaser__icon { background: var(--surface-2); color: var(--muted); }

/* ---------- sheet (course card opens from the bottom) ---------- */

.lu-sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  background: color-mix(in srgb, #141013 72%, transparent);
  backdrop-filter: blur(3px);
}
.lu-sheet {
  width: 100%;
  max-height: 92%;
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  box-shadow: var(--shadow-sheet);
  animation: lu-sheet-up var(--dur-sheet) var(--ease-pop) both;
}
@keyframes lu-sheet-up {
  from { transform: translateY(32px); opacity: .5; }
  to { transform: none; opacity: 1; }
}
.lu-sheet__grip {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  margin: var(--gap-2) auto var(--gap-1);
}
.lu-sheet__cover {
  position: relative;
  /* the client's poster is shown whole here: it is her design, the title and
     the three icons are part of it, and at nearly screen width it reads. The
     grid gets a cropped tile instead — see tools/covers.py. */
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}
.lu-sheet__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The sheet never desaturates the cover, even for a course that is not bought.
   Draining colour is the grid's way of showing status; the sheet's job is to
   sell, and the poster is the client's main selling asset. The lock badge
   carries the state here. */
.lu-sheet__body { padding: var(--gap-3) var(--gap-3) var(--gap-4); }

/* ---------- toast ---------- */

.lu-toast {
  position: absolute;
  left: var(--gap-3);
  right: var(--gap-3);
  bottom: var(--gap-4);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  padding: var(--gap-3);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  font-size: var(--t-caption);
  animation: lu-toast-in 240ms var(--ease-pop) both;
}
@keyframes lu-toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.lu-toast__txt { flex: 1; min-width: 0; }
.lu-toast__act {
  flex: none;
  border: 0;
  background: none;
  padding: var(--gap-1);
  font: inherit;
  font-size: var(--t-caption);
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

/* ---------- skeleton ---------- */

.lu-skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg,
    var(--surface-2) 30%,
    color-mix(in srgb, var(--text) 9%, transparent) 50%,
    var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: lu-shimmer 1.4s var(--ease-in-out) infinite;
}
@keyframes lu-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -40% 0; }
}
.lu-skeleton--card { border-radius: var(--radius-sm); overflow: hidden; }
.lu-skeleton__cover { aspect-ratio: 1; }
.lu-skeleton__line { height: 11px; border-radius: var(--radius-pill); }

/* ---------- steps (payment waiting) ---------- */

.lu-steps { display: flex; flex-direction: column; gap: var(--gap-3); }
.lu-step { display: flex; gap: var(--gap-3); align-items: flex-start; }
.lu-step__mark {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.lu-step--done .lu-step__mark {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--surface);
}
.lu-step--now .lu-step__mark {
  border-color: var(--accent);
  color: var(--accent);
}
.lu-step--now .lu-step__mark::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: lu-pulse 1.4s var(--ease-in-out) infinite;
}
@keyframes lu-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.lu-step__txt { min-width: 0; padding-top: 2px; }
.lu-step__txt b { display: block; font-size: var(--t-body); font-weight: 700; }
.lu-step__txt span { font-size: var(--t-caption); color: var(--muted); }
.lu-step--wait .lu-step__txt b { color: var(--muted); font-weight: 600; }

/* ---------- timer line ---------- */

.lu-timer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-3);
  padding: var(--gap-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lu-timer__val {
  font-size: var(--t-head);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- copyable block ---------- */

.lu-copy {
  padding: var(--gap-2) var(--gap-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- file row (materials delivered inside the app) ---------- */

.lu-file {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--gap-2) var(--gap-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lu-file + .lu-file { margin-top: var(--gap-2); }
.lu-file__icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.lu-file__txt { flex: 1; min-width: 0; }
.lu-file__txt b { display: block; font-size: var(--t-caption); font-weight: 600; }
.lu-file__txt span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lu-file__go { flex: none; color: var(--accent); }

/* ---------- list of what is inside a course ---------- */

.lu-bullets { margin: 0; padding: 0; list-style: none; }
.lu-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: var(--gap-2);
  font-size: var(--t-caption);
  line-height: var(--t-caption-lh);
}
.lu-bullets li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- key/value row (access method, order number) ---------- */

.lu-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-3);
  padding: var(--gap-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--t-caption);
}
.lu-kv:last-child { border-bottom: 0; }
.lu-kv__k { color: var(--muted); }
.lu-kv__v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- wheel ---------- */

.lu-wheel {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.lu-wheel svg { display: block; width: 100%; height: auto; }

/* the disc is what turns; the pointer and the hub stay put */
.lu-wheel__disc { transform-origin: 160px 160px; }
.lu-wheel--spin .lu-wheel__disc { filter: blur(1.4px); }

.lu-wheel__sector-label {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}
.lu-wheel__hub-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  fill: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* the sector under the pointer once the disc has stopped: a ring around it,
   never a change of opacity — a faded sector reads as disabled, not as won */
.lu-wheel__win path {
  stroke: var(--text);
  stroke-width: 3;
  animation: lu-win 1400ms var(--ease-in-out) infinite;
}
@keyframes lu-win { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .3; } }

.lu-wheel__cap {
  margin-top: var(--gap-2);
  text-align: center;
  font-size: var(--t-caption);
  color: var(--muted);
}

/* ---------- prize plate ---------- */

.lu-prize {
  display: flex;
  gap: var(--gap-3);
  align-items: flex-start;
  padding: var(--gap-3);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: var(--accent-soft);
  animation: lu-prize-in 420ms var(--ease-pop) both;
}
@keyframes lu-prize-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.lu-prize--empty {
  border-color: var(--border);
  background: var(--surface);
}
.lu-prize__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.lu-prize__icon svg { width: 22px; height: 22px; display: block; }
.lu-prize--empty .lu-prize__icon { background: var(--surface-2); color: var(--muted); }
.lu-prize__txt { flex: 1; min-width: 0; }
.lu-prize__name { font-size: var(--t-head); font-weight: 800; margin: 0 0 var(--gap-1); letter-spacing: -.01em; }
.lu-prize__note { font-size: var(--t-caption); color: var(--muted); margin: 0; line-height: var(--t-caption-lh); }

/* ---------- donation sums ---------- */

/* Ten amounts: two columns. Three columns leave a ragged last row, and five
   columns cannot fit "1 000 ₽" at 390 px. */
.lu-sums {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-2);
}
.lu-sum {
  min-height: var(--tap);
  padding: var(--gap-2);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--t-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-tap) var(--ease-in-out), background var(--dur-tap) var(--ease-in-out);
}
.lu-sum[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.lu-sum--wide { grid-column: span 2; }

/* ---------- course description, in the client's own shape ---------- */

.lu-lead {
  font-size: var(--t-body);
  line-height: var(--t-body-lh);
  font-weight: 600;
  margin: 0 0 var(--gap-3);
}
.lu-closing {
  margin: var(--gap-3) 0 0;
  padding: var(--gap-2) var(--gap-3);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  font-size: var(--t-body);
  line-height: var(--t-body-lh);
}

/* ---------- donation course ---------- */

/* Full width, one per row: a donation course must never look like one more
   tile in the grid, only pricier. */
.lu-donate {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--surface);
  overflow: hidden;
}
.lu-donate + .lu-donate { margin-top: var(--gap-2); }
.lu-donate__main {
  display: flex;
  gap: var(--gap-3);
  align-items: center;
  padding: var(--gap-3);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lu-donate__thumb {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.lu-donate__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lu-donate__thumb .lu-card__lock { top: 4px; right: 4px; width: 22px; height: 22px; }
.lu-donate__thumb .lu-card__lock svg { width: 11px; height: 11px; }
.lu-donate--locked .lu-donate__thumb img { filter: var(--locked-filter); }
.lu-donate__txt { min-width: 0; }
.lu-donate__txt b {
  display: block;
  font-size: var(--t-body);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--gap-1);
}
.lu-donate__txt span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--t-caption);
  line-height: var(--t-caption-lh);
  color: var(--muted);
}
.lu-donate__act {
  display: flex;
  align-items: center;
  gap: var(--gap-3);
  padding: 0 var(--gap-3) var(--gap-3);
}
.lu-donate__price {
  flex: 1;
  font-size: var(--t-caption);
  font-weight: 700;
  color: var(--accent);
}
.lu-donate__act .lu-btn { width: auto; flex: none; padding: 10px 18px; }
.lu-donate__note { font-size: var(--t-caption); color: var(--muted); }
.lu-donate--locked { border-color: var(--border); }

/* ---------- milestones on the collection scale ---------- */

.lu-progress__track {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}
.lu-progress__track .lu-progress__bar { flex: 1; }

/* Markers sit on the bar at their own share of the scale. Only the next one
   is loud: passed ones are quiet fills, far ones are outlines. */
.lu-mark {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 2px solid var(--border-strong);
  color: var(--muted);
  transition: background var(--dur-tap) var(--ease-in-out),
              border-color var(--dur-tap) var(--ease-in-out),
              color var(--dur-tap) var(--ease-in-out);
}
.lu-mark svg { width: 11px; height: 11px; display: block; }
/* the last marker sits at 100%: pull it fully inside the track */
.lu-mark[style*="left:100%"] { margin-left: -22px; }

.lu-mark--done {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.lu-mark--next {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lu-mark--gift.lu-mark--done {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}
.lu-mark--gift.lu-mark--next {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

/* crossing a milestone is an event: the mark pops once the fill reaches it */
.lu-mark--pop { animation: lu-mark-pop 520ms var(--ease-pop) 680ms both; }
@keyframes lu-mark-pop {
  0% { transform: translateY(-50%) scale(1); }
  45% { transform: translateY(-50%) scale(1.35); }
  100% { transform: translateY(-50%) scale(1); }
}

.lu-progress__next {
  margin: var(--gap-1) 0 0;
  font-size: var(--t-caption);
  line-height: var(--t-caption-lh);
  color: var(--muted);
}

/* ---------- gift box: the wheel's stand-in when there are too few prizes ----

   A disc of two sectors reads as a coin toss and of three as a cut pie, so
   below four prizes the screen shows a closed gift instead. The collection
   reward has exactly one prize, so it is always in this mode.
*/

.lu-gift {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.lu-gift svg { width: 46%; height: 46%; display: block; animation: lu-gift-float 3.2s var(--ease-in-out) infinite; }
@keyframes lu-gift-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

/* the collection reward is the one gift that earns gold */
.lu-gift--crown {
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--gold-ink);
}
:root[data-theme='dark'] .lu-gift--crown,
.theme-dark .lu-gift--crown { color: var(--gold); }

.lu-gift__cap {
  margin-top: var(--gap-2);
  text-align: center;
  font-size: var(--t-caption);
  color: var(--muted);
}
