/* Quests (v6): inside the sparks sheet (.sp), the achievements sheet and the Today line. Prefix .qs-
   js/screens/quests-sheet.js. The look follows sparks.css: hairlines, soft tiles, the app colour for what is done. */

/* shared bits */
.qs-ic { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: rgb(var(--fg-rgb) / .06); color: var(--muted); }
.qs-ic svg { width: 18px; height: 18px; }
.qs-ic--big { width: 42px; height: 42px; }
.qs-ic--big svg { width: 21px; height: 21px; }
.qs-bar { display: block; height: 6px; border-radius: 999px; background: rgb(var(--fg-rgb) / .1); overflow: hidden; }
.qs-bar i { display: block; height: 100%; border-radius: inherit; background: rgb(var(--cta-rgb)); transition: width .4s var(--ease-out, ease); }
.qs-reward { display: inline-flex; align-items: center; gap: 2px; flex: none; padding: 3px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: rgb(var(--fg-rgb) / .07); color: var(--fg); }
.qs-reward .cur, .qs-level__num .cur { width: .74em; height: .86em; margin-left: 2px; }
.qs-done { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 13px; font-weight: 650; color: rgb(var(--cta-rgb)); white-space: nowrap; }
.qs-done svg { width: 15px; height: 15px; stroke-width: 2.2; }
.qs-note { margin: 6px 0 0; font-size: var(--t-small); line-height: 1.4; color: var(--faint); }

/* level line, right under the balance */
.qs-level { margin-top: 18px; display: grid; gap: 8px; }
.qs-level__top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.qs-level__name { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.qs-level__num { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* task cards: today and this week, side by side when there is room */
.qs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.qs-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border-radius: 18px;
  background: rgb(var(--fg-rgb) / .045); box-shadow: inset 0 0 0 1px var(--line); }
.qs-card.is-done { background: rgb(var(--cta-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--cta-rgb) / .35); }
.qs-card.is-done .qs-ic { background: rgb(var(--cta-rgb) / .18); color: rgb(var(--cta-rgb)); }
.qs-card.is-missed { opacity: .7; }
.qs-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qs-card__kicker { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.qs-card__main { display: flex; align-items: flex-start; gap: 10px; }
.qs-card__text { margin: 6px 0 0; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: manual; min-width: 0; }
.qs-card__state { margin: auto 0 0; font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }

/* season track: 10 steps */
.qs-track { list-style: none; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; padding: 0; position: relative; }
.qs-track::before { content: ""; position: absolute; left: 5%; right: 5%; top: 50%; height: 2px; margin-top: -1px; background: var(--line); }
.qs-dot { position: relative; display: grid; place-items: center; justify-self: center; width: min(28px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--faint); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.qs-dot.is-on { background: rgb(var(--cta-rgb)); box-shadow: none; color: #fff; }
.qs-dot.is-now { box-shadow: inset 0 0 0 2px rgb(var(--cta-rgb)), 0 0 0 4px rgb(var(--cta-rgb) / .18); color: var(--fg); }
.qs-dot svg { width: 60%; height: 60%; }
.qs-dot.is-badge:not(.is-on) { color: var(--muted); }
.qs-nowrap { white-space: nowrap; }
.qs-season__sub { margin: 12px 0 0; font-size: 14px; color: var(--fg); font-variant-numeric: tabular-nums; }

/* achievements entry */
.qs-achsec .qs-achrow { margin-top: 0; }
.qs-achrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; font: inherit; color: var(--fg);
  background: rgb(var(--fg-rgb) / .045); box-shadow: inset 0 0 0 1px var(--line); -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, transform .15s ease; }
@media (hover: hover) { .qs-achrow:hover { background: rgb(var(--fg-rgb) / .075); } }
.qs-achrow:active { transform: scale(.985); }
.qs-achrow > svg { width: 18px; height: 18px; color: var(--faint); }
.qs-achrow .qs-ic { color: rgb(var(--cta-rgb)); background: rgb(var(--cta-rgb) / .14); }
.qs-achrow__main { display: grid; gap: 2px; min-width: 0; }
.qs-achrow__title { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.qs-achrow__sub { font-size: var(--t-small); color: var(--muted); line-height: 1.35; overflow-wrap: break-word; }
.qs-achrow__n { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the achievements sheet */
.qs-achhead { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qs-achlist { list-style: none; margin: 0; padding: 0; }
.qs-ach { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qs-ach.is-on .qs-ic { background: rgb(var(--cta-rgb) / .16); color: rgb(var(--cta-rgb)); }
.qs-ach.is-locked .qs-ic { opacity: .55; }
.qs-ach.is-locked .qs-ach__name { color: var(--muted); }
.qs-ach__main { min-width: 0; }
.qs-ach__name { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; overflow-wrap: break-word; }
.qs-ach__desc { margin: 2px 0 0; font-size: var(--t-small); color: var(--muted); line-height: 1.35; overflow-wrap: break-word; }
.qs-ach__prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 8px; }
.qs-ach__n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qs-ach.is-locked .qs-reward { color: var(--muted); }

/* the Today line (mounted by today.js) */
.qs-line { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px;
  cursor: pointer; text-align: left; font: inherit; color: var(--fg); background: rgb(var(--fg-rgb) / .045); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
@media (hover: hover) { .qs-line:hover { background: rgb(var(--fg-rgb) / .075); } }
.qs-line:focus-visible, .qs-achrow:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.qs-line__text { flex: 1; min-width: 0; font-size: 15px; font-weight: 550; line-height: 1.3; overflow-wrap: break-word; }
.qs-line__n { flex: none; font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.qs-line.is-done .qs-ic { background: rgb(var(--cta-rgb) / .16); color: rgb(var(--cta-rgb)); }
.qs-line.is-done .qs-line__text { color: var(--muted); }
.qs-line.is-missed { opacity: .65; }

@media (prefers-reduced-motion: reduce) { .qs-bar i, .qs-achrow, .qs-line { transition: none; } }

/* rewards waiting to be claimed (2026-11-16): nothing is claimed by itself; a row each with Claim, and Claim all */
.qs-rewards { margin-top: 18px; padding: 14px; border-radius: 20px; background: rgb(var(--cta-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--cta-rgb) / .35); }
.qs-rewards .sp-sec__title { margin: 0; border: 0; padding: 0; outline: none; }
.qs-rewards__head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.qs-waitlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.qs-wait { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qs-wait .qs-ic { background: rgb(var(--cta-rgb) / .18); color: rgb(var(--cta-rgb)); }
.qs-wait__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qs-wait__kind { font-size: 12px; color: var(--muted); }
.qs-wait__name { min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; }
.qs-claim { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qs-claimall { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qs-card .qs-claim { min-height: 32px; padding: 0 12px; font-size: 13px; }
.qs-ach .qs-claim { align-self: center; }
@media (max-width: 360px) { .qs-wait { flex-wrap: wrap; } .qs-wait .qs-claim { margin-left: 44px; } }
