/* ─── Topbar: Experience card (gold) ─── */
.progress-card.exp {
  /* same layout as .progress-card but star icon up front */
}
.progress-card.exp .progress-fill {
  background: linear-gradient(90deg, #ffd60a 0%, #ffb340 52%, #fff1a8 100%);
  box-shadow:
    0 0 10px rgba(255, 214, 10, 0.46),
    0 0 24px rgba(255, 179, 64, 0.28),
    0 0 46px rgba(255, 241, 168, 0.16);
}
.exp-next {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.exp-next b { color: #FFD60A; font-weight: 600; }

/* ─── Top bar ─── */
.topbar {
  position: fixed; top: 18px; right: 20px;
  z-index: 60;
}
.glass {
  background: rgba(12, 12, 12, 0.6);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.brand {
  padding: 12px 18px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.brand-eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600;
}
.brand-title {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.05;
}
.brand-title em { font-style: normal; }

.progress-card {
  padding: 11px 18px 12px;
  display: flex; align-items: center; gap: 14px;
  width: 314px; /* matches .sidepanel width */
  box-sizing: border-box;
}
.progress-meta {
  display: flex; flex-direction: column; gap: 2px;
  flex: none; /* size to content so the bar shrinks first, never wrapping the text */
}
.progress-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600;
}
.progress-count {
  font-family: var(--font-heading);
  font-size: 22px; color: var(--text);
  font-weight: 900;
  font-variant-numeric: tabular-nums; line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.progress-earned,
.progress-xp {
  background-image: linear-gradient(135deg, #fff4b8 0%, #ffd60a 48%, #ff9f0a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 10px rgba(255, 214, 10, 0.18),
    0 0 24px rgba(255, 179, 64, 0.24),
    0 10px 34px rgba(255, 159, 10, 0.18);
}
.progress-xp { font-size: 13px; }
.progress-unit { color: var(--text-faint); font-size: 13px; margin-left: 0; }
.progress-bar {
  flex: 1; min-width: 40px; height: 8px; border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden; position: relative;
  border: 1px solid var(--border);
  box-shadow:
    inset 0 0 10px rgba(0,0,0,0.55),
    0 0 18px rgba(255, 214, 10, 0.08);
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--completed) 0%, var(--completed-soft) 100%);
  transition: width 0.7s cubic-bezier(.4,1.4,.5,1);
  box-shadow: 0 0 10px var(--completed-glow);
}
.icon-btn {
  appearance: none; border: 1px solid var(--border);
  background: rgba(12, 12, 12, 0.78);
  backdrop-filter: blur(24px);
  color: var(--text-soft);
  font: 500 11.5px/1 'Outfit', sans-serif;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 14px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all 0.18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(28, 28, 28, 0.86); }
.icon-btn svg { width: 14px; height: 14px; }

/* ───────── Side panel ───────── */
.sidepanel {
  position: fixed; right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 314px;
  z-index: 50;
  padding: 22px 22px 20px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 24px 60px rgba(0, 0, 0, 0.5);
}
.sp-cluster {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sp-cluster .dot {
  display: none;
}
.sp-step {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.sp-step-num {
  font-family: var(--font-heading);
  font-size: 42px; line-height: 1; color: var(--sp-clr);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.sp-step-of { font-size: 13px; color: var(--text-faint); }
.sp-title {
  font-family: var(--font-heading);
  font-size: 32px; line-height: 1;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 12px;
  text-wrap: balance;
  letter-spacing: 0;
  background-image: linear-gradient(135deg, #ffffff 0%, #d7d7dc 52%, #8f9098 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 12px rgba(255,255,255,0.12),
    0 0 34px rgba(245,245,247,0.16),
    0 14px 44px rgba(255,255,255,0.08);
}
.sp-time {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.sp-time-num {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(180deg, var(--sp-clr) 20%, color-mix(in oklab, var(--sp-clr) 50%, #fff) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow:
    0 0 10px color-mix(in oklab, var(--sp-clr) 28%, transparent),
    0 0 24px color-mix(in oklab, var(--sp-clr) 22%, transparent),
    0 10px 34px color-mix(in oklab, var(--sp-clr) 18%, transparent);
}
.sp-time-unit {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sp-hint {
  font-size: 13.5px; line-height: 1.55; color: var(--text-soft);
  margin-bottom: 12px;
  text-wrap: pretty;
}
.sp-resources {
  appearance: none; border: none;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  margin-bottom: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-soft);
  font: 600 12px/1 'Outfit', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.sp-resources:hover {
  background: rgba(255,255,255,0.085);
  border-color: rgba(255,255,255,0.22);
  color: var(--text);
  transform: translateY(-1px);
}
.sp-resources:active { transform: translateY(0); }
.sp-cta {
  appearance: none; border: none;
  width: 100%;
  background: linear-gradient(180deg, var(--completed-soft) 0%, var(--completed) 100%);
  color: #07210e;
  font: 700 13px/1 'Outfit', sans-serif;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 15px 18px; border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(48, 209, 88, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.sp-cta:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 28px rgba(48, 209, 88, 0.5), inset 0 1px 0 rgba(255,255,255,0.25); }
.sp-cta:active { transform: translateY(1px); }
.sp-cta.test {
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--sp-clr) 68%, #fff) 0%,
      var(--sp-clr) 52%,
      color-mix(in oklab, var(--sp-clr) 82%, #000) 100%);
  color: #07080a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 3px 18px color-mix(in oklab, var(--sp-clr) 30%, transparent);
}
.sp-cta.test:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 4px 22px color-mix(in oklab, var(--sp-clr) 42%, transparent);
}
.sp-cta.done {
  background: rgba(48, 209, 88, 0.12);
  color: var(--completed-soft);
  box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.35);
  cursor: default;
}
.sp-cta.done:hover { transform: none; filter: none; }
.sp-cta.locked {
  background: rgba(255,255,255,0.06);
  color: var(--text-faint);
  cursor: default;
  box-shadow: none;
}
.sp-cta.locked:hover { transform: none; filter: none; box-shadow: none; }
.sp-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-faint);
}
.kbd {
  font-family: 'Outfit', sans-serif;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}

/* ───────── Cluster legend (bottom-left) ───────── */
.legend {
  position: fixed; left: 20px; bottom: 22px;
  z-index: 50; padding: 14px 16px;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 9px;
  min-width: 184px;
}
.legend-title {
  font-family: var(--font-heading);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600;
  margin-bottom: 2px;
}
.legend-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text);
  white-space: nowrap;
}
.legend-swatch {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--legend-c, var(--text-faint));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.22),
    0 0 0 1px rgba(0,0,0,0.72),
    0 0 5px color-mix(in oklab, var(--legend-c) 34%, transparent);
  flex-shrink: 0;
}
.legend-row.done .legend-swatch {
  background: var(--completed);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.2),
    0 0 0 1px rgba(0,0,0,0.72),
    0 0 5px rgba(48, 209, 88, 0.28);
}
