/* THE OPEN — design system.
   Dark arena look: near-black base, podium gold accent, per-slot colour coding.
   Sibling to the BFT Carina app but its own identity (gold-led, not cyan-led). */

:root {
  /* surfaces */
  --bg:        #07080c;
  --bg-2:      #0d0f16;
  --card:      #12151f;
  --card-2:    #191d2a;
  --line:      #252a3a;
  --line-soft: #1b1f2c;

  /* text */
  --tx:        #ffffff;
  --tx-2:      #a8adbd;
  --tx-3:      #6b7185;

  /* brand */
  --gold:      #FFC22E;
  --gold-dk:   #E0A200;
  --gold-glow: rgba(255,194,46,.28);

  /* slots */
  --strength:  #FFC22E;
  --cardio:    #2FD4FF;
  --run:       #5BE37D;

  /* semantics */
  --live:      #FF3B5C;
  --ok:        #34D399;
  --warn:      #FBBF24;
  --male:      #2F80FF;
  --female:    #FF5C93;

  /* podium */
  --p1: #FFD34E;
  --p2: #C7CEDB;
  --p3: #D98A4B;

  --r:   14px;
  --r-s: 10px;
  --shadow: 0 10px 34px rgba(0,0,0,.5);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Broadcast face for ranks, points and board titles. Carried over from the Carina
     app on purpose — the sans/Impact contrast is what makes a board read as a board. */
  --display: Impact, 'Arial Black', 'Haettenschweiler', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body::before {                       /* arena glow + faint grid, behind everything */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255,194,46,.11), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(47,212,255,.06), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.014) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.014) 39px 40px);
}

.fc-wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 0 14px 120px; }
.fc-wide { max-width: 1100px; }

/* ── type ─────────────────────────────────────────────────────────────────── */
.fc-h1 { font-size: 21px; font-weight: 900; letter-spacing: -.3px; margin: 0; }
.fc-h2 { font-size: 15px; font-weight: 800; letter-spacing: .2px; margin: 0; }
.fc-eyebrow {
  font-size: 10px; font-weight: 900; letter-spacing: 2.2px;
  color: var(--tx-3); text-transform: uppercase;
}
.fc-mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.fc-dim { color: var(--tx-2); }
.fc-dimmer { color: var(--tx-3); }

/* ── header ───────────────────────────────────────────────────────────────── */
.fc-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7,8,12,.86);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
}
.fc-topbar-in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.fc-wide .fc-topbar-in, .fc-topbar-in.fc-wide { max-width: 1100px; }
.fc-logo {
  font-size: 15px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(135deg, #fff 20%, var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── cards ────────────────────────────────────────────────────────────────── */
.fc-card {
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
}
.fc-card-flush { padding: 0; overflow: hidden; }
.fc-card-gold { border-color: rgba(255,194,46,.35); box-shadow: 0 0 0 1px rgba(255,194,46,.07) inset; }

.fc-row { display: flex; align-items: center; gap: 12px; }
.fc-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-grow { flex: 1; min-width: 0; }
.fc-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── pills / chips ────────────────────────────────────────────────────────── */
.fc-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  background: var(--card-2); color: var(--tx-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.fc-pill-live {
  background: rgba(255,59,92,.14); color: #FF6B85; border-color: rgba(255,59,92,.4);
}
.fc-pill-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); animation: fcPulse 1.6s infinite;
}
@keyframes fcPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.fc-pill-gold { background: rgba(255,194,46,.14); color: var(--gold); border-color: rgba(255,194,46,.4); }
.fc-pill-ok   { background: rgba(52,211,153,.13); color: var(--ok); border-color: rgba(52,211,153,.35); }
.fc-pill-warn { background: rgba(251,191,36,.13); color: var(--warn); border-color: rgba(251,191,36,.35); }

/* ── segmented control ───────────────────────────────────────────────────── */
.fc-seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: 12px; margin-bottom: 12px;
}
.fc-seg button {
  flex: 1; padding: 9px 6px; border: 0; border-radius: 9px;
  background: transparent; color: var(--tx-3);
  font-family: var(--font); font-size: 11.5px; font-weight: 800; letter-spacing: .8px;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.fc-seg button.on { background: var(--card-2); color: var(--tx); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.fc-seg-gold button.on { background: linear-gradient(135deg, var(--gold), var(--gold-dk)); color: #1a1200; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.fc-btn {
  display: block; width: 100%; padding: 13px;
  border: 0; border-radius: 12px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: #1a1200; font-family: var(--font);
  font-size: 14px; font-weight: 900; letter-spacing: 1.4px;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -8px 18px rgba(0,0,0,.16);
  transition: transform .12s;
}
.fc-btn::after {                     /* slow sheen sweep — the "premium" tell */
  content: ''; position: absolute; top: -60%; left: -70%; width: 45%; height: 220%;
  background: linear-gradient(78deg, transparent, rgba(255,255,255,.34), transparent);
  transform: rotate(10deg); animation: fcSheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fcSheen { 0%, 55% { left: -70%; } 85%, 100% { left: 130%; } }
.fc-btn-ghost::after, .fc-btn:disabled::after { display: none; }
.fc-btn:active { transform: scale(.985); }
.fc-btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.fc-btn-ghost {
  background: var(--card-2); color: var(--tx);
  border: 1px solid var(--line); box-shadow: none;
}
.fc-btn-sm { padding: 10px 14px; width: auto; font-size: 12px; letter-spacing: 1px; }

/* ── inputs ───────────────────────────────────────────────────────────────── */
.fc-label {
  display: block; font-size: 10px; font-weight: 900; letter-spacing: 1.6px;
  color: var(--tx-3); text-transform: uppercase; margin: 0 0 6px;
}
.fc-input, .fc-select, .fc-textarea {
  width: 100%; padding: 13px 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-s); color: var(--tx);
  font-family: var(--font); font-size: 15px; font-weight: 600;
  appearance: none;
}
.fc-input:focus, .fc-select:focus, .fc-textarea:focus {
  outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,194,46,.13);
}
.fc-input::placeholder { color: var(--tx-3); font-weight: 500; }
.fc-field { margin-bottom: 14px; }
.fc-hint { font-size: 11px; color: var(--tx-3); margin-top: 5px; }
.fc-input[type=number]::-webkit-outer-spin-button,
.fc-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fc-input[type=number] { -moz-appearance: textfield; }
.fc-score-input {
  font-size: 34px; font-weight: 900; text-align: center; letter-spacing: 1px;
  padding: 18px 14px; font-variant-numeric: tabular-nums;
}

/* ── leaderboard rows ─────────────────────────────────────────────────────── */
.fc-lb { display: flex; flex-direction: column; }
.fc-lb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 9.5px; font-weight: 900; letter-spacing: 1.4px; color: var(--tx-3);
  text-transform: uppercase;
}
.fc-lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.fc-lb-row:last-child { border-bottom: 0; }
.fc-lb-row.me { background: rgba(255,194,46,.07); box-shadow: inset 3px 0 0 var(--gold); }
/* podium rows: the WHOLE row wears the medal — 1st gold, 2nd silver, 3rd bronze */
.fc-lb-row.row1 { background: linear-gradient(90deg, rgba(255,211,78,.2), rgba(255,211,78,.03)); box-shadow: inset 3px 0 0 var(--p1); }
.fc-lb-row.row2 { background: linear-gradient(90deg, rgba(199,206,219,.16), rgba(199,206,219,.02)); box-shadow: inset 3px 0 0 var(--p2); }
.fc-lb-row.row3 { background: linear-gradient(90deg, rgba(217,138,75,.16), rgba(217,138,75,.02)); box-shadow: inset 3px 0 0 var(--p3); }
.fc-lb-row.row1 .fc-lb-val, .fc-lb-row.row1 .fc-lb-pts { color: var(--p1); }
.fc-lb-row.row2 .fc-lb-val, .fc-lb-row.row2 .fc-lb-pts { color: var(--p2); }
.fc-lb-row.row3 .fc-lb-val, .fc-lb-row.row3 .fc-lb-pts { color: var(--p3); }
.fc-lb-row.out { opacity: .42; }
.fc-lb-row.out .fc-lb-name { text-decoration: line-through; }

.fc-rank {
  flex: 0 0 30px; text-align: center;
  font-size: 16px; font-weight: 900; color: var(--tx-2);
  font-variant-numeric: tabular-nums;
}
.fc-rank.r1 { color: var(--p1); } .fc-rank.r2 { color: var(--p2); } .fc-rank.r3 { color: var(--p3); }

/* Podium placing pills on the overall board: 1st gold, 2nd silver, 3rd bronze. */
.fc-rankpill.r1, .fc-rankpill.r2, .fc-rankpill.r3 {
  flex: 0 0 34px; padding: 6px 0; border-radius: 9px;
  font-size: 15px; color: #15130a;
}
.fc-rankpill.r1 { background: linear-gradient(160deg, #FFE289, var(--p1) 55%, #C99B00); box-shadow: 0 2px 10px rgba(255,211,78,.35); }
.fc-rankpill.r2 { background: linear-gradient(160deg, #EEF1F7, var(--p2) 55%, #8F99AB); box-shadow: 0 2px 10px rgba(199,206,219,.25); }
.fc-rankpill.r3 { background: linear-gradient(160deg, #F0B98A, var(--p3) 55%, #9C5A24); box-shadow: 0 2px 10px rgba(217,138,75,.3); }

.fc-av {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 900; color: var(--tx-2);
  overflow: hidden; object-fit: cover;
}
.fc-av img { width: 100%; height: 100%; object-fit: cover; }
.fc-av.r1 { border-color: var(--p1); box-shadow: 0 0 0 2px rgba(255,211,78,.22); }

.fc-lb-name { font-size: 14px; font-weight: 800; }
.fc-lb-sub { font-size: 10.5px; color: var(--tx-3); font-weight: 600; margin-top: 1px; }
.fc-lb-val {
  flex: 0 0 auto; text-align: right;
  font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.fc-lb-pts { flex: 0 0 46px; text-align: right; font-size: 15px; font-weight: 900; color: var(--gold); }

.fc-gymtag {
  display: inline-block; padding: 2px 6px; border-radius: 5px;
  font-size: 9px; font-weight: 900; letter-spacing: .8px;
  background: var(--card-2); color: var(--tx-2); border: 1px solid var(--line);
}

/* ── podium ───────────────────────────────────────────────────────────────── */
.fc-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 14px; }
.fc-pod {
  background: linear-gradient(180deg, var(--card-2), var(--bg-2));
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px; text-align: center;
}
.fc-pod-1 {
  border-color: rgba(255,211,78,.55);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255,211,78,.24), transparent 70%),
    linear-gradient(180deg, rgba(255,211,78,.1), var(--bg-2));
  padding-top: 18px;
  box-shadow: 0 0 34px rgba(255,211,78,.14), inset 0 1px 0 rgba(255,211,78,.25);
}
.fc-pod-2 { border-color: rgba(199,206,219,.35); }
.fc-pod-3 { border-color: rgba(217,138,75,.35); }
.fc-pod-name { font-size: 11.5px; font-weight: 800; }
.fc-pod-val { font-size: 13px; font-weight: 900; color: var(--gold); margin-top: 3px; }
.fc-pod-medal { font-size: 34px; line-height: 1.1; margin-bottom: 6px; }
.fc-pod-1 .fc-pod-medal { font-size: 44px; filter: drop-shadow(0 0 14px rgba(255,211,78,.45)); }

/* ── broadcast type + hero panels ─────────────────────────────────────────── */
.fc-disp { font-family: var(--display); font-weight: normal; letter-spacing: 2px; text-transform: uppercase; }
.fc-rank, .fc-lb-pts, .fc-stat-v, .fc-pod-val { font-family: var(--display); font-weight: normal; }

/* Signature hero: accent bloom + 4px left stripe + giant watermark glyph. */
.fc-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r); padding: 14px 16px 14px 19px; margin-bottom: 12px;
  background:
    radial-gradient(ellipse at top right, rgba(255,194,46,.2), transparent 62%),
    linear-gradient(180deg, #1a1712, #0a0a08);
  border: 1px solid rgba(255,194,46,.42);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,194,46,.09);
}
.fc-hero::before {
  content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--gold), #7a5c00);
}
.fc-hero-mark {
  position: absolute; right: -4px; bottom: -18px;
  font-size: 86px; line-height: 1; opacity: .06; pointer-events: none;
}
.fc-hero-title {
  font-family: var(--display); font-size: 21px; letter-spacing: 3px;
  color: var(--gold); text-shadow: 0 0 26px rgba(255,194,46,.42); text-transform: uppercase;
}
.fc-hero-sub { font-family: var(--display); font-size: 10px; letter-spacing: 3px; color: var(--tx-3); text-transform: uppercase; margin-top: 3px; }
/* slot-tinted variants */
.fc-hero.cardio { background: radial-gradient(ellipse at top right, rgba(47,212,255,.2), transparent 62%), linear-gradient(180deg, #0d1a20, #08090c); border-color: rgba(47,212,255,.42); }
.fc-hero.cardio::before { background: linear-gradient(180deg, var(--cardio), #0a4c5e); }
.fc-hero.cardio .fc-hero-title { color: var(--cardio); text-shadow: 0 0 26px rgba(47,212,255,.4); }
.fc-hero.run { background: radial-gradient(ellipse at top right, rgba(91,227,125,.18), transparent 62%), linear-gradient(180deg, #0c1a11, #08090c); border-color: rgba(91,227,125,.42); }
.fc-hero.run::before { background: linear-gradient(180deg, var(--run), #14532d); }
.fc-hero.run .fc-hero-title { color: var(--run); text-shadow: 0 0 26px rgba(91,227,125,.35); }

/* Info note — the recurring left-bar explainer block. */
.fc-note {
  background: rgba(0,0,0,.45); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0; padding: 10px 13px;
  font-size: 12px; line-height: 1.55; color: var(--tx-2);
}

/* Divider used for the "cut" line on a board. */
.fc-cut { display: flex; align-items: center; gap: 10px; padding: 12px 6px 8px; }
.fc-cut i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.fc-cut span { font-family: var(--display); font-size: 10px; letter-spacing: 3px; color: var(--gold); }

/* ── compact "portal" components (summer-challenge style: dense, slim, tiled) ── */

/* slim greeting line — replaces a big hero at the top of a tab */
.fc-greet { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 10px; }
.fc-greet b { font-size: 16px; font-weight: 900; letter-spacing: -.2px; }
.fc-greet small { font-size: 10px; color: var(--tx-3); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }

/* section header with a right-side meta note */
.fc-sechead { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 8px; }
.fc-sechead small { font-size: 10px; color: var(--tx-3); font-weight: 700; letter-spacing: .4px; }

/* the one gold stat strip — rank · points · events · shield */
.fc-strip {
  display: flex; align-items: stretch; overflow: hidden;
  border-radius: 12px; margin-bottom: 12px;
  background:
    radial-gradient(ellipse at top, rgba(255,194,46,.15), transparent 70%),
    linear-gradient(180deg, #1a1712, #0d0c08);
  border: 1px solid rgba(255,194,46,.38);
  box-shadow: inset 0 1px 0 rgba(255,194,46,.1);
}
.fc-strip > div { flex: 1; text-align: center; padding: 9px 2px 8px; border-right: 1px solid rgba(255,194,46,.12); }
.fc-strip > div:last-child { border-right: 0; }
.fc-strip b { display: block; font-family: var(--display); font-weight: normal; font-size: 18px; color: var(--gold); letter-spacing: 1px; }
.fc-strip span { font-size: 8px; font-weight: 900; letter-spacing: 1.1px; color: var(--tx-3); text-transform: uppercase; }

/* 38px icon tile + compact row — the workhorse list item */
.fc-tile {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--card-2); border: 1px solid var(--line);
}
.fc-evrow {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .15s;
}
.fc-evrow:last-child { border-bottom: 0; }
.fc-evrow:active { background: rgba(255,255,255,.035); }
.fc-ev-eyebrow { font-size: 8.5px; font-weight: 900; letter-spacing: 1.7px; text-transform: uppercase; }
.fc-ev-title { font-size: 13.5px; font-weight: 800; margin-top: 1px; }
.fc-ev-sub { font-size: 10.5px; color: var(--tx-3); margin-top: 2px; font-weight: 600; }
.fc-chev { color: var(--tx-3); font-size: 15px; flex: 0 0 auto; }

/* ── squad / activity / rivalry components ────────────────────────────────── */

/* three-dot weekly progress per athlete: strength · cardio · run */
.fc-dots { display: inline-flex; gap: 4px; align-items: center; }
.fc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.fc-dot.on-strength { background: var(--strength); box-shadow: 0 0 6px rgba(255,194,46,.6); }
.fc-dot.on-cardio   { background: var(--cardio);   box-shadow: 0 0 6px rgba(47,212,255,.6); }
.fc-dot.on-run      { background: var(--run);      box-shadow: 0 0 6px rgba(91,227,125,.6); }

/* rivalry card — "the hunt" */
.fc-rival {
  position: relative; overflow: hidden;
  border-radius: var(--r); padding: 11px 13px; margin-bottom: 12px;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255,59,92,.13), transparent 60%),
    linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid rgba(255,59,92,.3);
}
.fc-rival-vs {
  font-family: var(--display); font-size: 13px; letter-spacing: 2px; color: var(--live);
}

/* activity feed rows */
.fc-feed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  animation: fcFeedIn .3s ease-out;
}
.fc-feed-row:last-child { border-bottom: 0; }
@keyframes fcFeedIn { from { opacity: 0; transform: translateY(-5px); } }
.fc-feed-time { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--tx-3); min-width: 44px; }
.fc-feed-txt { font-size: 12.5px; color: var(--tx-2); line-height: 1.45; }
.fc-feed-txt b { color: var(--tx); font-weight: 800; }

/* shield-counted marker on squad rows */
.fc-counted {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 900; letter-spacing: 1px; color: var(--gold);
}
.fc-counted::before { content: '🛡'; font-size: 10px; }

/* live "new score" flash on board rows */
.fc-lb-row.fresh { animation: fcFresh 2.4s ease-out; }
@keyframes fcFresh {
  0% { background: rgba(255,194,46,.28); }
  100% { background: transparent; }
}

/* number ticker feel on big stats */
.fc-count { transition: color .3s; }

/* ── misc ─────────────────────────────────────────────────────────────────── */
.fc-empty { padding: 34px 16px; text-align: center; color: var(--tx-3); font-size: 13px; }
.fc-empty-icon { font-size: 34px; opacity: .35; display: block; margin-bottom: 10px; }

.fc-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.fc-stat { text-align: center; padding: 10px 4px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r-s); }
.fc-stat-v { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fc-stat-l { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--tx-3); text-transform: uppercase; margin-top: 3px; }

.fc-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.fc-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-dk), var(--gold)); }

.fc-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; background: rgba(10,11,17,.94);
  backdrop-filter: blur(20px); border-top: 1px solid var(--line-soft);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.fc-nav button {
  flex: 1; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--tx-3); font-family: var(--font);
  font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
  padding: 5px 2px;
}
.fc-nav button i { font-size: 19px; font-style: normal; line-height: 1; }
.fc-nav button.on { color: var(--gold); }

.fc-sheet-bg {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center;
}
.fc-sheet {
  position: relative;
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  /* deliberately bluer + lighter than the page so a popup reads as a popup */
  background: linear-gradient(180deg, #1a1f31, #12151f 60%);
  border: 1px solid rgba(255,194,46,.3);
  box-shadow: 0 -18px 60px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  animation: fcUp .22s ease-out;
}
@keyframes fcUp { from { transform: translateY(26px); opacity: .4; } }
.fc-sheet-grab { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.fc-x {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid var(--line);
  color: var(--tx-2); font-size: 15px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fc-x:active { background: rgba(255,255,255,.14); }

.fc-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  z-index: 200; padding: 13px 20px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow);
  animation: fcUp .2s ease-out; max-width: 90vw; text-align: center;
}
.fc-toast.ok  { border-color: rgba(52,211,153,.5); }
.fc-toast.err { border-color: rgba(255,59,92,.5); }

.fc-spin {
  width: 22px; height: 22px; border-radius: 50%; margin: 30px auto;
  border: 2.5px solid var(--line); border-top-color: var(--gold);
  animation: fcSpin .8s linear infinite;
}
@keyframes fcSpin { to { transform: rotate(360deg); } }
