/* ── Missions (brain column, under the coins line) — muted: the card and the brain come first ── */
#missions-block .sb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
#missions-gauge { color: var(--muted); white-space: nowrap; }
#missions-gauge:empty { display: none; }

#missions-list { display: flex; flex-direction: column; }

/* icon | label        |
        | bar          |
        | count | skip |   — the label wraps on as many lines as it needs. */
.mission {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mission:first-child { padding-top: 0; }
.mission:last-child { padding-bottom: 0; border-bottom: none; }
.ms-icon { font-size: 16px; text-align: center; align-self: start; line-height: 1.25; }
.ms-label { grid-column: 2 / -1; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; color: var(--muted); }
.ms-bar {
  grid-column: 2 / -1;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.ms-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--action);
  transition: width .35s ease;
}
.ms-count { grid-column: 2; font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-skip {
  grid-column: 3;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ms-skip:hover:not(.broke) { border-color: var(--action-line); color: var(--text-strong); }
.ms-skip .ico-coin, .ms-skip .price { color: var(--coin); }
/* Out of reach: still readable (it is the price to save up for), plainly not a call to action. */
.ms-skip.broke { color: var(--muted); background: transparent; border-style: dashed; cursor: not-allowed; }

/* A finished track: one quiet line. */
.mission.done .ms-label { color: var(--muted); font-weight: 500; }

/* Just completed: the mission takes the light for a few seconds (spec §5), then the next one
   takes its place. Violet: it is the player's own progress, not a verdict. */
.mission.won .ms-label { color: var(--text-strong); }
.mission.won .ms-fill { background: var(--action-lilac); }
.ms-won { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 22px; font-size: 12px; line-height: 1.3; }
.ms-reward { color: var(--coin); font-size: 13px; font-weight: 800; white-space: nowrap; }

.mission.just-done { animation: ms-pop .7s ease; }
@keyframes ms-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); background: color-mix(in srgb, var(--action) 18%, transparent); border-radius: 10px; box-shadow: var(--halo-action); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mission.just-done { animation: none; }
  .ms-fill { transition: none; }
}

/* Phones: a finger-sized skip button. */
@media (max-width: 720px) {
  .ms-skip { min-height: 36px; padding: 6px 12px; }
  .ms-won { min-height: 36px; }
}
