/* ==========================================================================
   Focus tab — styles for public/focus.js. Every class is prefixed fx-.
   ==========================================================================
   Laid out after Forest's app (2026-09-27) but built on this app's own
   tokens (styles.css, theme.css): its surfaces, text colours, type and button
   voice, so the tab follows the palette switch like every other. The only
   colours of its own are the ones a forest needs — the land (grass and soil,
   set per land style by focus.js) and gold coins. No green page backgrounds:
   the page is the app's own surface. */

:root {
  --fx-grass: #62ad55;
  --fx-grass-line: rgba(0, 0, 0, 0.13);
  --fx-soil-l: #8a5f3c;
  --fx-soil-r: #6b472b;
  --fx-gold-hi: #ffe38a;
  --fx-gold: #f5c542;
  --fx-gold-lo: #c98a12;
  --fx-glass: color-mix(in srgb, var(--text-primary) 5%, transparent);
  --fx-glass-rim: color-mix(in srgb, var(--text-primary) 16%, transparent);
}

/* --- coins ------------------------------------------------------------------ */

.fx-coins {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: 0;
  text-transform: none; color: var(--text-primary);
}
.fx-coin {
  width: 1em; height: 1em; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--fx-gold-hi), var(--fx-gold) 45%, var(--fx-gold-lo));
  box-shadow: inset 0 0 0 1.5px rgba(120, 70, 0, 0.45);
}
.fx-coins.big { font-size: 24px; }
.fx-coins.pop { animation: fx-pop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes fx-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- sprites ---------------------------------------------------------------- */

.fx-sprite {
  aspect-ratio: 2 / 3;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.fx-sprite.vector, .fx-sprite.artwork { image-rendering: auto; }
/* Vector species have a drawn withered sheet; the filter is for the rest. */
.fx-sprite.withered:not(.vector) { filter: grayscale(1) sepia(0.7) hue-rotate(-15deg) brightness(0.7) contrast(1.05); }
.fx-sprite-tbd {
  display: grid; place-items: center; height: 100%;
  border: 1.5px dashed var(--border-strong); border-radius: 10px;
  color: var(--text-muted); font-size: 22px; font-weight: 600;
}

/* --- the land: island, plot and store tile share these ---------------------- */

.fx-grass { fill: var(--fx-grass); }
.fx-grass-side { fill: var(--fx-grass); filter: brightness(0.8); }
.fx-dirt-l { fill: var(--fx-soil-l); }
.fx-dirt-r { fill: var(--fx-soil-r); }
.fx-grid line { stroke: var(--fx-grass-line); stroke-width: 1.3; }

/* --- the bubble --------------------------------------------------------------
   A glass sphere in the app's own ink, a floating island inside it, and the
   tree standing on the island's centre. Everything is a percentage of the
   bubble, so one rule set serves the plant screen, the session and the
   Timeline's small cards. */

.fx-bubble {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--text-primary) 8%, transparent), transparent 62%),
    var(--fx-glass);
  box-shadow:
    inset 0 0 0 1px var(--fx-glass-rim),
    inset 0 -24px 48px rgba(0, 0, 0, 0.28),
    0 18px 50px rgba(0, 0, 0, 0.35);
}
.fx-bubble::after {                      /* the glass highlight */
  content: ""; position: absolute; left: 64%; top: 11%; width: 16%; height: 8%;
  border-radius: 50%; transform: rotate(32deg);
  background: color-mix(in srgb, var(--text-primary) 9%, transparent);
  filter: blur(3px);
}
.fx-island { position: absolute; left: 12%; width: 76%; top: 57%; }
.fx-island svg, .fx-island img { display: block; width: 100%; height: auto; }
.fx-bubble-tree { position: absolute; left: 50%; width: 34%; bottom: 33.5%; transform: translateX(-50%); }
.fx-bubble-tree.artwork { width: 55%; bottom: 31%; }
.fx-bubble.small { box-shadow: inset 0 0 0 1px var(--fx-glass-rim), inset 0 -10px 20px rgba(0, 0, 0, 0.25); }
.fx-bubble.small::after { display: none; }

/* --- home: the plant screen --------------------------------------------------- */

/* Fills the screen under the app header, so Start focus sits low as in Forest. */
.fx-home {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 100%; max-width: 520px; margin: 0 auto;
  min-height: calc(100svh - var(--fx-head, 120px) - 60px);
}
.fx-home > .card, .fx-home > div:empty { width: 100%; }
.fx-home > div:empty { display: none; }
.fx-banner { display: flex; align-items: center; gap: 12px; }
.fx-banner .grow { flex: 1; min-width: 0; }
.fx-banner .dim { font-size: 12.5px; color: var(--text-secondary); }

.fx-bar { width: 100%; display: flex; align-items: center; gap: 10px; }
.fx-bar .grow { flex: 1; }
.fx-round {
  appearance: none; position: relative; cursor: pointer; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary);
}
.fx-round:hover { border-color: var(--border-strong); }
.fx-menu { background: none; border-color: transparent; margin-left: -8px; }
.fx-ping {
  position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--critical); box-shadow: 0 0 0 2px var(--surface-0);
}
.fx-balance {
  appearance: none; font: inherit; font-size: 16px; cursor: pointer;
  background: none; border: 0; padding: 6px 8px; color: var(--text-primary);
}

.fx-intent { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fx-intent-tag {
  appearance: none; background: none; border: 0; padding: 2px 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--s-h-f, inherit); font-size: 24px; font-weight: 600; letter-spacing: -0.015em;
  color: var(--text-primary);
}
.fx-intent-tag .fx-dot { width: 11px; height: 11px; }
.fx-intent-tag svg { color: var(--text-secondary); margin-left: -3px; }
.fx-intent-note {
  width: min(100%, 300px); margin-left: 20px;
  background: none; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0;
  padding: 4px 0; font: inherit; font-size: 14.5px; color: var(--text-secondary);
}
.fx-intent-note::placeholder { color: var(--text-muted); }
.fx-intent-note:focus { outline: none; border-bottom-color: var(--accent); color: var(--text-primary); }

.fx-bubble-btn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  width: min(74vw, 310px); margin: auto 0 4px; border-radius: 50%;
}
.fx-bubble-btn:active .fx-bubble { transform: scale(0.98); }
.fx-bubble-btn .fx-bubble { transition: transform 0.16s ease-out; }

.fx-clock-btn {
  appearance: none; background: none; border: 0; padding: 4px 16px; cursor: pointer;
  color: var(--text-primary); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fx-clock-btn:hover { background: var(--surface-1); }
.fx-time {
  font-family: var(--s-mono); font-size: clamp(56px, 18vw, 76px); font-weight: 500; line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.fx-time-sub {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center;
  font-family: var(--s-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.fx-time-sub .fx-coins { font-size: 12px; color: var(--text-secondary); }
.fx-start { width: min(100%, 360px); padding: 15px 22px; margin: auto 0 0; }

/* --- the side menu ------------------------------------------------------------- */

/* Above the app header, the overlays and the session screen; below sheets. */
.fx-drawer-scrim {
  position: fixed; inset: 0; z-index: 170;
  background: rgba(0, 0, 0, 0); transition: background 0.24s ease-out;
}
.fx-drawer-scrim.open { background: rgba(0, 0, 0, 0.55); }
.fx-drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(80vw, 300px);
  background: var(--surface-1); border-right: 1px solid var(--border);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  padding: calc(env(safe-area-inset-top) + 22px) 12px calc(env(safe-area-inset-bottom) + 20px);
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
  transform: translateX(-102%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fx-drawer-scrim.open .fx-drawer { transform: none; }
.fx-drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 10px 20px; margin-bottom: 8px; border-bottom: 1px solid var(--grid);
}
.fx-drawer-head .grow { flex: 1; min-width: 0; }
.fx-drawer-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-quiet); color: var(--accent);
}
.fx-drawer-big { font-size: 17px; font-weight: 600; }
.fx-drawer-dim { font-size: 12.5px; color: var(--text-secondary); }
.fx-drawer-item {
  appearance: none; background: none; border: 0; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 13px 12px; border-radius: 12px;
  font: inherit; font-size: 16.5px; color: var(--text-primary); text-align: left;
}
.fx-drawer-item .grow { flex: 1; }
.fx-drawer-item svg { color: var(--text-secondary); }
.fx-drawer-item:hover, .fx-drawer-item:active { background: var(--surface-2); }
.fx-count {
  min-width: 20px; padding: 1px 7px; border-radius: 999px;
  background: var(--critical); color: var(--surface-0);
  font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center;
}

/* --- pages ---------------------------------------------------------------------- */

.fx-page { gap: 16px; }
.fx-tools { display: flex; align-items: center; gap: 8px; }
.fx-filter { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 13px; }
.fx-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fx-card-head h3 { flex: 1; }
.fx-info {
  appearance: none; background: none; border: 0; padding: 2px; cursor: pointer;
  color: var(--text-muted); display: grid; place-items: center; border-radius: 50%;
}
.fx-info:hover { color: var(--text-primary); }
.fx-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 30px 10px; color: var(--text-secondary); }
.fx-empty .fx-bubble { width: 160px; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.on { color: var(--accent); border-color: var(--accent); }

/* --- the timer sheet ------------------------------------------------------------ */

.fx-timer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 0 6px; }
.fx-timer-mode { margin-bottom: 2px; }
.fx-timer-sub { font-size: 13px; color: var(--text-secondary); }
.fx-timer-value {
  font-family: var(--s-h-f, inherit); font-size: 34px; font-weight: 650; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.fx-timer-reward { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px;
  font-size: 12.5px; color: var(--text-secondary); min-height: 20px; text-align: center; }

.fx-ruler-wrap { position: relative; width: 100%; }
.fx-ruler {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.fx-ruler.dragging { cursor: grabbing; scroll-snap-type: none; }
.fx-ruler::-webkit-scrollbar { display: none; }
.fx-ruler:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.fx-ruler-track { display: flex; align-items: center; width: max-content; padding: 0 calc(50% - 7px); height: 44px; }
.fx-tick { flex: none; width: 14px; height: 44px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; }
.fx-tick::after { content: ""; width: 1.5px; height: 14px; border-radius: 1px; background: var(--border-strong); }
.fx-tick.major::after { height: 22px; background: var(--text-secondary); }
.fx-ruler-mark {
  position: absolute; left: 50%; top: 50%; width: 3px; height: 34px; border-radius: 2px;
  transform: translate(-50%, -50%); background: var(--accent); pointer-events: none;
}

.fx-deep {
  width: 100%; margin-top: 6px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 10px;
}
.fx-deep-row { display: flex; align-items: center; gap: 14px; }
.fx-deep-row .grow { flex: 1; min-width: 0; }
.fx-deep-title { font-size: 15.5px; font-weight: 600; }
.fx-deep-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.fx-deep-link {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--accent);
}
.fx-switch {
  appearance: none; flex: none; cursor: pointer; position: relative;
  width: 50px; height: 30px; border-radius: 999px; padding: 0;
  background: var(--surface-1); border: 1px solid var(--border-strong);
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.fx-switch span {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text-secondary); transition: transform 0.18s ease-out, background 0.18s ease-out;
}
.fx-switch[aria-checked="true"] { background: var(--accent-quiet); border-color: var(--accent); }
.fx-switch[aria-checked="true"] span { transform: translateX(20px); background: var(--accent); }
.fx-sheet-row {
  appearance: none; width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-top: 1px solid var(--grid);
  font: inherit; font-size: 14.5px; color: var(--text-primary); text-align: left;
}
.fx-sheet-row .grow { flex: 1; }
.fx-sheet-row svg { color: var(--text-secondary); }
.fx-row-val { color: var(--text-secondary); font-size: 13.5px; }

/* --- tags ------------------------------------------------------------------- */

.fx-tag { display: inline-flex; align-items: center; gap: 6px; }
.fx-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.fx-dot.big {
  appearance: none; width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.fx-tag-name {
  appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 500; text-align: left;
}

/* --- pickers ------------------------------------------------------------------ */

.fx-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.fx-pick {
  appearance: none; font: inherit; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 6px 8px; color: var(--text-primary);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fx-pick.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fx-pick.locked .fx-pick-tree { filter: brightness(0.5) saturate(0.6); }
.fx-pick-tree { width: 46px; }
.fx-pick-name { font-size: 12px; }
.fx-pick-price { font-size: 12px; }
.fx-pick-more { margin-top: 12px; width: 100%; }
.fx-sound-row {
  appearance: none; width: 100%; background: none; border: 0;
  border-bottom: 1px solid var(--grid); color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.fx-sound-row:last-child { border-bottom: 0; }
.fx-sound-row[aria-selected="true"] .name { color: var(--accent); }

/* --- Forest page ---------------------------------------------------------------- */

.fx-range-seg { align-self: stretch; display: flex; }
.fx-range-seg button { flex: 1; padding: 7px 8px; font-size: 13px; }
.fx-range-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fx-range-label { flex: 1; text-align: center; font-weight: 600; font-size: 15px; }

.fx-plot-wrap { position: relative; padding: 4px 0 0; }
.fx-plot { position: relative; width: 100%; max-width: 620px; margin: 0 auto; }
.fx-plot-ground { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-plot-tree { position: absolute; pointer-events: auto; }
.fx-plot-empty { position: absolute; left: 0; right: 0; top: 52%; text-align: center; }
.fx-plot-empty span {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface-0) 72%, transparent); color: var(--text-primary);
  font-size: 12.5px; font-weight: 500;
}
.fx-plot-counts {
  display: flex; justify-content: flex-end; gap: 16px; margin-top: 6px; padding-right: 4px;
  font-family: var(--s-mono); font-size: 15px; font-variant-numeric: tabular-nums;
}
.fx-plot-counts span { display: inline-flex; align-items: center; gap: 5px; color: var(--text-primary); }
.fx-plot-counts svg { color: var(--accent); }
.fx-plot-counts .dead svg { color: var(--text-muted); }

.fx-total { font-size: 13.5px; color: var(--text-secondary); margin: 2px 0 6px; }
.fx-total b { color: var(--accent); font-weight: 600; }

.fx-trend-text { font-size: 13px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.fx-trend-text b { color: var(--accent); font-weight: 600; }
.fx-trend-row { padding: 6px 0; }
.fx-trend-name { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 5px; }
.fx-trend-line { display: flex; align-items: center; gap: 12px; }
.fx-trend-track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); }
.fx-trend-fill { height: 100%; border-radius: 5px; background: var(--accent); }
.fx-trend-fill.past { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.fx-trend-dot {
  position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--text-primary); box-shadow: 0 0 0 2px var(--surface-1);
}
.fx-trend-val { min-width: 64px; text-align: right; font-family: var(--s-mono); font-size: 13px; font-variant-numeric: tabular-nums; }

.fx-donut-wrap { position: relative; width: min(64vw, 220px); margin: 8px auto 14px; }
.fx-donut { display: block; width: 100%; height: auto; }
.fx-slice { stroke: var(--surface-1); stroke-width: 2; stroke-linejoin: round; }
.fx-donut-hole {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.fx-donut-hole b { font-family: var(--s-mono); font-size: 17px; font-weight: 600; }
.fx-donut-hole span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.fx-legend-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--grid); font-size: 14px;
}
.fx-legend-row:last-child { border-bottom: 0; }
.fx-legend-row .grow { flex: 1; min-width: 0; }
.fx-legend-pct, .fx-legend-val { font-family: var(--s-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.fx-legend-pct { min-width: 42px; text-align: right; }
.fx-legend-val { min-width: 64px; text-align: right; color: var(--text-primary); }

.fx-fav { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.fx-fav .grow { flex: 1; min-width: 0; }
.fx-fav-rank { width: 18px; color: var(--text-muted); font-family: var(--s-mono); font-size: 14px; }
.fx-fav-tree { width: 34px; flex: none; }
.fx-fav-name { font-size: 14px; margin-bottom: 5px; }
.fx-fav-count { min-width: 64px; text-align: right; font-size: 13px; color: var(--text-secondary); }

/* --- Timeline ------------------------------------------------------------------- */

.fx-tl-day { display: flex; flex-direction: column; gap: 14px; }
.fx-tl-date {
  align-self: center; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-primary);
  font-family: var(--s-mono); font-size: 12.5px; letter-spacing: 0.04em;
}
.fx-tl-list { position: relative; display: flex; flex-direction: column; gap: 18px; padding-left: 2px; }
.fx-tl-list::before {
  content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px;
  background: var(--grid);
}
.fx-tl-ev { position: relative; display: flex; gap: 12px; }
.fx-tl-node {
  position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--surface-0);
}
.fx-tl-node.ok { background: var(--accent-quiet); color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.fx-tl-node.dead { background: var(--surface-2); color: var(--text-muted); box-shadow: 0 0 0 1px var(--border-strong); }
.fx-tl-node.start { background: var(--surface-1); color: var(--text-secondary); box-shadow: 0 0 0 1px var(--border-strong); }
.fx-tl-body { flex: 1; min-width: 0; padding-top: 3px; }
.fx-tl-time { font-family: var(--s-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.fx-tl-text { font-size: 14px; color: var(--text-secondary); margin-top: 1px; }
.fx-tl-card {
  margin-top: 10px; border-radius: 14px; overflow: hidden;
  background: var(--surface-1); border: 1px solid var(--border);
}
.fx-tl-card-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  font-family: var(--s-mono); font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.fx-tl-card-head .grow { flex: 1; }
.fx-tl-mins { display: inline-flex; align-items: center; gap: 4px; }
.fx-tl-icon {
  appearance: none; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 50%;
  color: var(--text-secondary); display: grid; place-items: center;
}
.fx-tl-icon:hover { color: var(--text-primary); background: var(--surface-2); }
.fx-tl-art { display: flex; justify-content: center; padding: 4px 0 14px; }
.fx-tl-art .fx-bubble { width: 132px; }
.fx-tl-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface-2); font-size: 13.5px;
}
.fx-tl-foot .grow { flex: 1; }
.fx-tl-note { color: var(--text-secondary); }
.fx-tl-more { align-self: center; }

/* --- Achievements ------------------------------------------------------------------ */

.fx-awards-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: var(--text-secondary); }
.fx-ach-list { display: flex; flex-direction: column; gap: 8px; }
.fx-ach-row {
  appearance: none; width: 100%; cursor: pointer; text-align: left; font: inherit;
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px;
  color: var(--text-secondary);
}
.fx-ach-row:hover { border-color: var(--border-strong); }
.fx-ach-row .grow { flex: 1; min-width: 0; }
.fx-ach-row > svg { color: var(--text-muted); flex: none; }
.fx-ach-name { font-size: 15.5px; color: var(--text-secondary); }
.fx-ach-row.done .fx-ach-name { color: var(--text-primary); font-weight: 500; }
.fx-ach-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.fx-ach-collect {
  flex: none; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--fx-gold);
}

.fx-badge {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-muted);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--text-primary) 6%, transparent);
}
.fx-badge.ready { background: var(--accent-quiet); color: var(--accent); box-shadow: inset 0 0 0 2px var(--fx-gold); }
.fx-badge.done { background: var(--accent-quiet); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.fx-badge.big { width: 104px; height: 104px; }
.fx-badge-num {
  position: absolute; left: 0; right: 0; top: 52%; text-align: center;
  font-family: var(--s-mono); font-size: 10px; font-weight: 700; line-height: 1;
}
.fx-badge.big .fx-badge-num { font-size: 17px; }

.sheet-list.fx-award { align-items: center; gap: 12px; padding: 16px 4px 6px; text-align: center; }
.fx-award-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.fx-award-state svg { color: var(--accent); }
.fx-award-desc { font-size: 14.5px; color: var(--text-primary); }
.fx-award-reward { font-size: 18px; }
.fx-award-reward .dim { font-size: 13px; color: var(--text-secondary); font-weight: 400; }

/* A labelled progress bar: Forest's fill with the count written across it. */
.fx-progress {
  position: relative; width: 100%; height: 22px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2);
}
.fx-progress > span {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 55%, var(--surface-2));
}
.fx-progress.full > span { background: var(--accent-quiet); box-shadow: inset 0 0 0 1px var(--accent); }
.fx-progress > em {
  position: relative; display: block; text-align: center; line-height: 22px;
  font-style: normal; font-family: var(--s-mono); font-size: 11.5px; color: var(--text-primary);
}

/* --- Starter challenge ---------------------------------------------------------------- */

.fx-stepper { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 0 4px; }
.fx-step {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-muted);
  font-family: var(--s-mono); font-size: 17px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border);
}
.fx-step.now { background: var(--accent); color: var(--surface-0); box-shadow: none; }
.fx-step.done { background: var(--accent-quiet); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fx-step-line { width: 34px; height: 3px; border-radius: 2px; background: var(--surface-2); }
.fx-step-line.on { background: var(--accent-quiet); }
.fx-starter-title { text-align: center; font-size: 25px; font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; }
.fx-starter-sub { text-align: center; color: var(--text-secondary); font-size: 14px; margin: -6px 0 0; }
.fx-starter-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.fx-starter-goal { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.fx-starter-goal .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fx-starter-goal-text { font-size: 15px; font-weight: 600; }
.fx-gift {
  flex: none; width: 76px; height: 76px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--surface-2); color: var(--fx-gold);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fx-gold) 45%, transparent);
}
.fx-gift .fx-coins { font-size: 12.5px; }
.fx-claim { align-self: stretch; }
.fx-task {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  border-radius: 14px; background: var(--surface-2);
}
.fx-task-head { display: flex; align-items: flex-start; gap: 12px; }
.fx-task-head .grow { flex: 1; min-width: 0; }
.fx-task-name { font-size: 15.5px; font-weight: 600; }
.fx-learn {
  appearance: none; background: none; border: 0; padding: 4px 0 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; color: var(--text-secondary);
}
.fx-learn:hover { color: var(--text-primary); }
.fx-task-check {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--accent); color: var(--surface-0);
}

/* --- Store ---------------------------------------------------------------------------- */

.fx-store-bal { font-size: 15px; padding-right: 2px; }
.fx-store-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 2px; }
.fx-store-tabs button {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); padding: 10px 14px 11px;
}
.fx-store-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.fx-hero-row {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.fx-hero-row::-webkit-scrollbar { display: none; }
.fx-hero {
  appearance: none; flex: none; width: min(76%, 300px); scroll-snap-align: start; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 18px 18px; border-radius: 22px; text-align: center;
  font: inherit; color: var(--text-primary);
  border: 1px solid color-mix(in srgb, var(--tint) 40%, var(--border));
  background:
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--tint) 34%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 16%, var(--surface-1)), var(--surface-1));
}
.fx-hero-art { height: 190px; display: flex; align-items: flex-end; justify-content: center; }
.fx-hero-art .fx-sprite { height: 100%; }
.fx-hero-name { align-self: flex-start; font-size: 22px; font-weight: 650; letter-spacing: -0.015em; }

.fx-picks-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.fx-picks-head .grow { flex: 1; min-width: 0; }
.fx-picks-title { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.fx-picks-sub { font-size: 13px; color: var(--text-secondary); }
.fx-refresh { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 14px; }
.fx-refresh .fx-coins { font-size: 13.5px; }

.fx-store-sub { display: flex; align-items: center; gap: 10px; }
.fx-store-sub .seg { flex: 1; display: flex; }
.fx-store-sub .seg button { flex: 1; font-size: 12.5px; padding: 7px 6px; }

.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.fx-item {
  appearance: none; cursor: pointer; font: inherit; color: var(--text-primary);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 8px 10px; border-radius: 18px; text-align: center;
  background: var(--surface-1); border: 1px solid var(--border);
}
.fx-item:hover { border-color: var(--border-strong); }
.fx-item:disabled { cursor: default; opacity: 0.6; }
.fx-item.in-use { border-color: var(--accent); }
.fx-item-art { width: 100%; height: 86px; display: flex; align-items: flex-end; justify-content: center; }
.fx-item-art .fx-sprite { height: 100%; }
.fx-item-name { font-size: 13px; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; }
.fx-price {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap;
  width: 100%; padding: 6px 6px; border-radius: 999px;
  background: var(--surface-2); font-size: 13px;
}
.fx-price .fx-coins { color: var(--text-primary); }
.fx-price.wide { width: 100%; padding: 10px; font-size: 16px; }
.fx-price.owned { color: var(--accent); font-family: var(--s-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.fx-price.muted { color: var(--text-muted); font-size: 11.5px; }
.fx-was { color: var(--text-muted); font-size: 11.5px; }
.fx-land { width: 86px; height: 86px; }
.fx-land svg { width: 100%; height: 100%; display: block; }
.fx-sound-art {
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; align-self: center;
  background: var(--surface-2); color: var(--text-secondary);
}

/* --- settings --------------------------------------------------------------- */

.fx-toggle { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.fx-toggle .chip { align-self: flex-start; }
.fx-steps { margin: 10px 0 12px 20px; padding: 0; font-size: 13.5px; color: var(--text-secondary); }
.fx-steps li { margin: 5px 0; }
.fx-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 10px; }
.fx-rule { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; font-size: 13px; }
.fx-rule .dim { color: var(--text-secondary); font-size: 12px; margin-bottom: 3px; }

/* --- the session screen ------------------------------------------------------ */

/* Above overlays (100) and the fixed bars (≤130), below the menu (170) and
   sheets (200) so the give-up confirmation and the tag picker open on top. */
.fx-session {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: calc(env(safe-area-inset-top) + 14px) 20px calc(env(safe-area-inset-bottom) + 26px);
  background: var(--surface-0); color: var(--text-primary); overflow-y: auto;
}
.fx-s-top { width: 100%; max-width: 520px; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.fx-s-icon, .fx-s-tagbtn {
  appearance: none; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
}
.fx-s-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.fx-s-tagbtn { border-radius: 999px; padding: 9px 14px; font-size: 14px; }
.fx-s-note { width: 100%; max-width: 520px; min-height: 1.4em; color: var(--text-secondary); font-size: 14.5px; }
.fx-s-stage {
  position: relative; width: min(80vw, 340px); aspect-ratio: 1; margin-top: 2vh;
  display: grid; place-items: center;
}
.fx-s-stage .fx-bubble { width: 88%; }
.fx-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.fx-ring-track { fill: none; stroke: var(--surface-2); stroke-width: 2.4; }
.fx-ring-bar { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.fx-s-stage.result .fx-bubble { width: 92%; }
.fx-s-stage.result.grown::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 66%);
}
.fx-s-clock {
  font-family: var(--s-mono); font-size: clamp(56px, 18vw, 76px); font-weight: 500; line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.fx-s-clock.over { color: var(--accent); }
.fx-s-msg { color: var(--text-secondary); font-size: 14px; text-align: center; max-width: 330px; min-height: 2.8em; }
.fx-s-title { font-size: 22px; font-weight: 650; text-align: center; }
.fx-s-reward { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.fx-s-reward .dim { color: var(--text-secondary); font-size: 13.5px; }
.fx-s-sub { color: var(--text-secondary); font-size: 13px; margin-top: 8px; }
.fx-s-actions { margin-top: auto; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.fx-s-actions .btn { width: 100%; text-align: center; padding: 15px 22px; }

@media (prefers-reduced-motion: reduce) {
  .fx-coins.pop { animation: none; }
  .fx-ring-bar, .fx-drawer, .fx-drawer-scrim, .fx-switch, .fx-switch span, .fx-bubble-btn .fx-bubble { transition: none; }
}
