/* ═══════════════════════════════════════════════════════════
   REFSKIN — reference-image redesign of the home experience.
   Three-column shell (side nav | feed | community rail),
   deep navy-violet cinema, glass panels with violet/blue
   illumination, restrained neon. Loaded after immersive.css
   so it owns the final look. Rails collapse <1024px; the
   existing mobile experience is untouched.
   ═══════════════════════════════════════════════════════════ */

:root {
  --fx-panel:       oklch(0.16 0.035 275 / 0.72);
  --fx-panel-hi:    oklch(0.20 0.045 275 / 0.85);
  --fx-line:        oklch(0.40 0.06 280 / 0.35);
  --fx-line-hi:     oklch(0.62 0.16 285 / 0.55);
  --fx-ink:         oklch(0.97 0.005 270);
  --fx-ink-dim:     oklch(0.72 0.02 275);
  --fx-violet:      oklch(0.62 0.24 290);
  --fx-blue:        oklch(0.64 0.20 262);
  --fx-green:       oklch(0.78 0.20 150);
  --fx-gold:        oklch(0.82 0.16 85);
  --fx-radius:      18px;
  --fx-glow:        0 8px 28px oklch(0.55 0.22 290 / 0.28);
}

/* ── Shell grid ───────────────────────────────────────────── */
.fx-shell {
  /* One authority for the rail width. The --page / --quests variants are
     declared further down the file at equal specificity, so a plain
     `grid-template-columns` in the breakpoints below never reached them —
     they stayed at 236px from 1024-1279px while the base shell narrowed
     to 220px. A custom property inherits instead of competing. */
  --fx-rail: 236px;
  display: grid;
  grid-template-columns: var(--fx-rail) minmax(0, 1fr) 372px;
  gap: clamp(16px, 2vw, 28px);
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 clamp(12px, 1.6vw, 24px);
  align-items: start;
}
.fx-shell .feed-screen { min-width: 0; }

@media (max-width: 1279px) {
  .fx-shell { --fx-rail: 220px; grid-template-columns: var(--fx-rail) minmax(0, 1fr); }
  .fx-right { display: none; }
}
@media (max-width: 1023px) {
  .fx-shell { display: block; padding: 0; }
  .fx-side, .fx-right { display: none; }
}

/* ── Feed hero ────────────────────────────────────────────── */
.fx-hero { padding: clamp(14px, 2vw, 22px) 0 4px; }
.fx-hero-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  color: var(--fx-ink);
  margin: 0;
  /* refskin owns titles: undo the gradient-text treatment */
  background: none; -webkit-text-fill-color: currentColor;
  filter: none; animation: none;
}
.fx-hero-accent {
  background: linear-gradient(95deg, var(--fx-violet), var(--fx-blue) 60%, oklch(0.75 0.15 220));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.fx-hero-sub {
  margin: 4px 0 14px;
  color: var(--fx-ink-dim);
  font-size: 14.5px;
}
.fx-hero-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.fx-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.fx-tab {
  border: 1px solid transparent; background: transparent;
  color: var(--fx-ink-dim);
  font: 600 13.5px var(--font-body);
  padding: 8px 18px; border-radius: 999px;
  transition: color .18s ease, background .18s ease, box-shadow .25s ease;
}
.fx-tab:hover { color: var(--fx-ink); }
.fx-tab.on {
  color: #fff;
  background: linear-gradient(120deg, oklch(0.40 0.16 290 / 0.85), oklch(0.34 0.12 268 / 0.85));
  border-color: var(--fx-line-hi);
  box-shadow: inset 0 0 14px oklch(0.62 0.24 290 / 0.25), 0 2px 10px oklch(0 0 0 / 0.3);
}
.fx-zone-select {
  appearance: none; -webkit-appearance: none;
  background: var(--fx-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a9a6c9' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--fx-line) !important;
  border-radius: 999px !important;
  color: var(--fx-ink);
  font: 600 13px var(--font-body);
  padding: 9px 36px 9px 16px !important;
  cursor: pointer;
}
.fx-zone-select:hover { border-color: var(--fx-line-hi) !important; }
.fx-filter-empty { padding: 40px 0; }

/* ── Left sidebar ─────────────────────────────────────────── */
.fx-side {
  position: sticky; top: calc(var(--nav-h) + 14px);
  display: flex; flex-direction: column; gap: 14px;
  max-height: calc(100dvh - var(--nav-h) - 28px);
  overflow-y: auto; scrollbar-width: none;
  padding: 4px 2px 10px;
  /* Cards inside the rail size to the rail, not the viewport. With vw the
     ring rendered 50px at 1024 and 59px at 1279 inside the *same* 220px
     rail. Same idiom as quests.css: px floor, cqw fluid. */
  container-type: inline-size;
}
.fx-side::-webkit-scrollbar { display: none; }
.fx-side-nav {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  padding: 10px;
  backdrop-filter: blur(16px);
}
.fx-side-group {
  font: 600 10.5px var(--font-labels);
  letter-spacing: 0.14em;
  color: var(--fx-ink-dim);
  opacity: 0.75;
  padding: 14px 10px 6px;
}
.fx-side-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent;
  color: var(--fx-ink-dim);
  font: 500 14px var(--font-body);
  padding: 10px 10px; border-radius: 12px;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.fx-side-item:hover { background: oklch(1 0 0 / 0.05); color: var(--fx-ink); }
.fx-side-item:active { transform: scale(0.985); }
.fx-side-item.on {
  color: #fff;
  background: linear-gradient(115deg, oklch(0.36 0.15 290 / 0.75), oklch(0.28 0.10 268 / 0.7));
  border-color: var(--fx-line-hi);
  box-shadow: inset 0 0 16px oklch(0.62 0.24 290 / 0.22);
}
.fx-side-ico {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: oklch(1 0 0 / 0.055);
  color: inherit; flex-shrink: 0;
}
.fx-side-item.on .fx-side-ico { background: oklch(0.62 0.24 290 / 0.3); }
.fx-side-label { flex: 1; min-width: 0; }
.fx-side-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--fx-violet), var(--fx-blue));
  color: #fff; font: 700 11px var(--font-body);
  box-shadow: 0 0 10px oklch(0.62 0.24 290 / 0.5);
}
.fx-side-arrow { color: oklch(0.75 0.15 285); display: grid; place-items: center; }

/* City Planner card */
.fx-planner {
  border: 1px solid var(--fx-line);
  background:
    radial-gradient(120% 90% at 80% 0%, oklch(0.30 0.12 285 / 0.5), transparent 60%),
    var(--fx-panel);
  border-radius: var(--fx-radius);
  /* every dimension below scales with the rail instead of being pinned to
     the 236px case — the rail is 220px from 1024-1279px */
  padding: clamp(11px, 5.8cqw, 14px);
  text-align: left; color: var(--fx-ink);
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 4px clamp(9px, 5.2cqw, 12px);
  align-items: center;
  min-width: 0;
  backdrop-filter: blur(16px);
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s var(--spring);
}
/* grid items default to min-width:auto and refuse to shrink below their
   content — without this the bar track is pushed out by long XP values */
.fx-planner > * { min-width: 0; }
.fx-planner:hover { border-color: var(--fx-line-hi); box-shadow: var(--fx-glow); transform: translateY(-2px); }
.fx-planner-head {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; min-width: 0;
}
.fx-planner-title {
  font: 700 clamp(13.5px, 6.6cqw, 15px) var(--font-body);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-planner-level {
  font: 600 clamp(10.5px, 5.1cqw, 11.5px) var(--font-labels);
  color: var(--fx-ink-dim);
  flex: 0 0 auto; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fx-planner-ring {
  --fx-ring: clamp(50px, 26.5cqw, 62px);
  width: var(--fx-ring); height: var(--fx-ring);
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--fx-violet) calc(var(--fx-pct, 0) * 1%), oklch(1 0 0 / 0.09) 0);
  display: grid; place-items: center;
}
.fx-planner-ring-core {
  width: calc(var(--fx-ring, 62px) - 12px);
  height: calc(var(--fx-ring, 62px) - 12px);
  border-radius: 50%;
  background: oklch(0.14 0.03 272);
  display: grid; place-items: center;
  color: oklch(0.80 0.12 285);
}
.fx-planner-bar {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: oklch(1 0 0 / 0.08); align-self: end; margin-bottom: 2px;
}
.fx-planner-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--fx-violet), var(--fx-blue));
  border-radius: inherit;
}
.fx-planner-xp {
  grid-column: 1 / -1;
  font: 600 clamp(12px, 5.8cqw, 13px) var(--font-body);
  font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-planner-next {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-width: 0;
  font: 500 clamp(11px, 5.3cqw, 12px) var(--font-body);
  color: var(--fx-ink-dim);
  font-variant-numeric: tabular-nums;
}
.fx-planner-gift {
  color: var(--fx-gold);
  flex: 0 0 auto;
  display: grid; place-items: center;
}

/* ── Right rail ───────────────────────────────────────────── */
.fx-right {
  position: sticky; top: calc(var(--nav-h) + 14px);
  display: grid; grid-template-columns: 1fr 96px; gap: 14px;
  max-height: calc(100dvh - var(--nav-h) - 28px);
  align-items: start;
  padding-bottom: 10px;
}
.fx-right-col {
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; scrollbar-width: none;
  max-height: calc(100dvh - var(--nav-h) - 40px);
}
.fx-right-col::-webkit-scrollbar { display: none; }

.fx-panel {
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  padding: 14px;
  backdrop-filter: blur(16px);
}
.fx-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.fx-panel-head h3 { margin: 0; font: 700 15px var(--font-body); color: var(--fx-ink); }
.fx-panel-more {
  border: none; background: none;
  color: oklch(0.72 0.15 285);
  font: 600 12px var(--font-body);
  transition: color .15s ease;
}
.fx-panel-more:hover { color: oklch(0.85 0.12 285); text-decoration: underline; }

/* Trending rows */
.fx-trend-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: none; background: transparent;
  padding: 7px 6px; border-radius: 12px;
  transition: background .15s ease, transform .18s ease;
}
.fx-trend-row:hover { background: oklch(1 0 0 / 0.05); transform: translateX(3px); }
.fx-trend-rank {
  width: 16px; text-align: center;
  font: 700 13px var(--font-labels); color: var(--fx-ink-dim);
}
.fx-trend-thumb {
  width: 44px; height: 34px; border-radius: 8px; overflow: hidden;
  background: oklch(1 0 0 / 0.06);
  display: grid; place-items: center; color: var(--fx-ink-dim);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.08);
}
.fx-trend-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fx-trend-meta { min-width: 0; display: grid; }
.fx-trend-title {
  font: 600 13.5px var(--font-body); color: var(--fx-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-trend-sub { font: 500 12px var(--font-body); color: var(--fx-green); }

/* Mission rows */
.fx-mission-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: none; background: transparent;
  padding: 8px 6px; border-radius: 12px;
  transition: background .15s ease;
}
.fx-mission-row:hover { background: oklch(1 0 0 / 0.05); }
.fx-mission-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: oklch(0.62 0.24 290 / 0.16);
  color: oklch(0.78 0.14 288);
}
.fx-mission-ico.done { background: oklch(0.78 0.20 150 / 0.16); color: var(--fx-green); }
.fx-mission-meta { flex: 1; min-width: 0; display: grid; gap: 5px; }
.fx-mission-top { display: flex; justify-content: space-between; gap: 8px; }
.fx-mission-title {
  font: 600 13px var(--font-body); color: var(--fx-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-mission-count { font: 600 11.5px var(--font-labels); color: var(--fx-ink-dim); }
.fx-mission-bar {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: oklch(1 0 0 / 0.08);
}
.fx-mission-bar span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--fx-violet), var(--fx-blue));
  transition: width .5s var(--smooth);
}
.fx-mission-bar.done span { background: var(--fx-green); }
.fx-mission-xp { font: 700 11px var(--font-labels); color: var(--fx-gold); flex-shrink: 0; }

/* Activity rows */
.fx-act-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 12px; }
.fx-act-row:hover { background: oklch(1 0 0 / 0.04); }
.fx-act-ava {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: oklch(0.62 0.24 290 / 0.18);
  display: grid; place-items: center; color: oklch(0.78 0.14 288);
  box-shadow: 0 0 0 1.5px oklch(0.62 0.24 290 / 0.4);
}
.fx-act-ava img { width: 100%; height: 100%; object-fit: cover; }
.fx-act-meta { min-width: 0; display: grid; }
.fx-act-who { font: 600 13px var(--font-body); color: var(--fx-ink); }
.fx-act-what {
  font: 500 12px var(--font-body); color: var(--fx-ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Create CTA + points + quick actions column */
.fx-actions-col {
  display: flex; flex-direction: column; gap: 14px; align-items: stretch;
  position: sticky; top: 0;
}
.fx-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 10px; border-radius: 999px;
  border: 1px solid oklch(0.72 0.22 285 / 0.7);
  background: linear-gradient(115deg, oklch(0.58 0.25 295), oklch(0.56 0.22 265));
  color: #fff; font: 700 14px var(--font-body);
  box-shadow: 0 6px 22px oklch(0.58 0.25 290 / 0.45), inset 0 1px 0 oklch(1 0 0 / 0.25);
  transition: transform .2s var(--spring), box-shadow .25s ease;
}
.fx-create:hover { transform: translateY(-2px); box-shadow: 0 10px 30px oklch(0.58 0.25 290 / 0.6); }
.fx-create:active { transform: scale(0.96); }

.fx-points {
  border: 1px solid var(--fx-line);
  background:
    radial-gradient(100% 80% at 50% 0%, oklch(0.32 0.14 290 / 0.55), transparent 70%),
    var(--fx-panel);
  border-radius: 20px;
  padding: 16px 8px 12px;
  display: grid; justify-items: center; gap: 4px;
  color: var(--fx-ink);
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s var(--spring);
}
.fx-points:hover { border-color: var(--fx-line-hi); box-shadow: var(--fx-glow); transform: translateY(-2px); }
/* Points gem — crystal facets, idle breathe, travelling glint.
   Uses the independent translate/rotate/scale properties so the 45deg
   diamond, the float keyframes and the hover scale never fight over
   a single `transform`. */
.fx-points-gem {
  position: relative;
  width: 46px; height: 46px; border-radius: 14px; rotate: 45deg;
  display: grid; place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 110% at 22% 18%, oklch(0.78 0.16 305 / 0.85), transparent 55%),
    linear-gradient(135deg, oklch(0.58 0.25 297), oklch(0.46 0.19 262));
  margin-bottom: 6px;
  animation:
    fxpt-gem-float 4.6s ease-in-out infinite,
    fxpt-gem-glow  3.2s ease-in-out infinite;
  transition: scale .28s var(--spring), filter .28s ease;
  will-change: translate, scale;
}
/* facets: lit from the top-left, deep in the bottom-right */
.fx-points-gem::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(135deg, oklch(1 0 0 / 0.34), transparent 44%),
    linear-gradient(315deg, oklch(0.24 0.10 272 / 0.46), transparent 40%);
}
/* specular glint that sweeps the facet, then rests */
.fx-points-gem::before {
  content: ''; position: absolute; inset: -45%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg,
    transparent 40%,
    oklch(1 0 0 / 0.50) 48%,
    oklch(1 0 0 / 0.88) 52%,
    transparent 60%);
  translate: -130% 0;
  animation: fxpt-gem-sheen 4.6s ease-in-out infinite;
}
.fx-points-gem > * { rotate: -45deg; color: #fff; position: relative; z-index: 2; }

@keyframes fxpt-gem-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -3px; }
}
@keyframes fxpt-gem-glow {
  0%, 100% {
    box-shadow:
      0 0 18px oklch(0.58 0.25 290 / 0.45),
      inset 0 0 0 1px oklch(1 0 0 / 0.16);
  }
  50% {
    box-shadow:
      0 0 34px oklch(0.62 0.27 292 / 0.75),
      0 0 60px oklch(0.60 0.22 268 / 0.32),
      inset 0 0 0 1px oklch(1 0 0 / 0.30);
  }
}
@keyframes fxpt-gem-sheen {
  0%,  52% { translate: -130% 0; }
  84%, 100% { translate: 130% 0; }
}

.fx-points:hover .fx-points-gem { scale: 1.1; filter: brightness(1.12) saturate(1.18); }
.fx-points:hover .fx-points-gem::before { animation-duration: 1.6s; }
.fx-points:active .fx-points-gem { scale: 0.94; }

.fx-points-n {
  font: 700 17px var(--font-body);
  transition: color .25s ease, text-shadow .25s ease;
}
.fx-points:hover .fx-points-n { text-shadow: 0 0 14px oklch(0.68 0.22 292 / 0.7); }
.fx-points-label { font: 600 10.5px var(--font-labels); color: var(--fx-ink-dim); letter-spacing: 0.06em; }

.fx-quick { display: flex; flex-direction: column; gap: 10px; }
.fx-quick-btn {
  border: 1px solid var(--fx-line);
  background: var(--fx-panel);
  border-radius: 18px;
  padding: 12px 6px 10px;
  display: grid; justify-items: center; gap: 6px;
  color: var(--fx-ink-dim);
  backdrop-filter: blur(14px);
  transition: color .18s ease, border-color .2s ease, box-shadow .25s ease, transform .2s var(--spring);
}
.fx-quick-btn:hover {
  color: var(--fx-ink); border-color: var(--fx-line-hi);
  box-shadow: var(--fx-glow); transform: translateY(-2px);
}
.fx-quick-btn:active { transform: scale(0.94); }
.fx-quick-ico {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(0.62 0.24 290 / 0.16);
  color: oklch(0.80 0.13 286);
}
.fx-quick-btn:hover .fx-quick-ico { background: oklch(0.62 0.24 290 / 0.3); color: #fff; }
.fx-quick-label { font: 600 10.5px var(--font-body); text-align: center; }

/* ── Feed card refinements toward the reference ───────────── */
.fx-shell .feed-card {
  border-radius: 20px;
  background:
    linear-gradient(180deg, oklch(0.17 0.035 275 / 0.85), oklch(0.13 0.03 272 / 0.9));
  border: 1px solid var(--fx-line);
  animation: none; /* calm the breathing glow inside the shell */
  box-shadow: 0 14px 40px oklch(0 0 0 / 0.4);
}
.fx-shell .feed-card:hover {
  border-color: var(--fx-line-hi);
  box-shadow: 0 18px 48px oklch(0 0 0 / 0.5), var(--fx-glow);
}
/* `width: auto`, not the inherited `width: 100%` from .feed-media. A 100%-wide
   box plus horizontal margins overflows its container by exactly the margins,
   so the media sat 24px off-centre and its right rounded corner was clipped
   flat by .feed-card's `overflow: hidden`. Auto width fills the content box
   minus the margins, giving symmetric 12px gutters at every breakpoint. */
.fx-shell .feed-media { border-radius: 14px; overflow: hidden; margin: 0 var(--feed-gutter, 12px); width: auto; }
.fx-shell .feed-media::after { border-radius: 14px; }

/* Before/After — bottom overlay pills like the reference */
.fx-shell .feed-ba {
  position: absolute; left: 14px; bottom: 12px; top: auto; right: auto;
  display: inline-flex; gap: 8px;
  background: none; border: none; padding: 0;
}
.fx-shell .feed-ba-btn {
  border-radius: 999px;
  padding: 7px 16px;
  font: 700 11.5px var(--font-labels);
  letter-spacing: 0.08em; text-transform: uppercase;
  background: oklch(0.10 0.02 270 / 0.72);
  border: 1px solid oklch(1 0 0 / 0.18);
  color: oklch(0.92 0.01 270);
  backdrop-filter: blur(8px);
  transition: background .18s ease, color .18s ease, box-shadow .2s ease;
}
.fx-shell .feed-ba-btn.on {
  background: oklch(1 0 0 / 0.92);
  border-color: oklch(1 0 0 / 0.5);
  color: oklch(0.18 0.02 270);
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.4);
}

/* View in 3D/AR pill */
.fx-shell .feed-act-3d {
  border: none !important;
  background: linear-gradient(135deg, oklch(0.68 0.28 295), oklch(0.60 0.26 288)) !important;
  color: #fff !important;
  border-radius: 999px !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  font: 600 13px var(--font-body) !important;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.22),
    0 4px 14px oklch(0.68 0.28 295 / 0.35);
  transition: box-shadow .2s ease, transform .2s var(--spring), filter .18s ease;
}
.fx-shell .feed-act-3d:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.28), 0 6px 20px oklch(0.68 0.28 295 / 0.5);
  transform: translateY(-1px);
}

/* Funding bar → green like the reference */
.fx-shell .feed-funding-bar span {
  background: linear-gradient(90deg, oklch(0.70 0.19 152), oklch(0.82 0.20 140)) !important;
}
.fx-shell .feed-funding { color: var(--fx-green); font-weight: 600; }

/* 3D·AR chip */
.fx-shell .feed-3d-chip {
  /* Status, not an action — lime keeps it distinct from the violet
     "View in 3D" button so the two never read as competing CTAs. */
  border-radius: 999px;
  border: 1px solid oklch(0.88 0.24 135 / 0.32);
  background: oklch(0.12 0.02 270 / 0.6);
  color: var(--lime);
  font: 600 10.5px var(--font-labels);
  letter-spacing: 0.04em;
  animation: none;
}
.fx-shell .feed-3d-chip:hover {
  background: oklch(0.88 0.24 135 / 0.16);
  border-color: oklch(0.88 0.24 135 / 0.5);
}

/* Comment composer pill */
.fx-shell .feed-compose-input {
  border-radius: 999px !important;
  background: oklch(1 0 0 / 0.05) !important;
  border-color: var(--fx-line) !important;
}
.fx-shell .feed-compose-post { border-radius: 999px !important; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fx-create, .fx-planner, .fx-points, .fx-quick-btn, .fx-trend-row,
  .fx-side-item, .fx-tab { transition: none; }
  .fx-points-gem, .fx-points-gem::before { animation: none; }
  .fx-points-gem { translate: none; }
  .fx-points-gem::before { opacity: 0; }
}

/* ── Bob: bottom-right, per the reference ─────────────────── */
.mascot-wrap {
  left: auto;
  right: max(14px, env(safe-area-inset-right, 0px));
  align-items: flex-end;
}
@media (max-width: 1023px) {
  /* keep clear of the mobile tab bar */
  .mascot-wrap { bottom: calc(var(--mobile-nav-h, 70px) + 10px); }
}

/* ── Breakpoints (kept LAST so they win the cascade) ──────── */
@media (max-width: 1279px) {
  .fx-shell { --fx-rail: 220px; grid-template-columns: var(--fx-rail) minmax(0, 1fr); }
  .fx-right { display: none; }
}
@media (max-width: 1023px) {
  .fx-shell { display: block; padding: 0; }
  .fx-side, .fx-right { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   MISSIONS (City Missions) — reference pass.
   Shell + night-city path + gold reward panel. All selectors
   scoped under .fx-shell--quests / .fx-quests.
   ═══════════════════════════════════════════════════════════ */

/* Section pages: left rail + content, same rhythm as Missions */
.fx-shell--page { grid-template-columns: var(--fx-rail) minmax(0, 1fr); }
.fx-page-col { min-width: 0; }

.fx-shell--quests { grid-template-columns: var(--fx-rail) minmax(0, 1fr); }
.fx-shell--quests .quest-studio { min-width: 0; }
.fx-quests .quest-studio__inner { max-width: 1240px; }
.fx-quests .quest-map-wrap { max-width: none; }
@media (min-width: 1100px) {
  .fx-quests .quest-map-wrap {
    grid-template-columns: minmax(0, 1.3fr) minmax(330px, 1fr);
    column-gap: 26px;
  }
}

/* Hero: bold sans, calm sub */
.fx-quests .quest-hero__title {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(30px, 3vw, 42px);
  background: none; -webkit-text-fill-color: currentColor;
  color: var(--fx-ink);
  filter: none; animation: none;
}
.fx-quests .quest-hero__sub { color: var(--fx-ink-dim); }

/* Stat tiles: icon medallion + value + sub + bottom bar */
.fx-quests .quest-stats { gap: 14px; }
.fx-quests .fxq-stat {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 16px 18px;
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s var(--spring);
}
.fx-quests .fxq-stat:hover { border-color: var(--fx-line-hi); box-shadow: var(--fx-glow); transform: translateY(-2px); }
.fxq-stat-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
}
.fxq-stat-ico--violet { background: oklch(0.55 0.24 295 / 0.2); color: oklch(0.75 0.20 295); box-shadow: 0 0 18px oklch(0.60 0.25 295 / 0.3); }
.fxq-stat-ico--gold   { background: oklch(0.75 0.16 85 / 0.18);  color: var(--fx-gold);           box-shadow: 0 0 18px oklch(0.78 0.16 85 / 0.3); }
.fxq-stat-ico--cyan   { background: oklch(0.70 0.14 220 / 0.18); color: oklch(0.80 0.13 215);     box-shadow: 0 0 18px oklch(0.72 0.14 220 / 0.3); }
.fxq-stat-ico--green  { background: oklch(0.72 0.17 150 / 0.16); color: var(--fx-green);          box-shadow: 0 0 18px oklch(0.75 0.18 150 / 0.3); }
.fxq-stat-meta { min-width: 0; display: grid; gap: 2px; }
.fx-quests .fxq-stat .quest-stat__lbl { order: -1; }
.fxq-stat-sub { font: 500 12px var(--font-body); color: var(--fx-ink-dim); }
.fxq-stat-chev { margin-left: auto; align-self: center; color: var(--fx-ink-dim); }
.fxq-stat-bar {
  position: absolute; left: 14px; right: 14px; bottom: 8px; height: 4px;
  border-radius: 999px; background: oklch(1 0 0 / 0.08); overflow: hidden;
}
.fxq-stat-bar span { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--smooth); }
.fxq-stat-bar--violet span { background: linear-gradient(90deg, oklch(0.60 0.25 300), oklch(0.62 0.20 265)); }
.fxq-stat-bar--cyan span   { background: oklch(0.75 0.14 215); }
.fxq-stat-bar--green span  { background: var(--fx-green); }

/* Seg tabs → reference pill row */
.fx-quests .quest-seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.fx-quests .quest-seg__btn {
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 13.5px var(--font-body);
}
.fx-quests .quest-seg__btn.on {
  color: #fff;
  background: linear-gradient(120deg, oklch(0.42 0.17 290 / 0.9), oklch(0.36 0.13 268 / 0.9));
  border-color: var(--fx-line-hi);
  box-shadow: inset 0 0 14px oklch(0.62 0.24 290 / 0.25);
}

/* Night-city map card */
.fx-quests .quest-map {
  border-radius: 20px;
  border: 1px solid var(--fx-line);
  background:
    radial-gradient(120% 70% at 70% 0%, oklch(0.30 0.10 285 / 0.55), transparent 55%),
    radial-gradient(90% 60% at 15% 90%, oklch(0.26 0.09 260 / 0.5), transparent 60%),
    linear-gradient(180deg, oklch(0.15 0.04 278), oklch(0.11 0.03 270));
  box-shadow: inset 0 0 60px oklch(0 0 0 / 0.45), 0 14px 40px oklch(0 0 0 / 0.4);
  overflow: hidden;
}

/* Legend chip */
.fxq-legend {
  position: absolute; left: 14px; bottom: 12px;
  display: grid; gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: oklch(0.10 0.02 270 / 0.75);
  border: 1px solid oklch(1 0 0 / 0.12);
  backdrop-filter: blur(8px);
  font: 500 11.5px var(--font-body);
  color: oklch(0.88 0.01 270);
  z-index: 5; pointer-events: none;
}
.fxq-legend span { display: inline-flex; align-items: center; gap: 8px; }
.fxq-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fxq-dot--done { background: oklch(0.75 0.19 150); box-shadow: 0 0 8px oklch(0.75 0.19 150 / 0.7); }
.fxq-dot--cur  { background: var(--fx-gold); box-shadow: 0 0 8px oklch(0.80 0.16 85 / 0.7); }
.fxq-dot--lock { background: oklch(0.45 0.01 270); }

/* Reward panel — gold frame like the reference */
.fx-quests .quest-sheet {
  border-radius: 20px;
  border: 1px solid oklch(0.70 0.14 85 / 0.45);
  background:
    radial-gradient(120% 80% at 85% 0%, oklch(0.35 0.10 85 / 0.20), transparent 55%),
    linear-gradient(180deg, oklch(0.16 0.035 275 / 0.92), oklch(0.12 0.03 270 / 0.95));
  box-shadow: 0 0 0 1px oklch(0.75 0.15 85 / 0.12), 0 14px 40px oklch(0 0 0 / 0.45);
}
.fx-quests .quest-sheet__lvl { color: var(--fx-gold); font-weight: 700; }
.fxq-sheet-toprow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fx-quests .quest-sheet__title {
  font-family: var(--font-body); font-weight: 800;
  font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.02em;
}
.fxq-xp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(120deg, oklch(0.50 0.22 295 / 0.4), oklch(0.42 0.16 265 / 0.4));
  border: 1px solid oklch(0.65 0.20 288 / 0.5);
  color: #fff; font: 700 13px var(--font-body);
}
.fxq-progress-row {
  display: flex; justify-content: space-between;
  margin: 12px 0 6px;
  font: 600 12.5px var(--font-body);
  color: var(--fx-ink-dim);
}
.fxq-progress-row span:last-child { color: var(--fx-ink); }
.fxq-obj-label {
  margin: 14px 0 7px;
  font: 700 12px var(--font-body);
  letter-spacing: 0.02em;
  color: var(--fx-ink);
}
.fxq-obj-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: oklch(1 0 0 / 0.045);
  border: 1px solid oklch(1 0 0 / 0.07);
  font: 500 13px var(--font-body);
  color: var(--fx-ink-dim);
}
.fxq-obj-row.done { color: var(--fx-ink); }
.fxq-obj-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: oklch(1 0 0 / 0.08); color: var(--fx-ink-dim);
}
.fxq-obj-row.done .fxq-obj-check { background: oklch(0.72 0.18 150 / 0.25); color: var(--fx-green); }
.fxq-obj-text { flex: 1; min-width: 0; }
.fxq-obj-count { font: 700 12px var(--font-labels); color: var(--fx-green); }

.fxq-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.fxq-preview-tile {
  display: grid; justify-items: center; gap: 2px;
  padding: 12px 6px 10px;
  border-radius: 13px;
  background: oklch(1 0 0 / 0.045);
  border: 1px solid oklch(1 0 0 / 0.08);
  text-align: center;
}
.fxq-preview-tile b { font: 700 13.5px var(--font-body); color: var(--fx-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxq-preview-tile i { font: 600 10.5px var(--font-labels); font-style: normal; color: var(--fx-ink-dim); }
.fxq-preview-ico {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 4px;
  display: grid; place-items: center; font-size: 18px;
}
.fxq-preview-tile--xp .fxq-preview-ico    { background: linear-gradient(135deg, oklch(0.55 0.24 295), oklch(0.48 0.18 265)); color: #fff; }
.fxq-preview-tile--badge .fxq-preview-ico { background: oklch(0.70 0.14 220 / 0.2); }
.fxq-preview-tile--title .fxq-preview-ico { background: oklch(0.75 0.16 85 / 0.2); color: var(--fx-gold); }
.fxq-preview-tile--gift .fxq-preview-ico  { background: oklch(0.72 0.18 150 / 0.18); }

/* Gold claim + secondary details buttons */
.fx-quests .quest-claim {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border-radius: 14px !important;
  background: linear-gradient(115deg, oklch(0.78 0.15 85), oklch(0.70 0.15 70)) !important;
  border: 1px solid oklch(0.85 0.14 88 / 0.8) !important;
  color: oklch(0.20 0.05 80) !important;
  font: 800 14.5px var(--font-body) !important;
  text-shadow: none !important;
  box-shadow: 0 4px 20px oklch(0.75 0.16 85 / 0.4), inset 0 1px 0 oklch(1 0 0 / 0.4);
  animation: none !important;
}
.fx-quests .quest-claim:hover { box-shadow: 0 6px 28px oklch(0.75 0.16 85 / 0.55), inset 0 1px 0 oklch(1 0 0 / 0.4); transform: translateY(-2px); }
.fxq-details-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%;
  padding: 12px 10px;
  border-radius: 14px;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid oklch(1 0 0 / 0.12);
  color: var(--fx-ink);
  font: 600 13.5px var(--font-body);
  transition: background .18s ease, border-color .2s ease;
}
.fxq-details-btn:hover { background: oklch(1 0 0 / 0.09); border-color: oklch(1 0 0 / 0.2); }
.fx-quests .quest-sheet__actions { display: grid; gap: 9px; margin-top: 14px; }

/* Node polish: green done / gold current / grey locked */
.fx-quests .quest-node.done .quest-node__core {
  background: linear-gradient(160deg, oklch(0.72 0.19 152), oklch(0.62 0.17 158));
  border-color: oklch(0.82 0.18 150 / 0.9);
  color: #fff;
  box-shadow: 0 0 22px oklch(0.72 0.19 150 / 0.55);
}
.fx-quests .quest-node.current .quest-node__core,
.fx-quests .quest-node.ready .quest-node__core {
  background: linear-gradient(160deg, oklch(0.80 0.15 88), oklch(0.70 0.15 70));
  border-color: oklch(0.88 0.13 90 / 0.95);
  color: oklch(0.25 0.06 80);
  box-shadow: 0 0 28px oklch(0.78 0.16 85 / 0.6);
}
.fx-quests .quest-node.locked .quest-node__core {
  background: oklch(0.22 0.01 270 / 0.9);
  border-color: oklch(0.40 0.01 270 / 0.7);
  color: oklch(0.55 0.01 270);
  box-shadow: none;
}

/* Shell collapse for missions */
@media (max-width: 1023px) {
  .fx-shell--quests { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   MISSION TRACK — aerial night-city plate, contained viewport,
   reference node semantics (green cleared / gold current /
   grey locked) and side-set level numbers.
   ═══════════════════════════════════════════════════════════ */

/* Viewport: fixed cinematic frame that the tall trail scrolls inside */
.fx-quests .quest-map-view {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--fx-line);
  /* The city plate moved onto .quest-map__plate so it travels with the
     road. The frame keeps only the deep base + atmosphere. */
  background: linear-gradient(180deg, oklch(0.13 0.04 280), oklch(0.09 0.03 268));
  box-shadow:
    inset 0 0 70px oklch(0 0 0 / 0.45),
    0 16px 44px oklch(0 0 0 / 0.42);
}
/* City glow wash + cinematic top/bottom falloff, above the trail */
.fx-quests .quest-map-view::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(75% 45% at 72% 12%, oklch(0.55 0.20 292 / 0.26), transparent 62%),
    radial-gradient(60% 40% at 18% 82%, oklch(0.55 0.16 235 / 0.22), transparent 65%),
    linear-gradient(180deg, oklch(0.08 0.02 270 / 0.5), transparent 22%,
                   transparent 80%, oklch(0.08 0.02 270 / 0.6));
}
.fx-quests .quest-map-scroll { position: relative; z-index: 2; }

/* the wrap only declares named grid areas from 860px up */
@media (min-width: 860px) {
  .fx-quests .quest-map-view { grid-area: map; }
}

@media (min-width: 1100px) {
  .fx-quests .quest-map-view { height: clamp(560px, 66vh, 680px); }
  .fx-quests .quest-map-scroll {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;   /* don't hijack the page scroll at the ends */
    scrollbar-width: none;
  }
  .fx-quests .quest-map-scroll::-webkit-scrollbar { display: none; }
}

/* The trail plate itself is transparent — the scrolling city shows through */
.fx-quests .quest-map {
  position: relative;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  background: none;
  overflow: visible;
}

/* ── City plate: scrolls with the road, drifts slower for depth ──
   --q-par is fed by QuestsPage from the scroller's scrollTop. It is
   over-sized top and bottom so the parallax offset never exposes an
   edge. */
/* Clip box: pinned to the track, so the moving image inside can never
   extend the scroll area (which would feed back into the parallax). */
.fx-quests .quest-map__plate {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* The image itself: overhangs the top by more than the parallax travel
   so the drift never exposes an edge. */
.fx-quests .quest-map__plate::before {
  content: '';
  position: absolute;
  left: -4%;
  right: -4%;
  top: -210px;
  bottom: -40px;
  translate: 0 var(--q-par, 0px);
  background:
    url('/assets/gamification/app/map-placeholder.webp') center top / cover no-repeat;
  /* duotone into the brand palette instead of flat grey-blue */
  filter: saturate(0.72) contrast(1.26) brightness(0.88);
}
.fx-quests .quest-map__plate::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, oklch(0.42 0.20 292 / 0.42), transparent 34%),
    linear-gradient(0deg,   oklch(0.40 0.14 232 / 0.40), transparent 30%),
    radial-gradient(80% 40% at 50% 0%, oklch(0.62 0.22 296 / 0.30), transparent 65%);
  mix-blend-mode: color-dodge;
  opacity: 0.62;
}

/* ── Blueprint grid: 1:1 with the road, so motion is unmistakable ── */
.fx-quests .quest-map__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(oklch(0.72 0.14 250 / 0.30) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.72 0.14 250 / 0.30) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  -webkit-mask-image: radial-gradient(75% 55% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(75% 55% at 50% 45%, #000 30%, transparent 78%);
}

/* horizon glow that brightens as you climb the track */
.fx-quests .quest-map-view::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 34%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    oklch(0.60 0.20 292 / calc(0.10 + var(--q-scrolled, 0) * 0.22)),
    transparent 100%);
}
.fx-quests .quest-map__terrain {
  border-radius: 0;
  background: none;
  opacity: 0.7;   /* keep only the drifting sparks, drop the hill blobs */
}
.fx-quests .quest-hill { display: none; }

/* Level number: small plate beside the node, like the reference */
.fx-quests .quest-node__n {
  left: auto; right: -6px; bottom: -4px;
  transform: none;
  min-width: 22px; height: 22px;
  font-size: 11.5px;
  background: oklch(0.11 0.02 268 / 0.92);
  border: 1px solid oklch(1 0 0 / 0.16);
  color: oklch(0.92 0.01 270);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.5);
}
.fx-quests .quest-node.done .quest-node__n {
  background: oklch(0.62 0.18 152); border-color: transparent; color: #fff;
}
.fx-quests .quest-node.current .quest-node__n,
.fx-quests .quest-node.ready .quest-node__n {
  background: oklch(0.20 0.04 80); border-color: oklch(0.80 0.15 85 / 0.7); color: oklch(0.86 0.15 88);
}

/* Halo rings — green cleared, gold current, nothing on locked */
.fx-quests .quest-node.done .quest-node__ring {
  border-color: oklch(0.78 0.19 150 / 0.75);
  box-shadow: 0 0 22px oklch(0.72 0.19 150 / 0.45);
}
.fx-quests .quest-node.current .quest-node__ring,
.fx-quests .quest-node.ready .quest-node__ring {
  border-color: oklch(0.85 0.15 88 / 0.85);
  box-shadow: 0 0 28px oklch(0.80 0.16 85 / 0.55);
}
.fx-quests .quest-node.locked .quest-node__core {
  opacity: 1;
  filter: none;
  background: oklch(0.20 0.015 268 / 0.92);
  border-color: oklch(0.42 0.015 268 / 0.75);
  color: oklch(0.58 0.01 270);
  box-shadow: 0 6px 18px oklch(0 0 0 / 0.45), inset 0 0 0 1px oklch(1 0 0 / 0.05);
}
.fx-quests .quest-node.locked .quest-node__n {
  background: oklch(0.16 0.012 268 / 0.9);
  color: oklch(0.60 0.01 270);
}

/* Trail: cleared runs green, the road ahead reads as dim city asphalt */
.fx-quests .quest-map__trail-bg { stroke: oklch(0.42 0.03 268 / 0.75); }
.fx-quests .quest-map__trail-shine { stroke: oklch(1 0 0 / 0.10); }
.fx-quests .quest-map__trail-dots { stroke: oklch(1 0 0 / 0.34); }

/* Legend pinned to the viewport, not the scrolling trail */
.fx-quests .fxq-legend { position: absolute; left: 14px; bottom: 14px; z-index: 6; }

/* Head chip sits above the plate */
.fx-quests .quest-map-head__chip {
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
}

@media (max-width: 1099px) {
  .fx-quests .quest-map-view { border-radius: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   MISSION TRACK v2 — depth + life.
   A real road (asphalt casing, painted centre line that flows),
   dimensional nodes with specular gloss, a beckoning current
   level, and hover/press affordances on every reachable node.
   ═══════════════════════════════════════════════════════════ */

/* ── The road ─────────────────────────────────────────────── */
/* asphalt casing: wide, dark, with a lit outer edge for depth */
.fx-quests .quest-map__trail-bg {
  stroke: oklch(0.19 0.02 268 / 0.96);
  stroke-width: 26;
  filter:
    drop-shadow(0 3px 3px oklch(0 0 0 / 0.55))
    drop-shadow(0 0 1.5px oklch(0.60 0.10 272 / 0.85));
}
/* kerb highlight riding the top of the surface */
.fx-quests .quest-map__trail-shine {
  stroke: oklch(0.75 0.06 272 / 0.20);
  stroke-width: 20;
}
/* painted centre line — dashes travel along the road */
.fx-quests .quest-map__trail-dots {
  stroke: oklch(0.94 0.02 268 / 0.55);
  stroke-width: 3.5;
  stroke-dasharray: 10 26;
  animation: fxq-lane-flow 3.4s linear infinite;
}
@keyframes fxq-lane-flow { to { stroke-dashoffset: -36; } }

/* cleared stretch: lit green causeway that breathes */
.fx-quests .quest-map__trail-done {
  stroke-width: 13;
  animation:
    quest-trail-draw 1.1s var(--q-ease) both,
    fxq-trail-breathe 4.2s ease-in-out 1.1s infinite;
}
@keyframes fxq-trail-breathe {
  0%, 100% { filter: drop-shadow(0 0 5px oklch(0.75 0.19 152 / 0.5)); }
  50%      { filter: drop-shadow(0 0 14px oklch(0.78 0.20 150 / 0.85)); }
}

/* ── Nodes: dimensional discs ─────────────────────────────── */
.fx-quests .quest-node__core {
  box-shadow:
    0 14px 26px oklch(0 0 0 / 0.55),
    0 4px 0 oklch(1 0 0 / 0.16) inset,
    0 -6px 12px oklch(0 0 0 / 0.34) inset,
    0 0 0 3px oklch(0.10 0.02 268 / 0.85);
}
/* specular sheen across the top of every disc */
.fx-quests .quest-node__core::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 34% 20%, oklch(1 0 0 / 0.42), transparent 70%),
    linear-gradient(180deg, oklch(1 0 0 / 0.10), transparent 46%);
}
.fx-quests .quest-node__core > * { position: relative; z-index: 1; }

.fx-quests .quest-node.done .quest-node__core {
  background:
    radial-gradient(circle at 33% 26%, oklch(0.92 0.14 150 / 0.55), transparent 48%),
    linear-gradient(165deg, oklch(0.72 0.19 150), oklch(0.52 0.16 155) 70%, oklch(0.42 0.13 158));
}
.fx-quests .quest-node.current .quest-node__core,
.fx-quests .quest-node.ready .quest-node__core {
  background:
    radial-gradient(circle at 33% 26%, oklch(0.98 0.10 95 / 0.6), transparent 48%),
    linear-gradient(165deg, oklch(0.88 0.16 92), oklch(0.75 0.16 76) 65%, oklch(0.62 0.15 62));
}
/* locked discs read as unlit concrete, not a faded button */
.fx-quests .quest-node.locked .quest-node__core::after {
  background: radial-gradient(58% 42% at 34% 20%, oklch(1 0 0 / 0.12), transparent 70%);
}

/* ── The current level beckons ────────────────────────────── */
.fx-quests .quest-node.current,
.fx-quests .quest-node.ready { animation: fxq-node-bob 3.6s ease-in-out infinite; }
@keyframes fxq-node-bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 5px)); }
}
.fx-quests .quest-node.current .quest-node__ring::after,
.fx-quests .quest-node.ready .quest-node__ring::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid oklch(0.86 0.15 88 / 0.8);
  animation: fxq-beckon 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
  pointer-events: none;
}
@keyframes fxq-beckon {
  0%   { opacity: 0.85; transform: scale(1); }
  70%  { opacity: 0;    transform: scale(1.55); }
  100% { opacity: 0;    transform: scale(1.55); }
}

/* ── Interaction: lift, press, focus, and a name on hover ─── */
.fx-quests .quest-node:not(.locked) .quest-node__core {
  transition:
    transform .28s var(--spring),
    box-shadow .28s ease,
    filter .2s ease;
}
.fx-quests .quest-node:not(.locked):hover .quest-node__core {
  transform: scale(1.09);
  box-shadow:
    0 20px 34px oklch(0 0 0 / 0.6),
    0 4px 0 oklch(1 0 0 / 0.2) inset,
    0 -6px 12px oklch(0 0 0 / 0.3) inset,
    0 0 0 3px oklch(0.10 0.02 268 / 0.85),
    0 0 34px oklch(0.80 0.16 88 / 0.35);
}
.fx-quests .quest-node:not(.locked):active .quest-node__core { transform: scale(0.95); }
.fx-quests .quest-node.locked:hover .quest-node__core { filter: brightness(1.18); }

/* level name plate on hover / keyboard focus */
.fx-quests .quest-node::after {
  content: attr(data-title);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 6px 11px;
  border-radius: 9px;
  background: oklch(0.09 0.02 268 / 0.94);
  border: 1px solid oklch(1 0 0 / 0.16);
  color: oklch(0.95 0.01 270);
  font: 600 11.5px var(--font-body);
  white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.55);
  opacity: 0; pointer-events: none; z-index: 9;
  transition: opacity .18s ease, transform .22s var(--spring);
}
.fx-quests .quest-node:hover::after,
.fx-quests .quest-node:focus-visible::after {
  opacity: 1; transform: translate(-50%, 0);
}

/* ── Plate: slow city-lights breathing ────────────────────── */
.fx-quests .quest-map-view::before { animation: fxq-city-breathe 11s ease-in-out infinite; }
@keyframes fxq-city-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.84; } }

/* ── Touch + reduced motion ───────────────────────────────── */
@media (hover: none), (pointer: coarse) {
  .fx-quests .quest-node::after { display: none; }   /* no hover to reveal it */
}
@media (prefers-reduced-motion: reduce) {
  .fx-quests .quest-map__trail-dots,
  .fx-quests .quest-map__trail-done,
  .fx-quests .quest-node.current,
  .fx-quests .quest-node.ready,
  .fx-quests .quest-node.current .quest-node__ring::after,
  .fx-quests .quest-node.ready .quest-node__ring::after,
  .fx-quests .quest-map-view::before { animation: none !important; }
  .fx-quests .quest-node.current,
  .fx-quests .quest-node.ready { transform: translate(-50%, -50%); }
}
