/* ==========================================================================
   FLEXX — dark navy, electric blue → volt green gradient
   Based on the iFitness community template (Figma). Theme tokens first so
   every existing page picks it up; fx-* classes are for the new screens.
   ========================================================================== */
[data-theme="flexx"] {
  --bg-main:              #041122;
  --bg-glow:              #041122;
  --bg-card:              #0A172B;
  --bg-card-hover:        #0E1B33;
  --navbar-bg:            rgba(4, 10, 21, 0.94);
  --card-header-bg:       transparent;
  --input-bg:             #07101F;
  --input-bg-focus:       #0B1830;
  --pulse-bar-bg:         linear-gradient(90deg, #0A1426 0%, #0C1D3C 100%);

  --text-main:            #F2F6FF;
  --text-muted:           #8193B2;
  --text-link:            #4C8DFF;

  --accent-primary:       #2F6BFF;
  --accent-hover:         #1F55E0;
  --accent-green:         #7ED56F;
  --accent-gradient:      var(--fx-cta);
  --border-subtle:        rgba(76, 141, 255, 0.14);
  --border-focus:         rgba(76, 141, 255, 0.45);
  --btn-primary-shadow:   rgba(47, 107, 255, 0.40);

  --reaction-btn-bg:      rgba(255, 255, 255, 0.05);
  --reaction-btn-hover:   rgba(255, 255, 255, 0.11);
  --wish-item-bg:         rgba(255, 255, 255, 0.035);
  --category-badge-bg:    rgba(76, 141, 255, 0.10);
  --card-hover-shadow:    rgba(0, 0, 0, 0.55);
  --scrollbar-thumb:      rgba(76, 141, 255, 0.20);
  --close-filter:         invert(1) opacity(0.6);

  --font-sans:            "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-md:            16px;
  --radius-lg:            24px;
}

/* Gradient primary buttons everywhere under Flexx */
[data-theme="flexx"] .btn-primary {
  background: var(--accent-gradient) !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .02em;
}
[data-theme="flexx"] .card { border: 1px solid var(--border-subtle) !important; }

/* ==========================================================================
   fx-* components — measurements taken from the Figma frames
   (iPhone 14 Plus, 428pt wide): Home = node 1:1870, Challenges = 1:1978.
   ========================================================================== */
:root {
  /* Every theme gets the Flexx layout; these map it onto the theme's tokens */
  --fx-bg:          var(--bg-main);
  --fx-card:        var(--bg-card);
  --fx-card-border: var(--border-subtle);
  --fx-well:        var(--input-bg);
  --fx-text:        var(--text-main);
  --fx-dim:         var(--text-muted);
  --fx-active:      var(--accent-primary);
  --fx-blue:        var(--accent-primary);
  --fx-green:       var(--fx-good);
  --fx-row-hi:      var(--reaction-btn-bg);
  --fx-tabbar-bg:   var(--navbar-bg);
  --fx-bar:         linear-gradient(180deg, var(--accent-primary) 50%, var(--accent-hover) 100%);
  --fx-bar-peak:    linear-gradient(180deg, #AED077 0%, #41C98B 100%);
  --fx-feature:     linear-gradient(70.53deg, #047A93 11.75%, #2A7F3F 79.1%);   /* Figma #0491AF→#5AC073, darkened for white text */
  --fx-cta:         linear-gradient(90deg, #1F63D6 0%, #1B7F55 100%);          /* buttons with white text: ≥4.98:1 at both ends */
}
/* Flexx itself: exact values from Figma */
[data-theme="flexx"] {
  --fx-bg:          #041122;
  --fx-card:        #0A172B;
  --fx-card-border: rgba(255, 255, 255, 0.08);
  --fx-well:        #031223;
  --fx-text:        #FFFFFF;
  --fx-dim:         rgba(217, 217, 217, 0.66);   /* Figma had .4; raised for 4.5:1 */
  --fx-active:      #8AB4F6;
  --fx-blue:        #2274F5;
  --fx-green:       var(--fx-good);
  --fx-row-hi:      rgba(255, 255, 255, 0.05);
  --fx-tabbar-bg:   rgba(4, 17, 34, 0.96);
  --fx-bar:         linear-gradient(180deg, #406DDB 50%, #6590E8 83.5%);
}

.fx-page {
  font-family: "Inter", sans-serif;
  color: var(--fx-text);
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 100px;
}
body.fx-app { font-family: "Inter", var(--font-sans); background: var(--fx-bg) !important; }
@media (max-width: 991.98px) {
  body.fx-app > .navbar { display: none; }
  body.fx-app > .container-xl { padding: 0 17px 110px; }
}

/* Icons: masked so CSS controls the color (sized per use) */
.fx-ico {
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
  vertical-align: middle;
}

/* ── Page header ─────────────────────────────────────── */
.fx-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 49px;                    /* status bar → title top = 86 */
  margin-bottom: 29px;
}
.fx-title { font-weight: 700; font-size: 32px; line-height: normal; margin: 0; }
@media (min-width: 992px) { .fx-header { padding-top: 24px; } }

/* ── Stories row ─────────────────────────────────────── */
.fx-stories {
  display: flex; gap: 9px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 0 21px 9px;
}
.fx-stories::-webkit-scrollbar { display: none; }
.fx-story { width: 70px; flex-shrink: 0; text-align: center; text-decoration: none; color: var(--fx-text); }
.fx-story-name { font-weight: 700; font-size: 15px; margin-top: 15px; line-height: normal; }

.fx-avatar { position: relative; flex-shrink: 0; }
.fx-avatar > .avatar-chip {
  position: absolute; inset: 5px;
  width: auto; height: auto;
  font-size: 1.4rem;
}
.fx-avatar > img.fx-ring { position: absolute; inset: 0; }
.fx-avatar.lg { width: 70px; height: 70px; }
.fx-avatar.md { width: 50px; height: 50px; }
.fx-avatar.md > .avatar-chip { inset: 3.6px; font-size: 1.05rem; }
.fx-avatar.idle > .fx-ring-idle {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
}

/* ── Cards ───────────────────────────────────────────── */
.fx-card {
  background: var(--fx-card);
  border-radius: 20px;
  padding: 16px 10px 12px;
}
.fx-card.bordered { border: 1px solid var(--fx-card-border); border-radius: 14px; }
.fx-card-head { display: flex; align-items: center; gap: 13px; padding-left: 0; }
.fx-card-title { font-weight: 700; font-size: 14px; }
.fx-card-title.sm { font-size: 14px; }

/* ── Points chart (card 1) ───────────────────────────── */
.fx-stat { font-weight: 700; font-size: 26px; line-height: normal; margin: 10px 0 0 16px; }
.fx-trend { display: flex; align-items: center; gap: 1px; font-size: 13px; margin: 8px 0 0 18px; }
.fx-trend b { color: var(--fx-green); font-weight: 700; }
.fx-trend.down b { color: var(--fx-bad); }
.fx-trend span { color: var(--fx-dim); margin-left: 3px; }
.fx-trend.down .fx-ico { transform: rotate(180deg); color: var(--fx-bad); }

.fx-chart {
  position: relative;
  display: grid;
  grid-template-columns: 34px repeat(7, 1fr);
  height: 170px;
  margin-top: 14px;
}
.fx-chart-axis {
  position: relative;
  font-weight: 700; font-size: 15px; color: var(--fx-dim);
}
.fx-chart-axis span { position: absolute; left: 8px; transform: translateY(-50%); }
.fx-chart-lines { position: absolute; left: 34px; right: 10px; top: 0; bottom: 30px; pointer-events: none; }
.fx-chart-lines i { position: absolute; left: 0; right: 0; height: 1px; background: var(--fx-card-border); }
.fx-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.fx-bar { width: 12px; border-radius: 30px; background: var(--fx-bar); min-height: 4px; }
.fx-bar.peak { background: var(--fx-bar-peak); }
.fx-bar-track { height: 140px; display: flex; align-items: flex-end; }
.fx-bar-label {
  font-weight: 700; font-size: 14px; color: var(--fx-dim);
  height: 30px; line-height: 30px;
}

/* ── Rank list (card 2) ──────────────────────────────── */
.fx-rank { margin-top: 14px; }
.fx-rank-row {
  display: flex; align-items: center;
  height: 61px;
  padding: 0 0 0 18px;
  border-radius: 20px;
}
.fx-rank-row.me { background: var(--fx-row-hi); border: 1px solid var(--fx-card-border); }
.fx-rank-row.me .fx-rank-name { color: var(--fx-gold); }
.fx-rank-num { width: 24px; font-weight: 700; font-size: 14px; }
.fx-rank-name { flex: 1; font-weight: 700; font-size: 15px; margin-left: 14px; min-width: 0; }
.fx-rank-val { font-size: 15px; color: var(--fx-dim); padding-right: 26px; white-space: nowrap; }
.fx-rank-sub { font-weight: 400; font-size: 13px; color: var(--fx-dim); margin-top: 2px; display: flex; align-items: center; gap: 4px; }

.fx-well-link {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; margin: 8px 3px 0;
  padding: 0 11px 0 41px;
  background: var(--fx-well); border-radius: 20px;
  font-weight: 700; font-size: 15px; color: var(--fx-dim);
  text-decoration: none;
}
.fx-well-link:hover { color: var(--fx-text); }

/* ── Arena hero: family photo cut into pills ─────────── */
.fx-pills {
  --w: 324.4px; --h: 314px;              /* frame x 52→376, y 102→416 */
  position: relative;
  width: var(--w); height: var(--h);
  margin: 65px auto 11px;
}
.fx-pill-photo {
  position: absolute;
  background-color: #0A172B;
  background-image: var(--photo);
  background-repeat: no-repeat;
  background-size: 559px 314px;          /* 1280×719 photo at 314/719 */
}
.fx-arena-title { font-weight: 700; font-size: 35px; line-height: normal; margin: 0 0 0 13px; }
.fx-arena-sub {
  font-size: 14px; line-height: 1.0007; color: var(--fx-dim);
  width: 180px; margin: 11px 0 21px 13px;
}

/* ── Feature card (Challenges → bounty) ──────────────── */
.fx-feature {
  position: relative;
  background: var(--fx-feature);
  border-radius: 38.45px;
  min-height: 289px;
  padding: 17px 10px 10px;
  margin: 0 13px;
  color: #fff;
}
.fx-feature-top { display: flex; gap: 23px; align-items: flex-start; }
.fx-badge { position: relative; width: 79.75px; height: 79.75px; flex-shrink: 0; }
.fx-badge img { position: absolute; }
.fx-badge .fx-badge-inner { left: 4.27px; top: 4.27px; }
.fx-badge .fx-badge-ring { left: 0; top: 0; }
.fx-badge .fx-ico { position: absolute; left: 19.9px; top: 19.9px; width: 40px; height: 40px; color: #8AB4F6; }
.fx-feature-title {
  font-weight: 700; font-size: 25.63px; line-height: normal;
  padding-top: 8.5px;
}
.fx-feature-kicker { font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-top: 8px; }
.fx-feature-body {
  font-size: 17.09px; line-height: normal; color: rgba(255, 255, 255, 0.92);
  margin: 21px 16px 0;
}
.fx-feature-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 16px 0; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.fx-feature-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fx-cta {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56.96px;
  margin-top: 22px;
  background: #D9D9D9; border: 0; border-radius: 76.9px;
  font-weight: 700; font-size: 17.09px; color: #000;
}
.fx-cta .fx-cta-circle { position: absolute; right: 5.73px; top: 9.97px; }
.fx-cta .fx-cta-chevron { position: absolute; right: 10.66px; top: 14.18px; transform: rotate(-90deg); }
.fx-clock { margin: 22px 6px 4px; }
.fx-clock-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.fx-clock-row span { display: inline-flex; align-items: center; gap: 5px; }
.fx-progress { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); overflow: hidden; }
.fx-progress > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3DA8A6 0%, #C9B23A 100%); }

.fx-soon {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--fx-active); background: rgba(138, 180, 246, 0.12);
  padding: 4px 12px; border-radius: 999px;
}
.fx-demo {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--fx-gold); background: color-mix(in srgb, var(--fx-gold) 12%, transparent);
  padding: 4px 12px; border-radius: 999px;
}

/* ── Bottom tab bar ──────────────────────────────────── */
.fx-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: flex; justify-content: space-around; align-items: flex-start;
  height: calc(78.7px + env(safe-area-inset-bottom));
  padding-top: 12px;
  background: var(--fx-tabbar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--fx-card-border);
  border-radius: 0 0 21.76px 21.76px;
}
.fx-tab {
  display: flex; flex-direction: column; align-items: center;
  width: 80px;
  font-weight: 500; font-size: 15.96px; line-height: normal;
  color: var(--fx-dim); text-decoration: none;
  opacity: .9;
}
.fx-tab .fx-tab-ico { width: 33.97px; height: 33.97px; display: flex; align-items: center; justify-content: center; margin-bottom: 2.3px; }
.fx-tab .fx-ico { width: 28px; height: 28px; }
.fx-tab .fx-tab-ico > .fx-ico[style*="34px"] { width: 34px; height: 34px; }
.fx-tab.active { color: var(--fx-active); }
.fx-tab.soon { opacity: .45; }
@media (max-width: 400px) { .fx-tab { font-size: 13px; width: 70px; } }
@media (min-width: 992px) { .fx-tabbar { display: none; } .fx-page { padding-bottom: 24px; } }
.fx-muted { color: var(--fx-dim); }
@media (min-width: 992px) {
  .fx-pills { transform: scale(1.3); margin: 110px auto 70px; }
  .fx-arena-title { font-size: 48px; }
  .fx-arena-sub { font-size: 15px; width: 300px; line-height: 1.35; }
}

/* ── Desktop top nav ─────────────────────────────────── */
.fx-topnav { background: var(--fx-tabbar-bg) !important; border-bottom: 1px solid var(--fx-card-border); backdrop-filter: blur(12px); }
.fx-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--fx-text) !important; letter-spacing: -.01em; }
.fx-brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2274F5, #41C98B); color: #fff;
}
.fx-navlink {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  color: var(--fx-dim) !important; text-decoration: none;
}
.fx-navlink:hover { color: var(--fx-text) !important; background: var(--fx-row-hi); }
.fx-navlink.active { color: var(--fx-active) !important; background: var(--fx-row-hi); }
.fx-navlink.soon { opacity: .45; cursor: default; }
.fx-navlink.soon:hover { background: none; color: var(--fx-dim) !important; }
.fx-navme { color: var(--fx-text) !important; }
.push-toggle .push-on { display: none; }
.push-toggle.subscribed .push-on { display: inline-block; }
.push-toggle.subscribed .push-off { display: none; }
@media (max-width: 1199.98px) { .fx-navlink span:not(.fx-ico):not(.avatar-chip) { display: none; } }

/* ── Shared page chrome ─────────────────────────────── */
.fx-section-title { font-weight: 700; font-size: 18px; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }
.fx-section-title .fx-ico { color: var(--fx-blue); }
.fx-sub { color: var(--fx-dim); font-size: 15px; }
.fx-input {
  width: 100%; background: var(--fx-well); color: var(--fx-text);
  border: 1px solid var(--fx-card-border); border-radius: 14px;
  padding: 12px 14px; font-size: 15px; outline: none;
}
.fx-input:focus { border-color: var(--fx-active); }
.fx-input::placeholder { color: var(--fx-dim); }
select.fx-input { appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fx-dim) 50%), linear-gradient(135deg, var(--fx-dim) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 22px;
  font-weight: 700; font-size: 14px; color: #fff; text-decoration: none;
  background: var(--fx-cta);
}
.fx-btn:hover { color: #fff; filter: brightness(1.08); }
.fx-btn.ghost { background: transparent; color: var(--fx-text); border: 1.5px solid var(--fx-card-border); }
.fx-btn.sm { padding: 7px 14px; font-size: 15px; }
.fx-btn.danger { background: color-mix(in srgb, var(--fx-bad) 15%, transparent); color: var(--fx-bad); }
.fx-btn.ok { background: color-mix(in srgb, var(--fx-good) 16%, transparent); color: var(--fx-green); }
.fx-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; border: 0;
  background: var(--fx-row-hi); color: var(--fx-dim);
}
.fx-icon-btn:hover, .fx-icon-btn.on { color: var(--fx-active); }
.fx-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--fx-row-hi); color: var(--fx-dim);
  font-size: 14px; font-weight: 600;
}
.fx-chip.pts { color: var(--fx-gold); background: color-mix(in srgb, var(--fx-gold) 12%, transparent); }
.fx-chip.good { color: var(--fx-green); background: color-mix(in srgb, var(--fx-good) 12%, transparent); }
.fx-chip.bad { color: var(--fx-bad); background: color-mix(in srgb, var(--fx-bad) 12%, transparent); }
.fx-chip.help { color: var(--fx-gold); background: color-mix(in srgb, var(--fx-gold) 12%, transparent); }
.fx-chip.team { color: var(--fx-blue); background: color-mix(in srgb, var(--fx-blue) 12%, transparent); }
.fx-divider { height: 1px; background: var(--fx-card-border); margin: 12px 0; }
.alert { border-radius: 16px !important; }

/* ── Home feed ───────────────────────────────────────── */
.fx-feed { max-width: 680px; margin: 0 auto; }
.fx-composer { padding: 16px; }
.fx-composer-text { resize: none; min-height: 64px; }
.fx-composer .photo-preview-wrap { position: relative; display: inline-block; }
.fx-composer .photo-preview-img { max-height: 180px; max-width: 100%; border-radius: 16px; object-fit: cover; }
.fx-composer .photo-clear-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; }
.fx-menu { background: var(--fx-card) !important; border: 1px solid var(--fx-card-border) !important; border-radius: 14px !important; overflow: hidden; }
.fx-menu .photo-picker-option { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fx-text); }

.fx-post { padding: 16px; margin-top: 12px; }
.fx-post-head { display: flex; align-items: center; gap: 12px; }
.fx-post-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-badge-ico { color: var(--fx-gold); display: inline-flex; }
.fx-post-meta { display: flex; align-items: center; gap: 5px; color: var(--fx-dim); font-size: 14px; margin-top: 2px; }
.fx-post-text { color: var(--fx-text); font-size: 16px; line-height: 1.45; margin: 12px 2px; white-space: pre-line; }
.fx-post-photo { display: block; margin: 0 -4px 10px; }
.fx-post-photo img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 18px; display: block; }
.fx-post-foot { display: flex; align-items: center; gap: 6px; }
.fx-react {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--fx-row-hi); color: var(--fx-dim);
  font-weight: 700; font-size: 15px;
}
.fx-react:hover { color: var(--fx-text); }
.fx-react.active { color: var(--react); background: color-mix(in srgb, var(--react) 16%, transparent); }
.fx-react .reaction-count:empty { display: none; }
.fx-toast {
  display: none; position: absolute; z-index: 9999; max-width: 220px;
  padding: 6px 12px; border-radius: 10px; text-align: center; pointer-events: none;
  background: var(--fx-card); color: var(--fx-text); border: 1px solid var(--fx-card-border);
  font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.fx-modal { background: var(--fx-card) !important; border: 1px solid var(--fx-card-border) !important; border-radius: 22px !important; color: var(--fx-text); }
.fx-feature-mini { min-height: 0; margin: 0; padding: 18px 22px; border-radius: 24px; }
.fx-feature-mini-title { font-weight: 700; font-size: 19px; line-height: 1.2; margin-top: 4px; }

/* ── Arena board ─────────────────────────────────────── */
.fx-bounty { padding: 10px 6px; border-radius: 20px; }
.fx-bounty + .fx-bounty { border-top: 1px solid var(--fx-card-border); border-radius: 0; }
.fx-bounty.me { background: var(--fx-row-hi); border-radius: 20px; }
.fx-bounty-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.fx-bounty-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 0 64px; }
.fx-bounty-actions:empty { display: none; }
.fx-note { margin: 8px 0 0 64px; font-size: 15px; color: var(--fx-dim); display: flex; gap: 5px; align-items: center; }
.fx-note.bad { color: var(--fx-bad); }
.fx-receipt { display: block; margin: 10px 0 0 64px; }
.fx-receipt img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; }
.fx-stake {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  background: var(--fx-well); border: 1px solid var(--fx-card-border); border-radius: 14px;
  padding: 5px 12px; color: var(--fx-gold); font-size: 15px;
}
.fx-stake input { width: 56px; background: transparent; border: 0; color: var(--fx-text); font-weight: 700; outline: none; padding: 0; }
.fx-stake span { color: var(--fx-dim); }
.fx-done { margin: 10px 6px 4px; }
.fx-done summary { color: var(--fx-dim); font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.fx-done-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 0 22px; font-size: 15px; text-decoration: line-through; text-decoration-color: var(--fx-dim); }
.fx-dropzone {
  display: block; position: relative; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--fx-card-border); border-radius: 18px; padding: 28px 16px;
  color: var(--fx-dim); font-size: 15px; overflow: hidden;
}
.fx-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fx-dropzone img { max-width: 100%; max-height: 220px; border-radius: 12px; }
[data-theme="flexx"] .fx-arena-sub { color: rgba(255, 255, 255, 0.62); }

/* ── Splash / sign in (Figma 1:1602) ─────────────────── */
body.fx-splash-page { background: #09131F !important; }
body.fx-splash-page > .container-xl { padding: 0; max-width: none; }
body.fx-splash-page > .container-xl > .alert { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 10; }
.fx-splash { position: fixed; inset: 0; overflow: hidden; color: #fff; font-family: "Inter", sans-serif; }
.fx-splash-photo {
  position: absolute; inset: 0;
  background: #09131F var(--photo, linear-gradient(160deg, #0B2A5E, #09131F)) 55% 20% / cover no-repeat;
}
.fx-splash-lines-top { position: absolute; top: 30px; right: 1px; transform: rotate(-1.13deg); }
.fx-splash-lines-bottom { position: absolute; bottom: 137px; right: -10px; }
.fx-splash-shade { position: absolute; left: 0; right: 0; filter: blur(1.3px); }
.fx-splash-shade.s1 { bottom: 0; height: calc(100% - 513px); min-height: 45%; background: linear-gradient(180deg, rgba(9,19,31,0) 0%, rgba(9,19,31,.54) 18%); }
.fx-splash-shade.s2 { bottom: 0; height: 253px; background: rgba(9, 19, 31, 0.79); mask: linear-gradient(180deg, transparent, #000 30%); -webkit-mask: linear-gradient(180deg, transparent, #000 30%); }
.fx-splash-shade.s3 { bottom: 0; height: 171px; background: rgba(9, 19, 31, 0.79); }

.fx-splash-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 428px; padding: 0 50px calc(27px + env(safe-area-inset-bottom)) 41px;
}
.fx-splash-title {
  font-weight: 700; font-style: italic; font-size: 48px; line-height: normal; text-shadow: 0 3px 18px rgba(0,0,0,.6);
  margin: 0 0 0 -16px; width: 282px;
}
.fx-splash-title span {
  background: linear-gradient(180deg, #7ACC77 77.4%, #2274F5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fx-splash-sub { font-size: min(24px, 6.3vw); font-weight: 600; color: #fff; line-height: 1.25; margin: 10px 0 33px -16px; white-space: nowrap; text-shadow: 0 2px 12px rgba(0,0,0,.8); }  /* half the headline size, one line */
.fx-splash-actions, .fx-splash-form { display: flex; flex-direction: column; gap: 14px; width: 337px; max-width: 100%; }
.fx-splash-form { display: none; }
.show-form .fx-splash-actions { display: none; }
.show-form .fx-splash-form { display: flex; }
.fx-splash-btn {
  height: 58px; border-radius: 43px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.fx-splash-btn.primary { border: 0; font-size: 16px; background: linear-gradient(91.96deg, #1F63D6 35.48%, #1B7F55 95.22%); }  /* Figma #2274F5→#7ACC77, darkened for white text */
.fx-splash-btn.outline { background: transparent; border: 1px solid #fff; font-size: 14px; letter-spacing: 1.8px; }
.fx-splash-form .fx-input { height: 54px; border-radius: 43px; padding: 0 24px; background: rgba(9, 19, 31, .7); border-color: rgba(255,255,255,.25); color: #fff; }
.fx-splash-error { background: color-mix(in srgb, var(--fx-bad) 16%, transparent); color: var(--fx-bad); border-radius: 14px; padding: 10px 16px; font-size: 14px; }
@media (min-width: 992px) {
  .fx-splash-content { left: 6vw; bottom: 8vh; }
  .fx-splash-shade.s1 { background: linear-gradient(90deg, rgba(9,19,31,.92) 0%, rgba(9,19,31,.7) 32%, rgba(9,19,31,0) 60%); height: 100%; }
  .fx-splash-shade.s2, .fx-splash-shade.s3 { display: none; }
  .fx-splash-title { font-size: 64px; width: 420px; }
  .fx-splash-sub { font-size: 32px; }
}

/* ── Me (profile + Your Activity, Figma 1:1794) ─────── */
.fx-narrow { max-width: 720px; }
.fx-me { display: flex; align-items: center; gap: 16px; }
.fx-me-name { font-weight: 800; font-size: 22px; }
.fx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
@media (max-width: 575.98px) { .fx-stats { grid-template-columns: repeat(2, 1fr); } }
.fx-stat-tile {
  background: var(--fx-card); border-radius: 18px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--fx-text);
}
.fx-stat-tile b { font-size: 22px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.fx-stat-tile span:last-child { font-size: 14px; color: var(--fx-dim); }

.fx-medal {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.35);
}
.fx-medal.sm { width: 56px; height: 56px; }
.fx-medal.blue   { background: radial-gradient(circle at 35% 30%, #6BA4FF, #2748C9 70%); }
.fx-medal.green  { background: radial-gradient(circle at 35% 30%, #8FE07E, #1B8F86 70%); }
.fx-medal.orange { background: radial-gradient(circle at 35% 30%, #FFC36B, #E0563B 70%); }
.fx-medal.gold   { background: radial-gradient(circle at 35% 30%, #FFE08A, #C98A10 70%); }
.fx-medal.red    { background: radial-gradient(circle at 35% 30%, #FF9A9A, #B42C3E 70%); }
.fx-medal.slate  { background: radial-gradient(circle at 35% 30%, #8AA0C2, #34466A 70%); }
.fx-medal.locked { background: var(--fx-row-hi); color: var(--fx-dim); box-shadow: inset 0 0 0 2px var(--fx-card-border); }

.fx-trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.fx-trophy { background: var(--fx-card); border-radius: 18px; padding: 14px 8px; text-align: center; opacity: .78; }
.fx-trophy.earned { opacity: 1; }
.fx-trophy .fx-medal { margin: 0 auto 8px; }
.fx-trophy-name { font-weight: 700; font-size: 14px; }
.fx-trophy-desc { font-size: 12.5px; color: var(--fx-dim); margin-top: 2px; line-height: 1.25; }

.fx-activity-title { font-weight: 700; font-size: 24px; margin: 34px 0 0; }
.fx-activity-group { font-weight: 700; font-size: 14px; margin: 24px 0 18px; }
.fx-activity { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.fx-activity-date { font-weight: 700; font-size: 13px; color: var(--fx-dim); margin-top: 6px; }
.fx-activity-value { font-weight: 700; font-size: 24px; line-height: normal; margin-top: 6px; }
.fx-activity-value.neg { color: var(--fx-bad); }
.fx-activity-desc { font-size: 13px; color: var(--fx-dim); margin-top: 6px; max-width: 300px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.fx-settings { padding: 18px; }
.fx-setting-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 10px; list-style: none; }
.fx-setting-label::-webkit-details-marker { display: none; }
.fx-setting-row { display: flex; align-items: center; justify-content: space-between; }
.theme-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; }
.theme-swatch-active { border-color: var(--fx-text); box-shadow: 0 0 0 2px var(--fx-bg) inset; }

/* ── Rewards + leaderboard (Figma 1:1651) ─────────────── */
body.fx-glow-page { background: linear-gradient(-18.13deg, var(--fx-bg) 57.4%, color-mix(in srgb, var(--fx-bg) 60%, var(--accent-primary)) 77.4%, color-mix(in srgb, var(--fx-bg) 30%, var(--accent-primary)) 98%) fixed !important; }
[data-theme="flexx"] body.fx-glow-page { background: linear-gradient(-18.13deg, #041122 57.4%, #082141 77.4%, #104488 98%) fixed !important; }
.fx-lb-hero { position: relative; padding-top: 41px; }
.fx-back { position: absolute; left: 7px; top: 41px; }
.fx-lb-floaters span { position: absolute; }
.fx-lb-floaters .f1 { right: 0; top: 46px; }
.fx-lb-floaters .f2 { right: 80px; top: 101px; }
.fx-lb-floaters .f3 { right: 120px; top: 33px; transform: scale(.8); }
.fx-lb-title { font-weight: 700; font-style: italic; font-size: 40px; line-height: normal; width: 230px; margin: 92px 0 0 19px; min-height: 152px; }
.fx-lb-progress { margin: 31px 21px 0 20px; }
.fx-lb-label { font-weight: 700; font-size: 14px; }
.fx-lb-pct { font-size: 14px; color: var(--fx-dim); margin-top: 16px; }
.fx-lb-count { font-weight: 700; font-size: 24px; line-height: 1; margin-bottom: 20px; }
.fx-lb-bar { height: 11px; border-radius: 6px; background: var(--fx-row-hi); margin-top: 1px; overflow: hidden; }
.fx-lb-bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #53C5AC 30%, rgba(236, 204, 72, 0.8) 95%); }

.fx-lb-panel { background: #030F1D; background: color-mix(in srgb, var(--fx-bg) 80%, #000); border-radius: 20px; margin: 29px -17px 0; padding: 18px 13px 20px; min-height: 365px; }
@media (min-width: 992px) { .fx-lb-panel { margin: 29px 0 0; } }
.fx-tabs { display: flex; gap: 0; margin: 0 11px 18px; overflow-x: auto; scrollbar-width: none; }
.fx-tabbtn {
  flex: 1 0 auto; background: none; border: 0; padding: 0 6px 12px; text-align: left;
  font-weight: 700; font-size: 14px; color: var(--fx-dim);
  box-shadow: inset 0 -2px 0 rgba(217, 217, 217, 0.4);
}
.fx-tabbtn.active { color: var(--fx-text); box-shadow: inset 0 -4px 0 var(--fx-blue); }
.fx-tabpane { display: none; }
.fx-tabpane.active { display: block; }
.fx-lb-row { display: flex; align-items: center; height: 80px; padding-left: 6px; }
.fx-lb-row.me { height: 66px; margin: 7px -7px; padding-left: 13px; background: color-mix(in srgb, var(--fx-bg) 85%, #fff 3%); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 36px; }
[data-theme="flexx"] .fx-lb-row.me { background: #07162B; }
.fx-lb-num { width: 52px; font-weight: 700; font-size: 14px; color: var(--fx-dim); }
.fx-lb-row.me .fx-lb-num { color: var(--fx-text); }
.fx-lb-name { flex: 1; margin-left: 32px; font-weight: 700; font-size: 15px; }
.fx-lb-row.me .fx-lb-name { color: rgba(236, 204, 72, 0.8); }
.fx-lb-val { font-size: 15px; color: var(--fx-dim); padding-right: 18px; }
.fx-lb-row.me .fx-lb-val { font-weight: 700; }

.fx-reward { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--fx-card-border); }
.fx-reward:first-child { border-top: 0; }
.fx-reward.compact { padding: 8px 6px; }
.fx-reward-cost { font-weight: 800; font-size: 15px; color: var(--fx-gold); margin-top: 2px; }
.fx-admin-h { font-weight: 700; font-size: 14px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.fx-admin-h:first-child { margin-top: 4px; }
.fx-form-grid { display: grid; grid-template-columns: 1fr 1fr 90px auto; gap: 8px; }
@media (max-width: 575.98px) { .fx-form-grid { grid-template-columns: 1fr 1fr; } }
.fx-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fx-cat-pts { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--fx-dim); margin: 0; }
.fx-cat-pts span { display: flex; align-items: center; gap: 5px; }

/* ── Skill Tree (cards: Figma 1:1830; task page: Run detail 1:1757) ── */
.fx-pills-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -8px 0 14px; padding-bottom: 2px; }
.fx-pills-nav.sub { margin-top: -4px; }
.fx-pill-tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; text-decoration: none;
  background: var(--fx-card); color: var(--fx-dim); font-weight: 600; font-size: 15px;
}
.fx-pills-nav.sub .fx-pill-tab { padding: 5px 12px; font-size: 14px; }
.fx-pill-tab.active { background: var(--fx-cta); color: #fff; }
.fx-activity-card {
  position: relative; display: flex; gap: 32px; align-items: flex-start;
  min-height: 182px; padding: 31px 20px 24px 16px; margin-bottom: 22px;
  border-radius: 20px; color: #fff; text-decoration: none;
}
.fx-activity-card:hover { color: #fff; filter: brightness(1.06); }
.fx-activity-card-ico { position: relative; width: 60px; height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.fx-activity-card-ico img { position: absolute; inset: 0; }
.fx-activity-card-ico .fx-ico { position: relative; color: #fff; }
.fx-activity-card-body { display: flex; flex-direction: column; min-width: 0; }
.fx-activity-card-title { font-weight: 500; font-size: 16px; line-height: 1.25; }
.fx-activity-card-value { font-weight: 700; font-style: italic; font-size: 32px; line-height: normal; margin-top: 12px; }
.fx-activity-card-sub { font-weight: 300; font-size: 14px; color: rgba(255, 255, 255, 0.8); margin-top: 12px; }
.fx-activity-card-done { position: absolute; top: 16px; right: 16px; color: #fff; }

.fx-task-title { font-weight: 800; font-style: italic; font-size: 32px; line-height: 1.1; margin: 6px 0 8px; }
.fx-task-desc { color: var(--fx-dim); font-size: 15px; }
.fx-video { border-radius: 20px; overflow: hidden; background: #000; margin: 16px 0 10px; }
#yt-player-wrap { position: relative; padding-bottom: 56.25%; height: 0; }
#yt-player { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-watch { margin-bottom: 8px; }
.fx-stat-rows { margin-top: 12px; }
.fx-stat-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--fx-card-border); font-size: 15px;
}
.fx-stat-row .fx-ico { color: var(--fx-text); }
.fx-stat-row > span:not(.fx-ico) { flex: 1; font-weight: 600; }
.fx-stat-row b { font-weight: 700; }
.fx-quiz { border: 0; margin: 0 0 16px; padding: 0; }
.fx-quiz legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; float: none; }
.fx-choice { display: block; margin: 0 0 6px; cursor: pointer; }
.fx-choice input { position: absolute; opacity: 0; }
.fx-choice span {
  display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px;
  background: var(--fx-well); border: 1px solid var(--fx-card-border); font-size: 14px;
}
.fx-choice span b { color: var(--fx-dim); }
.fx-choice input:checked + span { border-color: var(--fx-active); background: color-mix(in srgb, var(--fx-active) 14%, transparent); }
.fx-btn:disabled { opacity: .45; filter: grayscale(.5); }

/* ── Callouts ────────────────────────────────────────── */
.fx-vs { display: flex; flex-shrink: 0; }
.fx-vs .fx-avatar + .fx-avatar { margin-left: -14px; }

/* ── Callout answer screen (Figma 1:1722) ─────────────── */
body.fx-callout-page > .container-xl { max-width: 560px; }
.fx-callout { position: relative; min-height: calc(100vh - 110px); overflow: hidden; margin: 0 -17px; padding: 0 17px 20px; }
.fx-callout-map { position: absolute; left: 0; top: -35px; width: 100%; height: calc(100% + 35px); object-fit: cover; opacity: .9; pointer-events: none; }
.fx-callout-route { position: absolute; left: 18px; top: 263px; pointer-events: none; opacity: .9; }
.fx-callout > *:not(img) { position: relative; }
.fx-callout-head { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 76px; }
.fx-callout-title { font-weight: 700; font-size: 48px; line-height: normal; margin: 0 0 0 20px; }
.fx-callout-date { font-weight: 700; font-size: 16px; color: rgba(217, 217, 217, 0.5); margin: 6px 0 0 20px; }
.fx-callout-avatar { margin: 5px 6px 0 0; }
.fx-callout-body { padding: 0 20px; }
.fx-callout-dare { font-weight: 700; font-size: 20px; line-height: 1.3; margin: 34px 0 10px; color: #fff; }
.fx-callout-meta { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.75); }
.fx-callout-meta span { display: flex; align-items: center; gap: 6px; }
.fx-ready { font-weight: 700; font-size: 64px; line-height: normal; margin: 34px 0 0 43px; width: 286px; }
.fx-ready span { background: linear-gradient(180deg, #B9D868 77.4%, #0491AF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-go-wrap { display: flex; justify-content: center; margin-top: 10px; }
.fx-go { position: relative; width: 297px; height: 297px; border: 0; background: none; padding: 0; }
.fx-go img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.fx-go .g0 { width: 605px; height: 605px; top: calc(50% + 65px); }
.fx-go span { position: relative; font-weight: 700; font-size: 32px; color: #fff; }
.fx-go:hover .gc { filter: brightness(1.12); }
.fx-go:disabled { opacity: .45; }
.fx-backdown { position: relative; z-index: 1; background: none; border: 0; color: rgba(255,255,255,.8); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.fx-backdown:hover { color: var(--fx-bad); }
.fx-callout-note { position: relative; z-index: 1; text-align: center; color: var(--fx-gold); font-size: 15px; }
.fx-callout-status { margin-top: 40px; font-weight: 700; font-size: 22px; }
.fx-record-row { text-decoration: none; padding: 10px 0; }
.fx-record-row + .fx-record-row { border-top: 1px solid var(--fx-card-border); }

/* ── Chores ──────────────────────────────────────────── */
button.fx-activity-card { font: inherit; cursor: pointer; }
.fx-dropped { padding: 16px; border: 1px solid color-mix(in srgb, var(--fx-bad) 35%, transparent); margin-bottom: 18px; }
.fx-roster { padding: 14px 16px; margin-bottom: 10px; }
.fx-roster-bar { width: 90px; height: 8px; border-radius: 6px; background: var(--fx-row-hi); overflow: hidden; }
.fx-roster-bar > div { height: 100%; background: linear-gradient(90deg, #2274F5, #41C98B); }
.fx-roster-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--fx-card-border); }
.fx-roster-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fx-dim); flex-shrink: 0; }
.fx-roster-dot.done, .fx-roster-dot.late { background: var(--fx-green); }
.fx-roster-dot.missed { background: var(--fx-gold); }
.fx-roster-dot.rescued { background: var(--fx-blue); }
.fx-pool-pick input { position: absolute; opacity: 0; }
.fx-pool-pick span { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--fx-row-hi); color: var(--fx-dim); font-weight: 600; font-size: 15px; cursor: pointer; }
.fx-pool-pick input:checked + span { background: var(--fx-cta); color: #fff; }
.fx-form-grid.fx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fx-form-grid.fx-grid-name { grid-template-columns: 1fr 110px; }
@media (max-width: 575.98px) { .fx-form-grid.fx-grid-3 { grid-template-columns: 1fr; } }

/* ── Props ───────────────────────────────────────────── */
.fx-props-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.fx-props-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--fx-gold) 12%, transparent); color: var(--fx-gold); font-size: 14px; font-weight: 700; }
.fx-props-wrap { position: relative; }
.fx-props-btn span:not(.fx-ico) { font-size: 14px; }
.fx-props-menu { display: none; position: absolute; right: 0; bottom: calc(100% + 6px); min-width: 230px; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.fx-props-menu-head { padding: 10px 14px 6px; font-size: 14px; color: var(--fx-dim); font-weight: 600; }
.fx-props-menu form { margin: 0; }
.fx-props-menu .photo-picker-option { border-top: 1px solid var(--fx-card-border); }

/* ── Family testing (/uat) ───────────────────────────── */
.fx-flip { transform: rotate(180deg); }
.fx-uat-hero { padding: 18px; }
.fx-uat-legend { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: 14px; }
.fx-uat-legend li { display: flex; align-items: center; gap: 8px; color: var(--fx-dim); }
.fx-uat-totals { display: flex; gap: 10px; margin-top: 14px; }
.fx-uat-totals > div { flex: 1; background: var(--fx-row-hi); border-radius: 16px; padding: 10px 14px; font-size: 14px; color: var(--fx-dim); }
.fx-uat-totals b { font-size: 24px; color: var(--fx-text); }
.fx-uat-totals span { display: block; font-size: 14px; }
.fx-uat-suites { display: grid; gap: 10px; margin-top: 14px; }
.fx-uat-suite { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--fx-card); border-radius: 20px; color: var(--fx-text); text-decoration: none; }
.fx-uat-suite:hover { color: var(--fx-text); background: var(--fx-row-hi); }
.fx-uat-bar { display: block; height: 6px; border-radius: 4px; background: var(--fx-row-hi); margin-top: 8px; overflow: hidden; }
.fx-uat-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #2274F5, #41C98B); }
.fx-uat-test { padding: 18px; margin-top: 16px; scroll-margin-top: 80px; }
.fx-uat-num { width: 28px; height: 28px; border-radius: 50%; background: var(--fx-row-hi); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.fx-uat-title { font-size: 17px; font-weight: 800; margin: 3px 0 0; }
.fx-uat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 767.98px) { .fx-uat-cols { grid-template-columns: 1fr; gap: 8px; } }
.fx-uat-h { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-dim); margin: 0 0 8px; }
.fx-uat-steps { padding-left: 0; margin: 0; list-style: none; counter-reset: step; }
.fx-uat-steps li { margin-bottom: 8px; }
.fx-uat-steps label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.fx-uat-steps input { margin-top: 3px; accent-color: #41C98B; width: 18px; height: 18px; flex-shrink: 0; }
.fx-uat-steps input:checked + span { color: var(--fx-dim); text-decoration: line-through; }
.fx-uat-expect { padding-left: 18px; margin: 0; font-size: 14px; line-height: 1.4; }
.fx-uat-expect li { margin-bottom: 6px; }
.fx-uat-expect li::marker { color: var(--fx-green); }
.fx-uat-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 10px; }
.fx-uat-pick {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 42px; border-radius: 14px; border: 1.5px solid var(--fx-card-border);
  background: transparent; color: var(--fx-dim); font-weight: 700; font-size: 14px;
}
.fx-uat-pick.on.pass    { background: color-mix(in srgb, var(--fx-good) 18%, transparent); border-color: var(--fx-good); color: var(--fx-good); }
.fx-uat-pick.on.fail    { background: color-mix(in srgb, var(--fx-bad) 18%, transparent); border-color: var(--fx-bad); color: var(--fx-bad); }
.fx-uat-pick.on.blocked { background: color-mix(in srgb, var(--fx-gold) 18%, transparent); border-color: var(--fx-gold); color: var(--fx-gold); }
.fx-uat-pick.on.skip    { background: var(--fx-row-hi); border-color: var(--fx-dim); color: var(--fx-text); }
.fx-uat-comment { resize: vertical; font-size: 14px; }
.fx-uat-saved { min-height: 18px; margin-top: 4px; font-size: 14px; }
.fx-uat-others { margin-top: 12px; border-top: 1px solid var(--fx-card-border); padding-top: 10px; }
.fx-uat-other { display: flex; gap: 10px; padding: 6px 0; }
.fx-uat-comment-view { margin: 6px 0 0; font-size: 14px; white-space: pre-line; color: var(--fx-text); }
.fx-uat-matrix-wrap { padding: 8px; overflow-x: auto; }
.fx-uat-matrix { width: 100%; border-collapse: collapse; font-size: 15px; }
.fx-uat-matrix th { font-size: 14px; color: var(--fx-dim); padding: 8px; text-align: center; white-space: nowrap; }
.fx-uat-matrix th:first-child { text-align: left; }
.fx-uat-matrix td { padding: 7px 8px; border-top: 1px solid var(--fx-card-border); }
.fx-uat-matrix tr.suite td { font-weight: 800; padding-top: 14px; }
.fx-uat-matrix a { color: var(--fx-text); text-decoration: none; }
.fx-dot { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--fx-row-hi); color: var(--fx-dim); }
.fx-dot.pass { background: color-mix(in srgb, var(--fx-good) 20%, transparent); color: var(--fx-good); }
.fx-dot.fail { background: color-mix(in srgb, var(--fx-bad) 20%, transparent); color: var(--fx-bad); }
.fx-dot.blocked { background: color-mix(in srgb, var(--fx-gold) 20%, transparent); color: var(--fx-gold); }
.fx-uat-issue { padding: 14px 16px; margin-bottom: 8px; }
.fx-uat-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 18px; text-decoration: none; color: #fff;
  background: var(--fx-cta); font-weight: 700; }
.fx-uat-banner:hover { color: #fff; filter: brightness(1.06); }

/* Gold "You" text is for dark themes; light themes use their warning color */
:root:not([data-theme="flexx"]):not([data-theme="cobalt-sky"]):not([data-theme="under-the-moonlight"]) .fx-rank-row.me .fx-rank-name,
:root:not([data-theme="flexx"]):not([data-theme="cobalt-sky"]):not([data-theme="under-the-moonlight"]) .fx-lb-row.me .fx-lb-name { color: var(--btn-warning-color); }
.fx-badge-more { font-size: 13px; font-weight: 800; color: var(--fx-gold); opacity: .8; }

/* Status colors per theme, chosen for ≥4.5:1 on the theme's cards and page
   (generated by the contrast audit; see git history for the script). */
:root { --fx-gold: #F4C542; --fx-good: #41C98B; --fx-bad: #F87171; --fx-fire: #FB923C; --fx-love: #F43F5E; }
[data-theme="golden-taupe"] { --fx-gold: #8A6100; --fx-good: #0F7A4F; --fx-bad: #B91C1C; --fx-fire: #B45309; --fx-love: #BE123C; }
[data-theme="beachfront-views"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #8F1515; --fx-fire: #8A3F06; --fx-love: #9A0F31; }
[data-theme="under-the-moonlight"] { --fx-gold: #F4C542; --fx-good: #41C98B; --fx-bad: #F87171; --fx-fire: #FB923C; --fx-love: #F43F5E; }
[data-theme="minty-fresh"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #B91C1C; --fx-fire: #8A3F06; --fx-love: #BE123C; }
[data-theme="frozen-lake"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #8F1515; --fx-fire: #8A3F06; --fx-love: #9A0F31; }
[data-theme="autumn-orchard"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #8F1515; --fx-fire: #8A3F06; --fx-love: #9A0F31; }
[data-theme="harvest-moon"] { --fx-gold: #F4C542; --fx-good: #41C98B; --fx-bad: #F87171; --fx-fire: #FB923C; --fx-love: #F43F5E; }
[data-theme="chili-spice"] { --fx-gold: #F4C542; --fx-good: #41C98B; --fx-bad: #F87171; --fx-fire: #FB923C; --fx-love: #F43F5E; }
[data-theme="wisteria-bloom"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #8F1515; --fx-fire: #8A3F06; --fx-love: #9A0F31; }
[data-theme="zesty-lemon"] { --fx-gold: #8A6100; --fx-good: #0F7A4F; --fx-bad: #B91C1C; --fx-fire: #8A3F06; --fx-love: #BE123C; }
[data-theme="mango-popsicle"] { --fx-gold: #6E4D00; --fx-good: #0A5C3B; --fx-bad: #B91C1C; --fx-fire: #8A3F06; --fx-love: #BE123C; }
[data-theme="flexx"] { --fx-gold: #F4C542; --fx-good: #41C98B; --fx-bad: #F87171; --fx-fire: #FB923C; --fx-love: #F43F5E; }

/* ── Brand mark ──────────────────────────────────────── */
.fx-brand-logo { border-radius: 9px; display: block; }
/* Logo + wordmark lockup: the mark and "FLEXX" sit tight together, sharing a baseline centre */
.fx-lockup { display: flex; align-items: center; gap: 12px; }
.fx-lockup img { border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.35); flex-shrink: 0; }
.fx-wordmark {
  font-family: "Inter", sans-serif; font-weight: 900; font-style: italic;
  font-size: 38px; line-height: 1; letter-spacing: -0.02em; color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.fx-wordmark span {
  background: linear-gradient(90deg, #4C8DFF 0%, #41C98B 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 10px rgba(0,0,0,.5));
  padding-right: .06em;                     /* keeps the italic X from clipping */
}
.fx-splash-lockup { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 25px; z-index: 2; }
.fx-splash-title span { text-shadow: none; filter: drop-shadow(0 3px 12px rgba(0,0,0,.55)); }
.fx-nav-lockup { gap: 9px; }
.fx-nav-lockup img { border-radius: 9px; box-shadow: none; }
.fx-nav-lockup .fx-wordmark { font-size: 24px; text-shadow: none; color: var(--fx-text); }
.fx-nav-lockup .fx-wordmark span { filter: none; background-image: linear-gradient(90deg, var(--fx-active) 0%, var(--fx-good) 100%); }  /* theme-tuned so it reads on light themes too */
.fx-version { text-align: center; color: var(--fx-dim); font-size: 13px; margin: 28px 0 0; }

/* ── Multi-photo sets (1–3 per flex or receipt) ──────── */
.fx-photos { display: block; }
.fx-photos img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 18px; display: block; }
.fx-photos.multi { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.fx-photos.multi::-webkit-scrollbar { display: none; }
.fx-photos.multi > a { flex: 0 0 86%; scroll-snap-align: start; }
.fx-photos.multi img { height: 320px; }
@media (min-width: 992px) { .fx-photos.multi > a { flex-basis: 48%; } }
.fx-photos-count { font-size: 13px; color: var(--fx-dim); margin: -4px 2px 8px; }
.fx-receipt.fx-photos { margin: 10px 0 0 64px; }
.fx-receipt.fx-photos img { max-height: 240px; }
.fx-pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-pick { position: relative; width: 96px; height: 96px; }
.fx-pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.fx-pick-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 24px; padding: 0; }
.photo-toggle-btn:disabled { opacity: .4; }

/* ── 2.1 economy UI ──────────────────────────────────── */
.fx-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fx-tier { margin: 0; cursor: pointer; }
.fx-tier input { position: absolute; opacity: 0; }
.fx-tier span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 14px;
  background: var(--fx-row-hi); border: 1.5px solid transparent; color: var(--fx-dim); }
.fx-tier b { font-size: 14px; color: var(--fx-text); }
.fx-tier small { font-size: 13px; font-weight: 700; }
.fx-tier input:checked + span { border-color: var(--fx-active); background: color-mix(in srgb, var(--fx-active) 14%, transparent); }
.fx-tier input:checked + span small { color: var(--fx-gold); }
.fx-tier input:disabled + span { opacity: .5; cursor: default; }
.fx-tier input:focus-visible + span { outline: 2px solid var(--fx-active); outline-offset: 2px; }
.fx-rate-hint { font-size: 14px; color: var(--fx-dim); margin-top: 8px; min-height: 18px; }
.fx-rate-hint.low { color: var(--fx-gold); font-weight: 600; }
.fx-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--fx-row-hi); font-size: 14px; color: var(--fx-text); }
.fx-check.disputed { border: 1px solid color-mix(in srgb, var(--fx-bad) 50%, transparent); }
.fx-check form { margin: 0; }
.fx-check-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; text-decoration: none; color: var(--fx-text);
  border: 1px solid color-mix(in srgb, var(--fx-gold) 45%, transparent); }
.fx-check-card:hover { color: var(--fx-text); }
.fx-check-count { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--fx-gold) 18%, transparent); color: var(--fx-gold); font-weight: 800; font-size: 18px; }
.fx-weeks { font-weight: 600; color: var(--fx-dim); font-size: 13px; margin-left: 4px; }

/* ── Economy dashboard (2.1) ─────────────────────────── */
.fx-eco-card { padding: 16px; }
.fx-eco-flags { margin: 0; padding-left: 18px; }
.fx-eco-flags li { margin: 4px 0; }
.fx-eco-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--fx-dim); margin-bottom: 6px; }
.fx-eco-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fx-eco-person { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--fx-card-border); }
.fx-eco-person:first-of-type { border-top: 0; }
.fx-eco-bar { position: relative; display: flex; height: 10px; border-radius: 5px; background: var(--fx-well); overflow: hidden; margin-top: 6px; }
.fx-eco-bar em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fx-text); opacity: .7; }
.fx-eco-parts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--fx-dim); margin-top: 6px; }
.fx-eco-parts b { color: var(--fx-text); }
.fx-eco-chart { display: flex; gap: 6px; height: 150px; align-items: stretch; }
.fx-eco-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.fx-eco-col small { font-size: 12px; color: var(--fx-dim); margin-top: 4px; }
.fx-eco-pair { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.fx-eco-pair span { width: 40%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.fx-eco-pair .in { background: var(--fx-good); }
.fx-eco-pair .out { background: var(--fx-bad); }
.fx-eco-scroll { overflow-x: auto; }
.fx-eco-table { width: 100%; font-size: 13px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fx-eco-table th, .fx-eco-table td { padding: 6px 3px; text-align: right; white-space: nowrap; }
.fx-eco-table thead th { color: var(--fx-dim); font-weight: 600; font-size: 12px; }
.fx-eco-table tbody th { text-align: left; font-weight: 700; }
.fx-eco-table tbody tr + tr { border-top: 1px solid var(--fx-card-border); }
.fx-eco-table td.ok { color: var(--fx-good); font-weight: 700; }
.fx-eco-table td.hi { color: var(--fx-bad); font-weight: 700; }
.fx-eco-big { font-size: 22px; font-weight: 800; }
.fx-eco-warn { color: var(--fx-bad); font-weight: 600; display: flex; gap: 6px; align-items: center; margin: 10px 0 0; }

/* ── Allowance: paycheck card, payday review, paystub ── */
.fx-pay-big { font-size: 42px; font-weight: 800; line-height: 1.1; }
.fx-pay-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--fx-card-border); }
.fx-pay-line:first-child { border-top: 0; }
.fx-pay-line .amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.fx-pay-line .amt.pos { color: var(--fx-green); }
.fx-pay-line .amt.neg { color: var(--fx-dim); }
.fx-pay-line.total { font-weight: 800; border-top: 2px solid var(--fx-card-border); }
.fx-pay-note { font-size: 13px; color: var(--fx-dim); }
.fx-pay-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.fx-pay-chore { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 0; border-top: 1px solid var(--fx-card-border); }
.fx-pay-chore:first-child { border-top: 0; }
.fx-pay-chore form { margin: 0; }
.fx-pay-banner { border-left: 4px solid var(--fx-blue); }

/* ── Household pulse ── */
.fx-pulse-plot { position: relative; display: flex; gap: 6px; height: 130px; border-bottom: 1px solid var(--fx-card-border); }
.fx-pulse-col { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.fx-pulse-col .bar { width: 62%; max-width: 30px; min-height: 3px; border-radius: 6px 6px 0 0; background: var(--fx-blue); }
.fx-pulse-col .bar.team { background: var(--fx-good); }
.fx-pulse-col .bar.partial { opacity: .55; }
.fx-pulse-goal { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed color-mix(in srgb, var(--fx-good) 70%, transparent); pointer-events: none; }
.fx-pulse-labels { display: flex; gap: 6px; margin-top: 4px; }
.fx-pulse-labels span { flex: 1; min-width: 0; text-align: center; font-size: 12px; line-height: 1.3; color: var(--fx-dim); }
.fx-pulse-labels b { color: var(--fx-text); }

/* ── Family Quest ── */
.fx-quest-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.fx-quest-dots i { width: 14px; height: 14px; border-radius: 4px; background: var(--fx-well); }
.fx-quest-dots i.team { background: var(--fx-good); }
.fx-quest-dots i.now { background: transparent; box-shadow: inset 0 0 0 2px var(--fx-blue); }
.fx-quest-dots i.future { opacity: .45; }
.fx-quest-card { margin-bottom: 12px; }
.fx-quest-card.next { border-left: 4px solid var(--fx-blue); }
.fx-quest-card.unlocked { border-left: 4px solid var(--fx-good); }
.fx-quest-card.misogi { border-left: 4px solid var(--fx-gold); }

/* Photo buttons: Take photo / Choose from gallery */
.fx-pick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fx-pick-actions .fx-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }

/* ── Chore setup: numbered turn order, drag to reorder ───────── */
.fx-pool-pick { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fx-pool-n { display: none; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: rgba(255,255,255,.25);
  font-size: 12px; line-height: 20px; text-align: center; vertical-align: 1px; }
.fx-pool-pick input:checked + span .fx-pool-n { display: inline-block; }
.fx-pool-pick input:focus-visible + span { outline: 2px solid var(--fx-active); outline-offset: 2px; }
#pool.can-sort .fx-pool-pick input:checked + span { cursor: grab; touch-action: none; }
.fx-pool-pick.dragging { position: relative; z-index: 5; }
.fx-pool-pick.dragging span { cursor: grabbing; transform: scale(1.06); box-shadow: 0 8px 22px rgba(0,0,0,.45); }
