/* ============================================================
   FAMILY FITNESS TRACKER — Bold Gym Poster aesthetic
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0A0A0A;
  --bg2: #141414;
  --paper: #F5F1E8;
  --ink: #0A0A0A;
  --myat: #D4FF3F;
  --myo: #FF2D6F;
  --amber: #FFB800;
  --line: rgba(245,241,232,0.12);
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Archivo", system-ui, sans-serif;
  background: #1a1a1a;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* ============================================================
   FULL BODY TRACKER
   ============================================================ */
.ft-root {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  color: var(--paper);
  font-family: "Archivo", sans-serif;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.ft-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(245,241,232,0.05) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
}

/* HEADER */
.ft-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 3px solid var(--paper);
  position: relative;
  z-index: 2;
  background: var(--bg);
  gap: 24px;
}
.ft-brand { display: flex; align-items: baseline; gap: 24px; }
.ft-brand-mark { font-family: "Bebas Neue"; font-size: 32px; color: var(--amber); letter-spacing: 0.05em; }
.ft-brand-name { font-family: "Bebas Neue"; font-size: 26px; letter-spacing: 0.05em; }
.ft-brand-date { font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.2em; opacity: 0.6; }

.ft-who { display: flex; gap: 8px; }
.ft-who-btn {
  background: var(--bg);
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 10px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-family: "Bebas Neue"; letter-spacing: 0.05em;
  transition: all 0.15s;
}
.ft-who-btn--on { background: var(--c); border-color: var(--c); color: var(--ink); }
.ft-who-init { width: 28px; height: 28px; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 10px; font-family: "JetBrains Mono"; font-weight: 700; letter-spacing: 0; }
.ft-who-name { font-size: 22px; }
.ft-who-streak { font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.05em; opacity: 0.8; }

/* SCOREBAR */
.ft-scorebar {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  border-bottom: 3px solid var(--paper);
  background: var(--bg);
  position: relative;
  z-index: 2;
}
.ft-score {
  padding: 28px 32px;
  display: flex; flex-direction: column;
  border-right: 2px solid var(--paper);
}
.ft-score:last-child { border-right: none; align-items: flex-end; }
.ft-score-tag { font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.2em; color: var(--c); margin-bottom: 4px; }
.ft-score-v {
  font-family: "Bebas Neue"; font-size: 88px; line-height: 0.9; color: var(--c);
  text-shadow: 0 0 30px var(--c);
}
.ft-score-u { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; }
.ft-score-vs {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink);
  padding: 16px;
}
.ft-score-vs-text { font-family: "Bebas Neue"; font-size: 70px; line-height: 1; }
.ft-score-gap { font-family: "JetBrains Mono"; font-size: 13px; letter-spacing: 0.15em; font-weight: 700; margin-top: 4px; }

/* TABS */
.ft-tabs {
  display: flex;
  border-bottom: 3px solid var(--paper);
  background: var(--bg);
  position: relative;
  z-index: 2;
}
.ft-tab {
  flex: 1;
  background: var(--bg);
  border: none;
  border-right: 2px solid var(--paper);
  color: var(--paper);
  padding: 18px;
  font-family: "Bebas Neue";
  font-size: 24px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s;
}
.ft-tab:last-child { border-right: none; }
.ft-tab--on { background: var(--paper); color: var(--ink); }
.ft-tab:hover:not(.ft-tab--on) { background: var(--bg2); }

/* PANE */
.ft-pane { padding: 32px; position: relative; z-index: 2; }
.ft-pane-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.ft-pane-title { font-family: "Bebas Neue"; font-size: 44px; line-height: 1; }
.ft-pane-sub { font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.2em; opacity: 0.6; }

/* EQUIPMENT FILTER */
.ft-equip { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.ft-equip-btn {
  background: var(--bg);
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 12px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-family: "Bebas Neue";
  font-size: 18px;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.ft-equip-btn:hover { background: var(--bg2); }
.ft-equip-btn--on { background: var(--c); border-color: var(--c); color: var(--ink); }
.ft-equip-icon { font-family: "JetBrains Mono"; font-size: 14px; opacity: 0.8; }

/* LIFTS GRID */
.ft-lifts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 2px solid var(--paper);
  margin-bottom: 24px;
}
.ft-lift {
  background: var(--bg);
  border: none;
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  color: var(--paper);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font-family: "Archivo";
  position: relative;
  transition: background 0.12s;
  min-height: 140px;
  display: flex; flex-direction: column; gap: 8px;
}
.ft-lift:nth-child(4n) { border-right: none; }
.ft-lift:hover { background: var(--c); color: var(--ink); }
.ft-lift-equip { font-family: "JetBrains Mono"; font-size: 9px; letter-spacing: 0.2em; opacity: 0.5; }
.ft-lift:hover .ft-lift-equip { opacity: 0.8; }
.ft-lift-name { font-family: "Bebas Neue"; font-size: 22px; line-height: 1; }
.ft-lift-muscles { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.ft-tag-primary {
  background: var(--paper); color: var(--ink);
  padding: 2px 6px;
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
}
.ft-tag-secondary {
  background: transparent;
  border: 1px solid rgba(245,241,232,0.3);
  color: var(--paper);
  padding: 1px 5px;
  font-family: "JetBrains Mono"; font-size: 9px; letter-spacing: 0.05em;
}
.ft-lift:hover .ft-tag-primary { background: var(--ink); color: var(--c); }
.ft-lift:hover .ft-tag-secondary { border-color: var(--ink); color: var(--ink); }
.ft-lift-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.ft-lift-pr { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.15em; opacity: 0.7; }
.ft-lift-dot {
  background: var(--c); color: var(--ink);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
}
.ft-lift:hover .ft-lift-dot { background: var(--ink); color: var(--c); }

/* TEMPLATES */
.ft-templates { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border: 2px solid var(--paper); }
.ft-templates-lbl { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.7; margin-right: 8px; }
.ft-template {
  background: var(--bg); border: 1px solid var(--paper); color: var(--paper);
  padding: 8px 14px; font-family: "Bebas Neue"; font-size: 16px; letter-spacing: 0.05em; cursor: pointer;
}
.ft-template:hover { background: var(--c); color: var(--ink); border-color: var(--c); }

/* WINDOW SELECTOR */
.ft-window { display: flex; gap: 4px; margin-left: auto; }
.ft-window-btn {
  background: var(--bg); border: 1px solid var(--paper); color: var(--paper);
  padding: 6px 12px; font-family: "JetBrains Mono"; font-size: 11px; cursor: pointer; letter-spacing: 0.15em;
}
.ft-window-btn--on { background: var(--paper); color: var(--ink); }

/* BODY MAP */
.ft-bodymap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border: 2px solid var(--paper);
  padding: 24px;
  margin-bottom: 24px;
  background: var(--bg2);
}
.ft-bodymap-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ft-bodymap-name { font-family: "Bebas Neue"; font-size: 36px; letter-spacing: 0.05em; }

.mm-root { width: 100%; }
.mm-bodies { display: flex; gap: 20px; justify-content: center; }
.mm-body { flex: 1; max-width: 240px; text-align: center; }
.mm-body-label { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.25em; opacity: 0.7; margin-bottom: 8px; }
.mm-svg { width: 100%; height: auto; max-height: 420px; }
.mm-outline rect { fill: rgba(245,241,232,0.04); stroke: rgba(245,241,232,0.2); stroke-width: 0.5; }
.mm-legend { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); justify-content: center; }
.mm-legend-lbl { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; }
.mm-legend-bar { display: flex; gap: 2px; }
.mm-legend-cell { width: 22px; height: 14px; }
.mm-legend-tags { display: flex; gap: 32px; font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.15em; opacity: 0.6; }

/* INSIGHTS */
.ft-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ft-insight { border: 2px solid var(--paper); padding: 20px; }
.ft-insight--top { border-color: var(--amber); }
.ft-insight--bottom { border-color: var(--myo); }
.ft-insight-head { font-family: "Bebas Neue"; font-size: 22px; letter-spacing: 0.05em; margin-bottom: 14px; }
.ft-insight--top .ft-insight-head { color: var(--amber); }
.ft-insight--bottom .ft-insight-head { color: var(--myo); }
.ft-insight-list { display: flex; flex-direction: column; gap: 8px; }
.ft-insight-row { display: grid; grid-template-columns: 100px 1fr 80px; align-items: center; gap: 10px; }
.ft-insight-name { font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.05em; }
.ft-insight-bar { height: 12px; background: rgba(245,241,232,0.08); position: relative; }
.ft-insight-fill { height: 100%; transition: width 0.5s; }
.ft-insight-v { font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700; text-align: right; }
.ft-insight-empty { font-family: "JetBrains Mono"; font-size: 13px; color: var(--myat); }
.ft-insight-cta { font-family: "Archivo"; font-size: 13px; font-style: italic; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(245,241,232,0.2); opacity: 0.85; }

/* FEED */
.ft-feed { border: 2px solid var(--paper); margin-bottom: 24px; }
.ft-feed-row {
  display: grid;
  grid-template-columns: 56px 64px 1fr 70px 110px 90px 36px 160px;
  align-items: center;
  padding: 14px 20px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  min-height: 56px;
}
.ft-feed-row:last-child { border-bottom: none; }
.ft-feed-time { font-family: "JetBrains Mono"; font-size: 11px; opacity: 0.6; }
.ft-feed-tag { padding: 4px 8px; font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700; text-align: center; letter-spacing: 0.1em; }
.ft-feed-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ft-feed-ex { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-feed-musc { font-family: "JetBrains Mono"; font-size: 10px; opacity: 0.5; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-feed-set { font-family: "JetBrains Mono"; font-size: 11px; opacity: 0.6; letter-spacing: 0.15em; }
.ft-feed-load { font-family: "JetBrains Mono"; font-size: 16px; font-weight: 700; white-space: nowrap; }
.ft-feed-vol { font-family: "JetBrains Mono"; font-size: 12px; opacity: 0.7; text-align: right; white-space: nowrap; }
.ft-feed-pr { background: var(--amber); color: var(--ink); padding: 3px 6px; font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700; text-align: center; }
.ft-feed-pr--placeholder { background: transparent; }

.ft-trash {
  border: 2px dashed var(--paper);
  padding: 18px 24px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  cursor: pointer;
}
.ft-trash:hover { background: var(--bg2); }
.ft-trash-tag { padding: 6px 12px; font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; }
.ft-trash-msg { font-size: 17px; font-style: italic; font-weight: 500; }
.ft-trash-next { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.5; }

/* HEAD-TO-HEAD */
.ft-vs-list { display: flex; flex-direction: column; gap: 8px; }
.ft-vs-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 8px 0; }
.ft-vs-name { font-family: "Bebas Neue"; font-size: 22px; letter-spacing: 0.03em; }
.ft-vs-bar { display: flex; height: 30px; background: var(--bg2); }
.ft-vs-myat, .ft-vs-myo { color: var(--ink); display: flex; align-items: center; padding: 0 10px; min-width: 48px; }
.ft-vs-myat span, .ft-vs-myo span { font-family: "JetBrains Mono"; font-size: 12px; font-weight: 700; }
.ft-vs-myo { justify-content: flex-end; }
.ft-vs-totals {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--paper);
  font-family: "JetBrains Mono"; font-size: 14px;
}
.ft-vs-totals span { font-family: "Bebas Neue"; font-size: 24px; }

/* MODAL */
.ft-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 100; }
.ft-modal-card { background: var(--bg); border: 3px solid var(--c); width: 540px; padding: 28px; }
.ft-modal-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--paper); }
.ft-modal-tag { padding: 8px 14px; font-family: "JetBrains Mono"; font-weight: 700; letter-spacing: 0.15em; font-size: 14px; }
.ft-modal-title { flex: 1; }
.ft-modal-equip { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; }
.ft-modal-ex { font-family: "Bebas Neue"; font-size: 32px; line-height: 1; }
.ft-modal-close { font-size: 36px; line-height: 1; cursor: pointer; opacity: 0.7; }
.ft-modal-close:hover { opacity: 1; }

.ft-modal-musc { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ft-modal-musc-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 12px; }
.ft-modal-musc-lbl { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; }
.ft-modal-musc-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.ft-step-row { margin-bottom: 16px; }
.ft-step-lbl { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.7; margin-bottom: 8px; }
.ft-step-ctrl { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; border: 2px solid var(--paper); }
.ft-step-ctrl button {
  background: var(--bg); border: none; color: var(--paper);
  font-size: 28px; padding: 14px; cursor: pointer;
  font-family: "Bebas Neue";
}
.ft-step-ctrl button:hover { background: var(--c); color: var(--ink); }
.ft-step-v {
  text-align: center; font-family: "Bebas Neue"; font-size: 48px; line-height: 1;
  padding: 8px 0; color: var(--c);
  border-left: 2px solid var(--paper); border-right: 2px solid var(--paper);
}
.ft-step-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.ft-step-quick button {
  background: transparent; border: 1px solid rgba(245,241,232,0.3); color: var(--paper);
  padding: 6px; font-family: "JetBrains Mono"; font-size: 11px; cursor: pointer; letter-spacing: 0.05em;
}
.ft-step-quick button:hover { background: var(--c); color: var(--ink); border-color: var(--c); }
.ft-step-vol { text-align: center; font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.2em; padding: 12px 0; opacity: 0.7; }
.ft-step-prwarn { background: var(--amber); color: var(--ink); padding: 8px; text-align: center; font-family: "Bebas Neue"; font-size: 18px; letter-spacing: 0.05em; margin-bottom: 12px; }
.ft-commit { width: 100%; background: var(--c); color: var(--ink); border: none; padding: 20px; font-family: "Bebas Neue"; font-size: 28px; cursor: pointer; letter-spacing: 0.05em; }
.ft-commit:hover { background: var(--paper); }

/* === VISUAL-FIRST LIFT CARDS === */
.ft-lift {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  padding: 14px 14px 10px;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
}
.ft-lift::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 35%, var(--c) 0%, transparent 55%);
  opacity: 0.05; pointer-events: none; transition: opacity 0.2s;
}
.ft-lift:hover::before { opacity: 0.18; }
.ft-lift:hover { transform: translateY(-2px); border-color: var(--c) !important; }

.ft-lift-glyph {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  opacity: 0.85;
  transition: all 0.2s;
  min-height: 0;
}
.ft-lift:hover .ft-lift-glyph { color: var(--c); opacity: 1; transform: scale(1.05); }
.ex-glyph { width: 80%; height: 80%; max-width: 110px; max-height: 110px; }

.ft-lift-name {
  font-family: "Bebas Neue"; font-size: 18px; line-height: 1;
  letter-spacing: 0.02em; text-align: center;
  color: var(--paper);
}

.ft-lift-foot-new {
  display: flex; justify-content: space-between; align-items: center;
  gap: 6px;
}
.ft-lift-equip-pill {
  font-family: "JetBrains Mono"; font-size: 8px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.45;
}
.ft-lift-pr-new {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--c);
}
.ft-lift-dot-new {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px;
  background: var(--c); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono"; font-weight: 800; font-size: 12px;
  border-radius: 50%;
}

/* === MUSCLE CHIPS — show which muscles each lift hits === */
.ft-lift-chips {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  margin-top: 2px;
}
.ft-mus-chip {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  background: var(--mc);
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
  text-shadow: 0 0 1px rgba(255,255,255,0.05);
}
.ft-mus-chip--solid { background: var(--mc); color: var(--ink); }
.ft-mus-chip--ghost {
  background: transparent;
  color: var(--mc);
  box-shadow: inset 0 0 0 1.5px var(--mc);
}
/* On hover (lift card), invert chips so they read on the colored background */
.ft-lift:hover .ft-mus-chip {
  background: var(--ink);
  color: var(--mc);
}

/* In-picker muscles row */
.lg-muscles {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(245,241,232,0.1);
}
.lg-muscles-l {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; opacity: 0.55;
  flex-shrink: 0;
}
.lg-muscles-list {
  display: flex; gap: 5px; flex-wrap: wrap;
}

/* ===== ENERGETIC SET LOGGER ===== */
.lg-card {
  background: linear-gradient(180deg, #0F0F12 0%, var(--bg) 100%);
  border: 3px solid var(--c);
  width: min(720px, 96vw);
  max-height: 96vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 30px 80px rgba(0,0,0,0.6), 0 0 60px var(--c);
  position: relative;
}
.lg-card::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(245,241,232,0.025) 1px, transparent 1px);
  background-size: 6px 6px;
  pointer-events: none;
}

/* Top bar */
.lg-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid rgba(245,241,232,0.08);
  position: relative;
}
.lg-top-l { display: flex; align-items: center; gap: 14px; }
.lg-tag {
  padding: 8px 12px; color: var(--ink);
  font-family: "JetBrains Mono"; font-weight: 800; font-size: 13px; letter-spacing: 0.2em;
  border: 2px solid var(--ink);
}
.lg-meta-equip { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.25em; opacity: 0.55; }
.lg-meta-name { font-family: "Bebas Neue"; font-size: 28px; line-height: 1; letter-spacing: 0.02em; margin-top: 2px; color: var(--paper); }

.lg-top-r { display: flex; align-items: center; gap: 8px; }
.lg-howto {
  display: flex; align-items: center; gap: 6px;
  background: transparent; color: var(--paper);
  border: 1.5px solid rgba(245,241,232,0.3);
  padding: 8px 12px; font-family: "JetBrains Mono"; font-weight: 600; font-size: 11px; letter-spacing: 0.15em;
  cursor: pointer; transition: all 0.15s;
}
.lg-howto:hover { border-color: var(--c); color: var(--c); }
.lg-howto-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: 1.5px solid currentColor;
  font-size: 11px; font-weight: 700;
}
.lg-x {
  background: transparent; border: none; color: var(--paper);
  font-size: 30px; line-height: 1; cursor: pointer; padding: 0 8px;
  opacity: 0.55;
}
.lg-x:hover { opacity: 1; color: var(--c); }

/* Stats strip */
.lg-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 2px solid rgba(245,241,232,0.08);
  position: relative; z-index: 2;
}
.lg-stat {
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid rgba(245,241,232,0.08);
}
.lg-stat:last-child { border-right: none; }
.lg-stat-l { font-family: "JetBrains Mono"; font-size: 9px; letter-spacing: 0.25em; opacity: 0.55; }
.lg-stat-v { font-family: "Bebas Neue"; font-size: 22px; letter-spacing: 0.02em; line-height: 1; }

/* Stage with viz */
.lg-stage {
  position: relative;
  background: #08080A;
  padding: 24px 20px 12px;
  border-bottom: 2px solid rgba(245,241,232,0.08);
}
.lg-stage-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 70%, rgba(0,0,0,0.6) 100%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(245,241,232,0.025) 38px 39px);
  pointer-events: none;
}
.lg-pr-banner {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color: var(--ink);
  padding: 4px 14px; font-family: "Bebas Neue"; font-size: 16px; letter-spacing: 0.15em;
  z-index: 3;
  animation: lg-prpulse 0.9s ease-in-out infinite alternate;
}
@keyframes lg-prpulse { from { box-shadow: 0 0 0 0 rgba(255,184,0,0.7); } to { box-shadow: 0 0 0 8px rgba(255,184,0,0); } }

.lg-viz {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  height: 150px;
}
.lg-bb-svg { width: 100%; height: 100%; }

.lg-w-display {
  position: relative; z-index: 2;
  text-align: center;
  padding: 4px 0;
}
.lg-w-lbl { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.3em; opacity: 0.55; }
.lg-w-num {
  font-family: "Bebas Neue"; font-size: 96px; line-height: 1;
  letter-spacing: -0.02em; font-weight: 400;
  text-shadow: 0 0 30px currentColor;
  font-variant-numeric: tabular-nums;
}
.lg-w-unit { font-size: 30px; letter-spacing: 0.05em; opacity: 0.6; margin-left: 6px; }

/* Weight controls */
.lg-w-controls {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 2px solid rgba(245,241,232,0.08);
  align-items: stretch;
  position: relative; z-index: 2;
}
.lg-step {
  background: transparent; color: var(--paper);
  border: 2px solid var(--c);
  font-family: "Bebas Neue"; font-size: 32px; line-height: 1;
  cursor: pointer; transition: all 0.1s;
}
.lg-step:hover { background: var(--c); color: var(--ink); }
.lg-step:active { transform: scale(0.96); }

.lg-plates {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.lg-plate {
  background: rgba(245,241,232,0.04);
  border: 1.5px solid rgba(245,241,232,0.2);
  color: var(--paper);
  font-family: "JetBrains Mono"; font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 0;
  gap: 1px;
  transition: all 0.12s;
}
.lg-plate:hover { background: var(--c); color: var(--ink); border-color: var(--c); transform: translateY(-1px); }
.lg-plate-sign { font-size: 9px; opacity: 0.7; }
.lg-plate-v { font-size: 16px; }

/* Reps */
.lg-reps-block {
  padding: 14px 20px;
  border-bottom: 2px solid rgba(245,241,232,0.08);
  position: relative; z-index: 2;
}
.lg-reps-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.lg-reps-lbl { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.25em; opacity: 0.65; }
.lg-reps-num { font-family: "Bebas Neue"; font-size: 32px; line-height: 1; letter-spacing: 0.02em; }

.lg-reps-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.lg-rep {
  background: rgba(245,241,232,0.04);
  border: 1.5px solid rgba(245,241,232,0.15);
  color: var(--paper);
  font-family: "JetBrains Mono"; font-weight: 700; font-size: 14px;
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.12s;
}
.lg-rep:hover { border-color: var(--c); }
.lg-rep--on {
  background: var(--c) !important;
  color: var(--ink) !important;
  border-color: var(--c) !important;
  box-shadow: 0 0 14px var(--c);
}
.lg-rep--more { background: rgba(255,184,0,0.08); border-color: rgba(255,184,0,0.4); color: var(--amber); }
.lg-rep--more:hover { background: var(--amber); color: var(--ink); }

/* Suggestions */
.lg-suggest {
  padding: 12px 20px 16px;
  border-bottom: 2px solid rgba(245,241,232,0.08);
  position: relative; z-index: 2;
}
.lg-suggest-lbl { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.25em; opacity: 0.55; margin-bottom: 8px; }
.lg-suggest-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.lg-sug {
  background: transparent;
  border: 1.5px dashed rgba(245,241,232,0.2);
  color: var(--paper);
  padding: 8px 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  cursor: pointer;
  transition: all 0.12s;
}
.lg-sug:hover { border-color: var(--c); border-style: solid; background: rgba(245,241,232,0.04); }
.lg-sug-l { font-family: "JetBrains Mono"; font-size: 9px; letter-spacing: 0.2em; opacity: 0.6; }
.lg-sug-h { font-family: "Bebas Neue"; font-size: 18px; line-height: 1; letter-spacing: 0.02em; color: var(--c); }

/* Commit button */
.lg-commit {
  width: 100%;
  background: var(--c);
  color: var(--ink);
  border: none;
  padding: 22px 24px;
  font-family: "Bebas Neue";
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.02em;
  position: relative; z-index: 2;
}
.lg-commit:hover { filter: brightness(1.1); }
.lg-commit:active { transform: translateY(1px); }
.lg-commit-arrow { font-size: 28px; line-height: 1; text-align: left; }
.lg-commit-text { font-size: 30px; line-height: 1; text-align: center; letter-spacing: 0.06em; }
.lg-commit-vol {
  font-family: "JetBrains Mono"; font-weight: 700; font-size: 13px;
  letter-spacing: 0.15em; padding: 6px 10px;
  background: rgba(0,0,0,0.25);
}

@media (max-width: 600px) {
  .lg-w-num { font-size: 72px; }
  .lg-meta-name { font-size: 24px; }
  .lg-plates { grid-template-columns: repeat(5, 1fr); }
  .lg-reps-grid { grid-template-columns: repeat(6, 1fr); }
  .lg-stat { padding: 10px 8px; }
  .lg-stat-v { font-size: 18px; }
}

/* HOW TO BUTTON ON LIFTS */
.ft-lift-howto {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  opacity: 0.5; cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
}
.ft-lift-howto:hover { opacity: 1; background: var(--c); color: var(--ink); border-color: var(--c); }
.ft-lift { position: relative; }
.ft-modal-howto {
  background: transparent; border: 1.5px solid var(--c); color: var(--c);
  padding: 8px 14px; font-family: "Bebas Neue"; font-size: 16px; letter-spacing: 0.1em;
  cursor: pointer; align-self: center;
}
.ft-modal-howto:hover { background: var(--c); color: var(--ink); }

/* HOW-TO MODAL */
.hf-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 150;
  padding: 24px;
}
.hf-card {
  background: var(--bg);
  border: 3px solid var(--c);
  width: 100%; max-width: 1100px;
  max-height: 95%;
  display: flex; flex-direction: column;
}
.hf-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 28px; border-bottom: 2px solid var(--paper);
  gap: 16px;
}
.hf-equip { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.25em; opacity: 0.6; }
.hf-title { font-family: "Bebas Neue"; font-size: 44px; line-height: 1; color: var(--c); margin-top: 4px; }
.hf-close { font-size: 36px; line-height: 1; cursor: pointer; opacity: 0.7; }
.hf-close:hover { opacity: 1; }

.hf-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.hf-anim {
  border-right: 2px solid var(--paper);
  padding: 24px;
  display: flex; flex-direction: column;
  background: var(--bg2);
}
.hf-anim-frame {
  flex: 1;
  border: 2px dashed rgba(245,241,232,0.2);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  min-height: 360px;
  position: relative;
}
.hf-anim-frame::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(245,241,232,0.06) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
}
.hf-svg { width: 100%; height: 100%; max-height: 380px; position: relative; z-index: 2; }
.hf-anim-controls {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center;
  margin-top: 16px;
}
.hf-btn {
  background: var(--c); color: var(--ink); border: none;
  padding: 10px 16px; font-family: "Bebas Neue"; font-size: 16px; letter-spacing: 0.1em; cursor: pointer;
}
.hf-scrub input { width: 100%; accent-color: var(--c); }
.hf-phase { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.15em; color: var(--c); }
.hf-tempo {
  font-family: "JetBrains Mono"; font-size: 12px; letter-spacing: 0.15em;
  text-align: center; padding: 12px; margin-top: 12px;
  border: 1px solid var(--c); color: var(--c);
}

.hf-info { padding: 24px 28px; overflow-y: auto; }
.hf-section { margin-bottom: 24px; }
.hf-section-head {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.05em; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 2px solid currentColor;
}
.hf-section-head--warn { color: var(--myo); }

.hf-cues { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hf-cue { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed rgba(245,241,232,0.15); }
.hf-cue-n { font-family: "JetBrains Mono"; font-size: 13px; font-weight: 700; color: var(--c); }
.hf-cue-t { font-size: 14px; line-height: 1.45; }

.hf-mistakes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hf-mistakes li { font-size: 13px; opacity: 0.9; padding: 4px 0; font-family: "JetBrains Mono"; letter-spacing: 0.02em; }

.hf-musc { padding-top: 16px; border-top: 2px solid var(--paper); display: flex; flex-direction: column; gap: 8px; }
.hf-musc-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 12px; }
.hf-musc-lbl { font-family: "JetBrains Mono"; font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; }
.hf-musc-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.hf-footer { padding: 14px 28px; border-top: 2px solid var(--paper); }
.hf-foot-note { font-family: "JetBrains Mono"; font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; text-align: center; }

.ft-flash {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: "Bebas Neue"; font-size: 96px; color: var(--amber);
  background: var(--ink); padding: 20px 40px; border: 4px solid var(--amber);
  z-index: 200; pointer-events: none; animation: flash 1.4s ease;
  letter-spacing: 0.05em; white-space: nowrap;
}
@keyframes flash {
  0% { transform: translate(-50%,-50%) scale(0.6); opacity: 0; }
  20% { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
  80% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}


/* === NEW SQUAD-MODE STYLES === */

/* 4-pill squad switcher */
.ft-who--squad { display: flex; gap: 10px; flex-wrap: wrap; max-width: 600px; }
.ft-pill {
  background: var(--bg2);
  border: 2px solid rgba(245,241,232,0.15);
  padding: 8px 14px 8px 8px;
  font-family: "Bebas Neue";
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  min-width: 130px;
}
.ft-pill:hover { border-color: var(--c); transform: translateY(-1px); }
.ft-pill--on {
  background: var(--c); border-color: var(--c); color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.ft-pill--ghost {
  border-style: dashed;
  opacity: 0.55;
}
.ft-pill--ghost:hover { opacity: 1; }
.ft-pill-av {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.ft-pill-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ft-pill-name { font-size: 18px; line-height: 1; letter-spacing: 0.02em; }
.ft-pill-sub {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em; opacity: 0.7;
}
.ft-pill--on .ft-pill-sub { opacity: 0.85; }
.ft-pill-edit {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  opacity: 0; transition: opacity 0.15s;
}
.ft-pill:hover .ft-pill-edit { opacity: 0.6; }
.ft-pill-edit:hover { opacity: 1 !important; }

/* GROUP CHALLENGE BANNER */
.ft-challenge {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(90deg, rgba(255,184,0,0.08), rgba(255,45,111,0.08));
  border: 2px solid var(--paper);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.ft-challenge-tag {
  font-family: "Bebas Neue"; font-size: 18px;
  letter-spacing: 0.04em;
}
.ft-challenge-sub {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.55;
  margin-top: 3px;
}
.ft-challenge-bar {
  height: 32px;
  background: rgba(245,241,232,0.08);
  position: relative;
  overflow: hidden;
}
.ft-challenge-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
  position: relative;
}
.ft-challenge-fill::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,0.15) 6px 12px);
}
.ft-challenge-bar-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
  z-index: 2;
  text-shadow: 0 0 8px rgba(0,0,0,0.6);
}
.ft-challenge-now { color: var(--paper); }
.ft-challenge-goal {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.7;
}
.ft-challenge-pct {
  font-family: "Bebas Neue"; font-size: 44px;
  line-height: 1;
  color: var(--amber);
}

/* === LEADERBOARD === */
.lb-hero {
  border: 2px solid var(--paper);
  padding: 22px 24px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(212,255,63,0.04), transparent);
}
.lb-hero-tag {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.25em; opacity: 0.6;
  text-align: center;
  margin-bottom: 18px;
}
.lb-podium {
  display: flex; gap: 24px; justify-content: center; align-items: flex-end;
}
.lb-stand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 140px;
}
.lb-stand-av {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-family: "JetBrains Mono"; font-size: 18px; font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(245,241,232,0.05);
}
.lb-stand-name {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
}
.lb-stand-vol {
  font-family: "Bebas Neue"; font-size: 28px;
  letter-spacing: 0.02em;
}
.lb-stand-block {
  width: 100%;
  position: relative;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14px;
}
.lb-stand-rank {
  font-family: "Bebas Neue"; font-size: 38px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* Dashboard cards grid */
.lb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.lb-card {
  border: 2px solid var(--paper);
  background: var(--bg2);
  padding: 18px 20px;
}
.lb-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,241,232,0.15);
}
.lb-card-title {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
}
.lb-card-sub {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.5;
}
.lb-rank { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: grid;
  grid-template-columns: 36px 32px 1fr auto;
  gap: 12px; align-items: center;
}
.lb-row--1 { background: rgba(255,184,0,0.06); padding: 6px 10px; margin: -6px -10px; }
.lb-medal {
  font-size: 18px;
  text-align: center;
  font-family: "JetBrains Mono"; font-weight: 700;
}
.lb-row--1 .lb-medal,
.lb-row--2 .lb-medal,
.lb-row--3 .lb-medal { font-size: 22px; }
.lb-av {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.05em;
}
.lb-name {
  font-family: "Bebas Neue"; font-size: 18px;
  letter-spacing: 0.04em;
}
.lb-val {
  font-family: "JetBrains Mono"; font-size: 15px; font-weight: 800;
  letter-spacing: 0.05em;
}

/* Per-lift leaderboard */
.lb-lifts {
  border: 2px solid var(--paper);
  padding: 20px 24px;
  margin-bottom: 22px;
}
.lb-lifts-head { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(245,241,232,0.15); }
.lb-lifts-title { font-family: "Bebas Neue"; font-size: 26px; letter-spacing: 0.04em; }
.lb-lifts-sub {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.55;
  margin-top: 4px;
}
.lb-lifts-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.lb-lift {
  border: 1px solid rgba(245,241,232,0.12);
  padding: 14px 16px;
  background: var(--bg2);
}
.lb-lift-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,241,232,0.1);
}
.lb-lift-glyph {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  opacity: 0.85;
}
.lb-lift-glyph .ex-glyph { width: 100%; height: 100%; }
.lb-lift-name { font-family: "Bebas Neue"; font-size: 18px; letter-spacing: 0.04em; }
.lb-lift-rows { display: flex; flex-direction: column; gap: 6px; }
.lb-lift-row {
  display: grid;
  grid-template-columns: 28px 40px 1fr 60px;
  gap: 8px; align-items: center;
}
.lb-lift-rank { font-size: 14px; text-align: center; font-family: "JetBrains Mono"; font-weight: 700; opacity: 0.7; }
.lb-lift-tag {
  padding: 3px 6px;
  color: var(--ink);
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}
.lb-lift-bar {
  position: relative;
  height: 22px;
  background: rgba(245,241,232,0.05);
}
.lb-lift-fill {
  height: 100%;
  transition: width 0.4s ease;
}
.lb-lift-v {
  position: absolute;
  top: 50%; transform: translateY(-50%); right: 6px;
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
  z-index: 2;
}
.lb-lift-rel {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; opacity: 0.55;
  text-align: right;
}

/* Solo scorecard */
.lb-solo {
  border: 2px solid var(--c);
  padding: 18px 24px;
  position: relative;
}
.lb-solo::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 0% 0%, currentColor 0, transparent 60%);
  opacity: 0.04; pointer-events: none;
}
.lb-solo-head {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,241,232,0.15);
}
.lb-solo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.lb-solo-stat {
  border-left: 3px solid var(--c);
  padding: 4px 12px;
}
.lb-solo-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.5;
  margin-bottom: 4px;
}
.lb-solo-v {
  font-family: "Bebas Neue"; font-size: 32px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.lb-solo-r {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--c);
  margin-top: 4px;
}

/* === COMPARE MODE TOGGLE (body view) === */
.ft-compare-mode {
  display: flex; gap: 8px;
  margin-bottom: 14px;
}
.ft-cmp-btn {
  flex: 1;
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.15);
  color: var(--paper);
  padding: 10px;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all 0.15s;
}
.ft-cmp-btn:hover { border-color: var(--c); }
.ft-cmp-btn--on {
  background: var(--c); color: var(--ink); border-color: var(--c);
}
.ft-h2h-pick {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.ft-h2h-lbl {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; opacity: 0.5;
}
.ft-h2h-target {
  background: transparent; border: 1px dashed var(--c);
  color: var(--paper);
  padding: 6px 14px;
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.ft-h2h-target:hover { background: rgba(255,255,255,0.05); }
.ft-h2h-target--on { background: var(--c); color: var(--ink); border-style: solid; }

.ft-bodymap--solo { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
.ft-bodymap--group { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ft-bodymap-col--small { transform: scale(0.85); transform-origin: top center; }

/* === ACTIVITY FEED REACTIONS === */
.ft-feed-social {
  display: flex; align-items: center; gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}
.ft-feed-cheers {
  display: flex; align-items: center; gap: 1px;
  font-size: 14px;
  padding: 3px 7px;
  background: rgba(255,184,0,0.1);
  border: 1px solid rgba(255,184,0,0.25);
  border-radius: 999px;
  line-height: 1;
}
.ft-feed-cheers:empty { display: none; }
.ft-feed-react {
  display: flex; gap: 3px;
  opacity: 0;
  transition: opacity 0.15s;
}
.ft-feed-row:hover .ft-feed-react { opacity: 1; }
.ft-react-btn {
  background: rgba(245,241,232,0.04);
  border: 1px solid rgba(245,241,232,0.12);
  color: var(--paper);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
}
.ft-react-btn:hover { background: rgba(255,184,0,0.18); border-color: var(--amber); transform: scale(1.1); }

.ft-trash-launcher {
  border: 1px dashed rgba(245,241,232,0.25);
  padding: 14px 20px;
  margin-top: 16px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.ft-trash-prompt {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.6;
}
.ft-trash-targets { display: flex; gap: 8px; }
.ft-trash-target {
  background: transparent;
  border: 2px solid var(--c);
  color: var(--c);
  padding: 6px 14px;
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.ft-trash-target:hover { background: var(--c); color: var(--ink); }

/* === PROFILE EDITOR === */
.pe-card {
  background: var(--bg);
  border: 2px solid var(--c);
  padding: 28px 32px;
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.pe-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(245,241,232,0.15);
}
.pe-tag {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.25em; color: var(--c);
}
.pe-title {
  font-family: "Bebas Neue"; font-size: 30px;
  letter-spacing: 0.04em; margin-top: 4px;
}
.pe-x {
  background: transparent; border: 1px solid rgba(245,241,232,0.3);
  color: var(--paper);
  width: 32px; height: 32px;
  font-size: 22px;
  cursor: pointer;
}
.pe-x:hover { background: rgba(245,241,232,0.1); }
.pe-preview {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg2);
}
.pe-av-big {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-family: "JetBrains Mono"; font-size: 18px; font-weight: 800;
  letter-spacing: 0.05em;
}
.pe-prev-name {
  font-family: "Bebas Neue"; font-size: 24px;
  letter-spacing: 0.04em;
}
.pe-prev-bw {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.6;
  margin-top: 4px;
}
.pe-field { margin-bottom: 18px; }
.pe-lbl {
  display: block;
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; opacity: 0.65;
  margin-bottom: 8px;
}
.pe-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.2);
  color: var(--paper);
  padding: 10px 14px;
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.02em;
  outline: none;
}
.pe-input:focus { border-color: var(--c); }
.pe-input--short { letter-spacing: 0.15em; max-width: 160px; }
.pe-input--bw { max-width: 100px; text-align: center; }
.pe-bw-row { display: flex; gap: 8px; align-items: center; }
.pe-bw-step {
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.2);
  color: var(--paper);
  font-size: 20px;
  cursor: pointer;
}
.pe-bw-step:hover { background: rgba(245,241,232,0.1); }
.pe-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.pe-color {
  width: 36px; height: 36px;
  border: 2px solid rgba(245,241,232,0.15);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  font-family: "JetBrains Mono"; font-size: 16px; font-weight: 800;
  color: var(--ink);
}
.pe-color:hover { transform: scale(1.1); border-color: rgba(245,241,232,0.5); }
.pe-color--on {
  border-color: var(--paper);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--paper);
  transform: scale(1.1);
}
.pe-color-check { line-height: 1; pointer-events: none; }

.pe-hint {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; opacity: 0.45;
  margin-top: 6px;
}
.pe-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid rgba(245,241,232,0.15);
}
.pe-cancel {
  background: transparent;
  border: 1px solid rgba(245,241,232,0.3);
  color: var(--paper);
  padding: 12px 22px;
  font-family: "JetBrains Mono"; font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
}
.pe-save {
  border: none;
  color: var(--ink);
  padding: 12px 22px;
  font-family: "Bebas Neue"; font-size: 18px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.pe-save:disabled { opacity: 0.4; cursor: not-allowed; }

/* === TRASH TALK SENDER === */
.tt-card {
  background: var(--bg);
  border: 2px solid var(--c);
  padding: 28px 32px;
  width: min(520px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}
.tt-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.tt-route {
  display: flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono"; font-weight: 800; font-size: 12px;
  letter-spacing: 0.1em;
}
.tt-from, .tt-to {
  color: var(--ink);
  padding: 4px 8px;
}
.tt-arrow { font-size: 18px; opacity: 0.5; }
.tt-x {
  background: transparent; border: 1px solid rgba(245,241,232,0.3);
  color: var(--paper);
  width: 32px; height: 32px;
  font-size: 22px;
  cursor: pointer;
}
.tt-title {
  font-family: "Bebas Neue"; font-size: 32px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.tt-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.tt-preset {
  text-align: left;
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.12);
  color: var(--paper);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12px;
  font-style: italic;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-preset:hover { background: rgba(245,241,232,0.08); border-color: var(--c); }
.tt-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.2);
  color: var(--paper);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-style: italic;
  outline: none;
  resize: vertical;
}
.tt-input:focus { border-color: var(--c); }
.tt-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.tt-count {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; opacity: 0.5;
}
.tt-send {
  border: none; color: var(--ink);
  padding: 12px 24px;
  font-family: "Bebas Neue"; font-size: 20px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.tt-send:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 900px) {
  .lb-grid { grid-template-columns: 1fr; }
  .lb-solo-grid { grid-template-columns: repeat(2, 1fr); }
  .ft-challenge { grid-template-columns: 1fr; gap: 10px; }
}


/* === MY JOURNEY === */
.jr-pane .ft-pane-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px;
}
.jr-range {
  display: flex; gap: 4px;
  border: 1px solid rgba(245,241,232,0.15);
}
.jr-range-btn {
  background: var(--bg2);
  border: none;
  border-right: 1px solid rgba(245,241,232,0.15);
  color: var(--paper);
  padding: 8px 14px;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.12s;
}
.jr-range-btn:last-child { border-right: none; }
.jr-range-btn:hover { background: rgba(245,241,232,0.05); }
.jr-range-btn--on { background: var(--c); color: var(--ink); }

/* HERO STATS */
.jr-hero {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr 1px 1fr;
  gap: 0;
  border: 2px solid var(--paper);
  background: var(--bg2);
  margin-bottom: 22px;
  padding: 22px 28px;
}
.jr-hero-stat { display: flex; flex-direction: column; gap: 6px; padding: 0 18px; }
.jr-hero-stat:first-child { padding-left: 0; }
.jr-hero-stat:last-child { padding-right: 0; }
.jr-hero-sep { background: rgba(245,241,232,0.1); width: 1px; }
.jr-hero-l {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; opacity: 0.55;
}
.jr-hero-v {
  font-family: "Bebas Neue"; font-size: 56px;
  letter-spacing: 0.01em; line-height: 0.9;
}
.jr-hero-u {
  font-size: 22px; opacity: 0.6;
  margin-left: 4px;
}
.jr-hero-s {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.15em; opacity: 0.5;
  margin-top: 2px;
}

/* SECTIONS */
.jr-section {
  border: 2px solid var(--paper);
  padding: 20px 24px;
  margin-bottom: 20px;
  background: var(--bg);
}
.jr-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
  gap: 12px;
}
.jr-section-title {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
}
.jr-section-sub {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.55;
}
.jr-empty {
  font-family: "JetBrains Mono"; font-size: 12px; opacity: 0.5;
  padding: 20px; text-align: center;
}

/* GRID */
.jr-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.jr-grid--2 .jr-section { margin-bottom: 0; }

/* CHART */
.jr-chart {
  width: 100%;
  height: 200px;
  display: block;
}

/* ZONES */
.jr-zones {
  display: flex; flex-direction: column; gap: 14px;
}
.jr-zone {}
.jr-zone-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.jr-zone-tag {
  color: var(--ink);
  padding: 4px 10px;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em;
}
.jr-zone-stats {
  display: flex; align-items: baseline; gap: 10px;
  margin-left: auto;
}
.jr-zone-pct {
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.02em;
}
.jr-zone-sub {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; opacity: 0.55;
}
.jr-zone-bar {
  height: 8px;
  background: rgba(245,241,232,0.06);
  overflow: hidden;
}
.jr-zone-fill {
  height: 100%;
  transition: width 0.4s ease;
}

/* LIFTS */
.jr-lifts {
  display: flex; flex-direction: column; gap: 14px;
}
.jr-lift {
  border: 1px solid rgba(245,241,232,0.1);
  padding: 12px 14px;
  background: var(--bg2);
}
.jr-lift-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.jr-lift-name {
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.04em;
}
.jr-lift-delta {
  font-family: "JetBrains Mono"; font-size: 12px; font-weight: 800;
  letter-spacing: 0.1em;
}
.jr-lift-delta--pos { color: var(--lime); }
.jr-lift-delta--neg { color: rgba(245,241,232,0.4); }
.jr-lift-curve {
  margin: 4px 0;
  position: relative;
}
.jr-lift-num {
  display: flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.85;
}
.jr-lift-arrow { opacity: 0.4; font-size: 13px; }

/* CALENDAR HEATMAP */
.jr-heatmap-wrap {
  display: flex; flex-direction: column; gap: 8px;
}
.jr-heatmap-grid {
  display: flex; gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.jr-heatmap-week {
  display: flex; flex-direction: column; gap: 3px;
  flex-shrink: 0;
}
.jr-heatmap-dows {
  display: none;
}
.jr-heat-cell {
  width: 14px; height: 14px;
  cursor: pointer;
  transition: opacity 0.1s;
  border-radius: 2px;
}
.jr-heat-cell:hover { outline: 1px solid var(--paper); }
.jr-heat-cell--legend {
  width: 12px; height: 12px;
  cursor: default;
}
.jr-heat-cell--legend:hover { outline: none; }
.jr-heat-cell--future { pointer-events: none; }
.jr-heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.15em; opacity: 0.5;
  justify-content: flex-end;
  margin-top: 4px;
}

/* INSIGHTS */
.jr-insights {
  display: flex; flex-direction: column; gap: 10px;
}
.jr-insight {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px; align-items: start;
  padding: 12px 14px;
  border-left: 3px solid;
  background: var(--bg2);
}
.jr-insight--win {
  border-color: var(--lime);
  background: linear-gradient(90deg, rgba(212,255,63,0.06), transparent 60%);
}
.jr-insight--warn {
  border-color: var(--amber);
  background: linear-gradient(90deg, rgba(255,184,0,0.06), transparent 60%);
}
.jr-insight--info {
  border-color: rgba(245,241,232,0.4);
}
.jr-insight-icon {
  font-family: "Bebas Neue"; font-size: 28px;
  line-height: 1;
  text-align: center;
}
.jr-insight--win .jr-insight-icon { color: var(--lime); }
.jr-insight--warn .jr-insight-icon { color: var(--amber); }
.jr-insight-title {
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.jr-insight-text {
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.85;
}

/* FAVES */
.jr-faves {
  display: flex; flex-direction: column; gap: 8px;
}
.jr-fave {
  display: grid;
  grid-template-columns: 30px 130px 1fr 60px;
  gap: 10px;
  align-items: center;
}
.jr-fave-rank {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; opacity: 0.55;
}
.jr-fave-name {
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-fave-bar {
  height: 8px;
  background: rgba(245,241,232,0.06);
  overflow: hidden;
}
.jr-fave-fill {
  height: 100%;
  transition: width 0.4s ease;
}
.jr-fave-count {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; opacity: 0.7;
  text-align: right;
}

@media (max-width: 1100px) {
  .jr-grid--2 { grid-template-columns: 1fr; }
  .jr-hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .jr-hero-sep { display: none; }
  .jr-hero-stat {
    padding: 12px 0;
    border-bottom: 1px solid rgba(245,241,232,0.1);
  }
}

/* ============================================================
   RESPONSIVE — laptop, tablet, mobile
   ============================================================ */

/* LAPTOP — narrow desktop / large tablet (≤1100px) */
@media (max-width: 1100px) {
  .ft-pane { padding: 24px; }
  .ft-header { padding: 18px 24px; gap: 16px; }
  .ft-brand { gap: 16px; }
  .ft-brand-name { font-size: 22px; }
  .ft-brand-date { font-size: 11px; letter-spacing: 0.18em; }
  .ft-pill { min-width: 0; padding: 7px 12px 7px 7px; }
  .ft-pill-name { font-size: 16px; }
  .ft-pill-av { width: 32px; height: 32px; font-size: 10px; }
  .ft-tab { padding: 14px 12px; font-size: 20px; }
  .ft-pane-title { font-size: 36px; }
  .ft-bodymap { gap: 20px; padding: 18px; }
  .ft-bodymap-name { font-size: 30px; }
  .ft-score-v { font-size: 64px; }
  .ft-score-vs-text { font-size: 52px; }
  .ft-scorebar { grid-template-columns: 1fr 160px 1fr; }
  .ft-score { padding: 22px 24px; }
  .ft-templates { padding: 14px 16px; }
}

/* TABLET (≤900px) */
@media (max-width: 900px) {
  .ft-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 20px;
  }
  .ft-brand {
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
  }
  .ft-brand-mark { font-size: 26px; }
  .ft-brand-name { font-size: 20px; }
  .ft-brand-date {
    width: 100%;
    font-size: 10px;
    opacity: 0.5;
  }
  .ft-who--squad {
    max-width: none;
    width: 100%;
    gap: 8px;
  }
  .ft-pill {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: flex-start;
  }
  .ft-pane { padding: 18px 16px; }
  .ft-pane-head { gap: 12px; margin-bottom: 18px; }
  .ft-pane-title { font-size: 30px; }
  .ft-pane-sub { font-size: 11px; letter-spacing: 0.18em; }

  /* Tabs scroll horizontally with snap */
  .ft-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ft-tabs::-webkit-scrollbar { display: none; }
  .ft-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 14px 18px;
    font-size: 18px;
    min-width: 140px;
  }

  /* Equipment filter scrolls horizontally with momentum */
  .ft-equip {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -16px 18px -16px;
    padding: 0 16px;
    scrollbar-width: none;
  }
  .ft-equip::-webkit-scrollbar { display: none; }
  .ft-equip-btn { flex: 0 0 auto; padding: 10px 14px; font-size: 16px; }

  /* Lift grid: 3 columns at tablet */
  .ft-lifts { grid-template-columns: repeat(3, 1fr); }
  .ft-lift:nth-child(4n) { border-right: 2px solid var(--paper); }
  .ft-lift:nth-child(3n) { border-right: none; }
  .ft-lift { min-height: 130px; padding: 14px; }
  .ft-lift-name { font-size: 18px; }

  /* Templates row scrolls horizontally on tablet */
  .ft-templates {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ft-templates::-webkit-scrollbar { display: none; }
  .ft-template { flex: 0 0 auto; }

  /* Body map: stack athletes vertically on tablet */
  .ft-bodymap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Challenge banner reflow */
  .ft-challenge {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
  }
  .ft-challenge-pct { font-size: 28px; text-align: right; }
}

/* MOBILE (≤640px) */
@media (max-width: 640px) {
  .ft-header { padding: 14px 16px; gap: 12px; }
  .ft-brand-mark { font-size: 22px; }
  .ft-brand-name { font-size: 18px; letter-spacing: 0.04em; }
  .ft-brand-date { display: none; }
  .ft-pill { padding: 6px 10px 6px 6px; gap: 8px; }
  .ft-pill-av { width: 28px; height: 28px; font-size: 9px; }
  .ft-pill-name { font-size: 14px; }
  .ft-pill-sub { font-size: 8px; letter-spacing: 0.08em; }

  .ft-pane { padding: 16px 12px; }
  .ft-pane-title { font-size: 26px; }
  .ft-pane-head { margin-bottom: 14px; }

  .ft-tab { padding: 12px 14px; font-size: 16px; min-width: 120px; }

  /* Lift grid: 2 columns on phone */
  .ft-lifts { grid-template-columns: repeat(2, 1fr); }
  .ft-lift:nth-child(3n) { border-right: 2px solid var(--paper); }
  .ft-lift:nth-child(2n) { border-right: none; }
  .ft-lift { min-height: 120px; padding: 12px; gap: 6px; }
  .ft-lift-name { font-size: 16px; line-height: 1.05; }
  .ft-lift-pr { font-size: 9px; }
  .ft-lift-howto { width: 26px; height: 26px; font-size: 12px; opacity: 0.7; }
  .ex-glyph { max-width: 80px; max-height: 80px; }

  /* Equipment filter — make first chip bigger touch target */
  .ft-equip-btn { font-size: 14px; padding: 10px 12px; }
  .ft-equip-icon { font-size: 12px; }

  /* Challenge banner */
  .ft-challenge-tag { font-size: 16px; }
  .ft-challenge-bar { height: 24px; }
  .ft-challenge-bar-text { font-size: 11px; padding: 0 10px; }
  .ft-challenge-pct { font-size: 24px; }

  /* Scoreboard / leaderboard collapse */
  .ft-scorebar { grid-template-columns: 1fr; }
  .ft-score { border-right: none; border-bottom: 2px solid var(--paper); padding: 18px 16px; }
  .ft-score:last-child { border-bottom: none; align-items: flex-start; }
  .ft-score-v { font-size: 56px; }
  .ft-score-vs { padding: 12px; flex-direction: row; gap: 12px; }
  .ft-score-vs-text { font-size: 36px; }
  .ft-score-gap { margin-top: 0; }

  /* Body map */
  .ft-bodymap { padding: 14px 12px; gap: 18px; }
  .ft-bodymap-name { font-size: 24px; }
  .mm-bodies { gap: 8px; }
  .mm-body { max-width: none; }

  /* Templates row */
  .ft-templates { padding: 12px 14px; gap: 8px; }
  .ft-template { font-size: 14px; padding: 7px 12px; }
  .ft-templates-lbl { font-size: 10px; letter-spacing: 0.18em; }

  /* Window selector */
  .ft-window-btn { padding: 5px 10px; font-size: 10px; }

  /* Modals — full-bleed on phone */
  .hf-modal,
  .ft-modal { padding: 0; align-items: stretch; overflow-y: auto; }
  .hf-card,
  .lg-card,
  .pe-card,
  .tt-card,
  .ft-modal-card {
    border-width: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
  }
  .hf-body { grid-template-columns: 1fr; overflow-y: auto; }
  .hf-anim { border-right: none; border-bottom: 2px solid var(--paper); }
  .hf-anim-frame { min-height: 220px; }
  .hf-title { font-size: 32px; }
  .hf-head { padding: 16px 18px; }

  /* Picker overrides for tighter mobile layout */
  .lg-meta-name { font-size: 22px; }
  .lg-w-num { font-size: 64px; }

  /* Journey hero stats stay 2x2 here */
  .jr-hero {
    padding: 16px;
    grid-template-columns: 1fr 1fr;
  }
  .jr-hero-v { font-size: 38px; }
  .jr-hero-stat { padding: 10px 0; }
  .jr-section { padding: 14px 14px; }
  .jr-section-title { font-size: 18px; }

  /* Leaderboard sub-grids */
  .lb-solo-grid { grid-template-columns: 1fr 1fr !important; }
  .lb-grid { gap: 12px; }

  /* Activity feed: ensure single line is preserved by hiding less-critical bits */
  .ft-feed-time { font-size: 9px; letter-spacing: 0.1em; }

  /* Muscle map insights — stack instead of side-by-side */
  .ft-insights { grid-template-columns: 1fr; gap: 12px; }
  .ft-insight { padding: 14px 16px; }
}

/* MICRO-MOBILE (≤360px) — iPhone SE, fold devices */
@media (max-width: 360px) {
  .ft-pill { flex: 1 1 100%; }
  .ft-tab { min-width: 110px; font-size: 15px; padding: 11px 12px; }
  .ft-pane-title { font-size: 22px; }
  .ft-lift-name { font-size: 14px; }
  .lg-w-num { font-size: 56px; }
  .jr-hero-v { font-size: 32px; }
}

/* ============================================================
   POLISH — micro-detail layer
   ============================================================ */

/* Touch target floor on mobile */
@media (hover: none) and (pointer: coarse) {
  .ft-tab,
  .ft-equip-btn,
  .ft-template,
  .ft-pill,
  .ft-lift,
  .lg-step,
  .lg-plate-chip,
  .lg-rep,
  .ft-window-btn,
  .jr-range-btn { min-height: 44px; }
}

/* Keyboard focus rings — always visible, never removed without replacement */
.ft-tab:focus-visible,
.ft-equip-btn:focus-visible,
.ft-pill:focus-visible,
.ft-lift:focus-visible,
.ft-template:focus-visible,
.ft-window-btn:focus-visible,
.jr-range-btn:focus-visible,
.ft-lift-howto:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Sticky tabs — they stay anchored as the user scrolls a long lift grid */
.ft-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}

/* Halftone backdrop should never trap pointer events */
.ft-halftone { pointer-events: none; }

/* Softer scrollbar for the lift grid container on desktop */
@media (min-width: 901px) {
  .ft-lifts {
    /* keep grid behaviour, just neutralise stale 4n borders when grid switches at smaller breakpoints */
  }
}

/* Reduced motion — kill the pulse and fill animations for vestibular safety */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print: not the use case but at least don't print 1280px-wide black */
@media print {
  body, .ft-root { background: white; color: black; }
  .ft-halftone, .ft-tabs, .ft-templates { display: none; }
}

/* ============================================================
   PROGRAMS LIBRARY (Plans Explorer)
   ============================================================ */
.px-pane { }
.px-head { }

/* Filter chip row */
.px-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.px-filter {
  background: var(--bg);
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 10px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.05em;
  transition: all 0.12s;
}
.px-filter:hover { background: var(--bg2); }
.px-filter--on {
  background: var(--c);
  border-color: var(--c);
  color: var(--ink);
}
.px-filter-label { line-height: 1; }
.px-filter-count {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(245,241,232,0.12);
  padding: 2px 6px;
  min-width: 20px; text-align: center;
}
.px-filter--on .px-filter-count {
  background: rgba(0,0,0,0.18);
}

/* Card grid */
.px-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.px-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-family: "JetBrains Mono"; font-size: 12px;
  letter-spacing: 0.18em;
  opacity: 0.5;
}

.px-card {
  background: var(--bg);
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 22px 22px 18px;
  text-align: left;
  cursor: pointer;
  font-family: "Archivo";
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}
.px-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c);
  transform: translateY(-4px);
  transition: transform 0.18s;
}
.px-card:hover {
  border-color: var(--c);
  transform: translateY(-2px);
}
.px-card:hover::before { transform: translateY(0); }

.px-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
}
.px-card-level {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--ink);
  padding: 5px 9px;
  align-self: flex-start;
}
.px-card-days {
  display: flex; align-items: baseline; gap: 6px;
  border-left: 1px solid rgba(245,241,232,0.18);
  padding-left: 12px;
}
.px-card-days-n {
  font-family: "Bebas Neue"; font-size: 36px; line-height: 1;
  color: var(--c);
}
.px-card-days-l {
  font-family: "JetBrains Mono"; font-size: 8px; font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.55; line-height: 1.2;
}

.px-card-name {
  font-family: "Bebas Neue"; font-size: 30px; line-height: 0.95;
  letter-spacing: 0.02em;
  margin-top: -2px;
}
.px-card-tagline {
  font-family: "Archivo"; font-size: 13px; line-height: 1.4;
  opacity: 0.78;
  font-style: italic;
}

.px-card-meta {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid rgba(245,241,232,0.12);
  padding-top: 12px;
}
.px-card-meta-row {
  display: grid; grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: baseline;
}
.px-card-meta-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.5;
}
.px-card-meta-v {
  font-family: "Archivo"; font-size: 12px;
  line-height: 1.3;
  opacity: 0.92;
}

.px-card-cta {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(245,241,232,0.08);
}

/* Detail modal */
.px-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 32px;
  overflow-y: auto;
}
.px-detail {
  background: var(--bg);
  border: 3px solid var(--c);
  width: 100%; max-width: 880px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.px-detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding: 24px 28px 20px;
  border-bottom: 2px solid var(--paper);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 8%, var(--bg)), var(--bg));
}
.px-detail-head-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.px-detail-level {
  align-self: flex-start;
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--ink);
  padding: 6px 10px;
  margin-bottom: 4px;
}
.px-detail-name {
  font-family: "Bebas Neue"; font-size: 44px; line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.px-detail-by {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; opacity: 0.6;
}
.px-detail-close {
  background: none; border: none;
  font-family: "Archivo"; font-size: 36px; font-weight: 300;
  line-height: 1;
  color: var(--paper);
  cursor: pointer;
  opacity: 0.6;
  padding: 0; width: 36px; height: 36px;
}
.px-detail-close:hover { opacity: 1; }

/* Stat strip */
.px-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 2px solid var(--paper);
  background: var(--bg2);
}
.px-detail-stat {
  padding: 16px 20px;
  border-right: 1px solid rgba(245,241,232,0.12);
  display: flex; flex-direction: column; gap: 4px;
}
.px-detail-stat:last-child { border-right: none; }
.px-detail-stat-v {
  font-family: "Bebas Neue"; font-size: 36px; line-height: 0.95;
  color: var(--c);
}
.px-detail-stat-v--small {
  font-size: 14px;
  font-family: "Archivo"; font-weight: 600;
  color: var(--paper);
  text-transform: capitalize;
}
.px-detail-stat-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.55;
  text-transform: uppercase;
}

/* Body */
.px-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex; flex-direction: column; gap: 28px;
}
.px-section { }
.px-section-h {
  font-family: "Bebas Neue"; font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--c);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
  margin-bottom: 14px;
}
.px-blurb {
  font-family: "Archivo"; font-size: 14px; line-height: 1.6;
  max-width: 65ch;
  opacity: 0.92;
}
.px-bestfor {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(245,241,232,0.18);
  background: var(--bg2);
  display: grid; grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: baseline;
}
.px-bestfor-tag {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c);
}
.px-bestfor-text {
  font-family: "Archivo"; font-size: 13px; line-height: 1.5;
  opacity: 0.9;
}

/* Sessions */
.px-sessions {
  display: flex; flex-direction: column; gap: 14px;
}
.px-session {
  border: 1px solid rgba(245,241,232,0.18);
  background: var(--bg2);
}
.px-session-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.px-session-num {
  font-family: "Bebas Neue"; font-size: 32px; line-height: 1;
  color: var(--c);
  min-width: 36px;
}
.px-session-label {
  font-family: "Bebas Neue"; font-size: 22px; line-height: 1;
  letter-spacing: 0.03em;
}
.px-session-focus {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.6;
  margin-top: 4px;
}
.px-exercises { display: flex; flex-direction: column; }
.px-exercise {
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(245,241,232,0.06);
  align-items: baseline;
}
.px-exercise:last-child { border-bottom: none; }
.px-exercise-name {
  font-family: "Archivo"; font-size: 13px; font-weight: 500;
}
.px-exercise-scheme {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c);
}

/* Progression rules */
.px-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.px-rules li {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: baseline;
  font-family: "Archivo"; font-size: 13px; line-height: 1.5;
}
.px-rules-num {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; opacity: 0.45;
}
.px-rules-text { opacity: 0.92; }

/* Source */
.px-source-link {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: "Bebas Neue"; font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--c);
  text-decoration: none;
  border-bottom: 2px solid var(--c);
  padding-bottom: 2px;
}
.px-source-link:hover { opacity: 0.8; }
.px-source-name { }
.px-source-arrow { font-size: 18px; }
.px-source-note {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin-top: 12px;
  max-width: 60ch;
}

/* Responsive */
@media (max-width: 900px) {
  .px-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .px-card { padding: 18px 18px 14px; gap: 12px; }
  .px-card-name { font-size: 26px; }
  .px-card-days-n { font-size: 30px; }

  .px-modal { padding: 0; }
  .px-detail {
    max-width: none; max-height: 100vh; height: 100vh;
    border-width: 0;
  }
  .px-detail-head { padding: 18px 20px 14px; }
  .px-detail-name { font-size: 32px; }
  .px-detail-stats { grid-template-columns: 1fr 1fr; }
  .px-detail-stat { border-right: 1px solid rgba(245,241,232,0.12); border-bottom: 1px solid rgba(245,241,232,0.12); padding: 12px 16px; }
  .px-detail-stat:nth-child(2n) { border-right: none; }
  .px-detail-stat:nth-last-child(-n+2) { border-bottom: none; }
  .px-detail-stat-v { font-size: 28px; }
  .px-detail-body { padding: 18px; gap: 22px; }
}

@media (max-width: 640px) {
  .px-filters { gap: 6px; padding-bottom: 14px; margin-bottom: 18px; }
  .px-filter { padding: 8px 12px; font-size: 14px; }
  .px-filter-count { font-size: 9px; padding: 2px 5px; }

  .px-grid { grid-template-columns: 1fr; gap: 12px; }
  .px-card { padding: 16px 16px 12px; }
  .px-card-name { font-size: 24px; }
  .px-card-tagline { font-size: 12px; }
  .px-card-meta-row { grid-template-columns: 76px 1fr; gap: 10px; }
  .px-card-meta-v { font-size: 11px; }

  .px-detail-name { font-size: 26px; }
  .px-detail-stat-v { font-size: 22px; }
  .px-detail-stat-v--small { font-size: 12px; }
  .px-detail-stat-l { font-size: 8px; }
  .px-bestfor { grid-template-columns: 1fr; gap: 6px; padding: 10px 14px; }
  .px-bestfor-tag { font-size: 8px; }
  .px-section-h { font-size: 18px; }
  .px-blurb { font-size: 13px; }
  .px-session-num { font-size: 26px; min-width: 30px; }
  .px-session-label { font-size: 18px; }
  .px-exercise { padding: 10px 14px; grid-template-columns: 1fr auto; gap: 10px; }
  .px-exercise-name { font-size: 12px; }
  .px-exercise-scheme { font-size: 10px; }
  .px-rules li { font-size: 12px; }
}


/* ============================================================
   COACH — rule-based intelligent layer
   ============================================================ */

/* Coach insights strip */
.cc-strip {
  border: 2px solid var(--paper);
  background: var(--bg2);
  margin-bottom: 16px;
  position: relative;
}
.cc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.cc-head-l {
  font-family: "Bebas Neue"; font-size: 18px; letter-spacing: 0.06em;
  color: var(--paper);
}
.cc-head-r {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.5;
}
.cc-scroll {
  display: flex; gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cc-scroll::-webkit-scrollbar { display: none; }
.cc-card {
  flex: 0 0 280px;
  background: var(--bg);
  border: 2px solid var(--cc);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.cc-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--cc);
}
.cc-card-top {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 4px;
}
.cc-card-icon {
  font-size: 22px; line-height: 1;
}
.cc-card-tag {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.22em;
  background: var(--cc);
  color: var(--ink);
  padding: 3px 7px;
}
.cc-card-headline {
  font-family: "Bebas Neue"; font-size: 20px; line-height: 1;
  letter-spacing: 0.03em;
}
.cc-card-detail {
  font-family: "Archivo"; font-size: 12px; line-height: 1.45;
  opacity: 0.85;
  flex: 1;
}
.cc-card-action {
  background: var(--cc);
  color: var(--ink);
  border: none;
  padding: 9px 14px;
  font-family: "Bebas Neue"; font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s;
  align-self: flex-start;
  margin-top: 4px;
}
.cc-card-action:hover { transform: translateY(-1px); }

/* PR-ready badge on lift cards */
.ft-lift-pr-ready {
  position: absolute;
  top: 6px; right: 32px;
  font-size: 14px;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(212, 255, 63, 0.6));
}

/* Recent workouts horizontal strip */
.rw-strip {
  border: 2px solid var(--paper);
  background: var(--bg);
  margin-bottom: 16px;
}
.rw-strip--empty { background: var(--bg2); }
.rw-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
}
.rw-empty-icon {
  font-family: "Bebas Neue"; font-size: 24px;
  color: var(--amber);
}
.rw-empty-text {
  font-family: "Archivo"; font-size: 13px; opacity: 0.7;
}
.rw-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.rw-head-l {
  font-family: "Bebas Neue"; font-size: 18px; letter-spacing: 0.06em;
}
.rw-head-r {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; opacity: 0.5;
}
.rw-scroll {
  display: flex; gap: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rw-scroll::-webkit-scrollbar { display: none; }
.rw-card {
  flex: 0 0 220px;
  background: var(--bg2);
  border: 2px solid rgba(245,241,232,0.15);
  color: var(--paper);
  padding: 14px 16px;
  text-align: left;
  font-family: "Archivo";
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}
.rw-card:hover {
  border-color: var(--c);
  transform: translateY(-2px);
}
.rw-card-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.rw-card-day {
  font-family: "Bebas Neue"; font-size: 22px; line-height: 1;
  letter-spacing: 0.04em;
  color: var(--c);
}
.rw-card-date {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; opacity: 0.5;
}
.rw-card-zones {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.rw-card-zone {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
  padding: 2px 6px;
}
.rw-card-zone--bw {
  background: rgba(245,241,232,0.18);
  color: var(--paper);
}
.rw-card-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  border-top: 1px solid rgba(245,241,232,0.1);
  padding-top: 10px;
}
.rw-card-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.rw-card-stat-v {
  font-family: "Bebas Neue"; font-size: 22px; line-height: 1;
  letter-spacing: 0.02em;
}
.rw-card-stat-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.14em; opacity: 0.5;
}
.rw-card-cta {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c);
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(245,241,232,0.06);
}

/* Recent workout detail modal */
.rw-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  overflow-y: auto;
}
.rw-detail {
  background: var(--bg);
  border: 3px solid var(--c);
  width: 100%; max-width: 720px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rw-detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 24px 18px;
  border-bottom: 2px solid var(--paper);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 8%, var(--bg)), var(--bg));
}
.rw-detail-day {
  font-family: "Bebas Neue"; font-size: 36px; line-height: 0.95;
  letter-spacing: 0.03em;
  color: var(--c);
}
.rw-detail-date {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.6;
  margin-top: 4px;
}
.rw-detail-close {
  background: none; border: none;
  font-family: "Archivo"; font-size: 32px; font-weight: 300;
  line-height: 1; color: var(--paper);
  cursor: pointer; padding: 0; width: 36px; height: 36px;
  opacity: 0.6;
}
.rw-detail-close:hover { opacity: 1; }
.rw-detail-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg2);
  border-bottom: 2px solid var(--paper);
}
.rw-detail-stat {
  padding: 14px 16px;
  border-right: 1px solid rgba(245,241,232,0.12);
}
.rw-detail-stat:last-child { border-right: none; }
.rw-detail-stat-v {
  font-family: "Bebas Neue"; font-size: 28px; line-height: 0.95;
  color: var(--paper);
}
.rw-detail-stat-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; opacity: 0.55;
  margin-top: 4px;
}
.rw-detail-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.rw-detail-list-head {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.22em; opacity: 0.5;
  margin-bottom: 12px;
}
.rw-ex {
  border-bottom: 1px solid rgba(245,241,232,0.08);
  padding: 12px 0;
}
.rw-ex:last-child { border-bottom: none; }
.rw-ex-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.rw-ex-name {
  font-family: "Bebas Neue"; font-size: 20px; line-height: 1;
  letter-spacing: 0.04em;
}
.rw-ex-replay {
  background: transparent;
  border: 1.5px solid var(--c);
  color: var(--c);
  padding: 6px 12px;
  font-family: "Bebas Neue"; font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.12s;
}
.rw-ex-replay:hover {
  background: var(--c);
  color: var(--ink);
}
.rw-ex-sets {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rw-ex-chip {
  background: var(--bg2);
  border: 1px solid rgba(245,241,232,0.15);
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.rw-ex-chip--pr {
  border-color: var(--c);
  color: var(--c);
}
.rw-ex-pr {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.15em;
  background: var(--c);
  color: var(--ink);
  padding: 1px 4px;
}
.rw-detail-foot {
  padding: 14px 20px;
  border-top: 2px solid var(--paper);
  background: var(--bg2);
}
.rw-replay-all {
  width: 100%;
  background: var(--c);
  color: var(--ink);
  border: none;
  padding: 14px;
  font-family: "Bebas Neue"; font-size: 18px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: filter 0.12s;
}
.rw-replay-all:hover { filter: brightness(1.1); }

/* Responsive */
@media (max-width: 900px) {
  .cc-card { flex-basis: 240px; padding: 12px 14px; }
  .cc-card-headline { font-size: 18px; }
  .cc-card-detail { font-size: 11px; }
  .rw-card { flex-basis: 200px; }
  .rw-card-day { font-size: 20px; }
  .rw-card-stat-v { font-size: 18px; }
}

@media (max-width: 640px) {
  .cc-head, .rw-head { padding: 10px 12px; }
  .cc-scroll, .rw-scroll { padding: 10px 12px; gap: 10px; }
  .cc-card { flex-basis: 220px; padding: 12px; }
  .cc-card-headline { font-size: 17px; }
  .cc-card-detail { font-size: 11px; }
  .cc-card-action { font-size: 13px; padding: 8px 12px; }
  .rw-card { flex-basis: 180px; padding: 12px; }
  .rw-card-stats { gap: 4px; }
  .rw-card-stat-v { font-size: 16px; }
  .rw-card-stat-l { font-size: 8px; letter-spacing: 0.12em; }

  .rw-modal { padding: 0; }
  .rw-detail {
    max-width: none; max-height: 100vh; height: 100vh;
    border-width: 0;
  }
  .rw-detail-head { padding: 16px 18px 12px; }
  .rw-detail-day { font-size: 26px; }
  .rw-detail-stats { grid-template-columns: 1fr 1fr 1fr; }
  .rw-detail-stat { padding: 12px 14px; }
  .rw-detail-stat-v { font-size: 22px; }
  .rw-ex-name { font-size: 17px; }
  .rw-replay-all { font-size: 16px; padding: 12px; }
}


/* ============================================================
   SOCIAL + FRESHNESS LAYER
   ============================================================ */

/* Family ticker (top of LOG A SET) */
.ft-ticker {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--c) 18%, var(--bg)), var(--bg) 70%);
  border: 1px solid color-mix(in oklab, var(--c) 60%, transparent);
  padding: 10px 14px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.ft-ticker-pulse {
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: var(--c);
  animation: tickerPulse 1.6s ease-in-out infinite;
}
@keyframes tickerPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.ft-ticker-tag {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
  padding: 4px 8px;
}
.ft-ticker-msg {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ft-ticker-action {
  font-family: "Bebas Neue"; font-size: 16px; line-height: 1;
  letter-spacing: 0.05em;
  color: var(--c);
}
.ft-ticker-detail {
  font-family: "Archivo"; font-size: 12px; opacity: 0.85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ft-ticker-time {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.55;
  flex-shrink: 0;
}

/* Monthly challenge banner */
.mc-banner {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(90deg, rgba(255,184,0,0.12), rgba(212,255,63,0.12));
  border: 2px solid var(--paper);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.mc-banner--behind { border-color: var(--myo); }
.mc-l { display: flex; flex-direction: column; gap: 4px; }
.mc-tag {
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.05em;
}
.mc-meta {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.7;
}
.mc-bar {
  height: 18px;
  background: rgba(245,241,232,0.08);
  position: relative;
  overflow: hidden;
}
.mc-bar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #D4FF3F, #FFB800, #FF2D6F);
  transition: width 0.35s ease;
}
.mc-bar-pace {
  position: absolute; top: -2px; bottom: -2px; width: 2px;
  background: var(--paper);
  pointer-events: none;
}
.mc-bar-pace::after {
  content: "";
  position: absolute; top: -3px; left: -3px; right: -3px;
  height: 6px; background: var(--paper);
}
.mc-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mc-pct {
  font-family: "Bebas Neue"; font-size: 26px; line-height: 1;
  color: var(--amber);
}
.mc-day {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.6;
}

/* Workout of the day card */
.wod-card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 6%, var(--bg)), var(--bg));
  border: 2px solid var(--c);
  margin-bottom: 16px;
  position: relative;
}
.wod-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.wod-tag {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c);
}
.wod-title {
  font-family: "Bebas Neue"; font-size: 22px; line-height: 1;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.wod-start {
  border: none;
  color: var(--ink);
  padding: 10px 18px;
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: filter 0.12s;
}
.wod-start:hover { filter: brightness(1.1); }
.wod-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(245,241,232,0.1);
}
.wod-lift {
  background: var(--bg);
  border: none;
  color: var(--paper);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: "Archivo";
  transition: background 0.12s;
}
.wod-lift:hover { background: var(--bg2); }
.wod-lift-num {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; opacity: 0.45;
}
.wod-lift-info { min-width: 0; }
.wod-lift-name {
  font-family: "Bebas Neue"; font-size: 18px; line-height: 1;
  letter-spacing: 0.03em;
}
.wod-lift-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 5px;
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.wod-lift-zone {
  color: var(--ink); padding: 2px 6px;
  letter-spacing: 0.12em;
}
.wod-lift-prescribe { color: var(--c); }
.wod-lift-reason { opacity: 0.5; }
.wod-lift-go {
  font-family: "Bebas Neue"; font-size: 22px;
  text-align: center;
  color: var(--c);
  opacity: 0.7;
}
.wod-lift:hover .wod-lift-go { opacity: 1; }

/* Achievements rail */
.ach-section {
  border: 2px solid var(--paper);
  background: var(--bg);
  margin-bottom: 22px;
}
.ach-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
}
.ach-head-l {
  font-family: "Bebas Neue"; font-size: 20px; letter-spacing: 0.05em;
}
.ach-head-sub {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.6;
  margin-top: 4px;
}
.ach-progress {
  flex: 1; max-width: 220px; height: 8px;
  background: rgba(245,241,232,0.08);
  position: relative; overflow: hidden;
}
.ach-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  transition: width 0.4s ease;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: rgba(245,241,232,0.08);
}
.ach {
  background: var(--bg);
  padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  font-family: "Archivo";
  transition: transform 0.12s;
}
.ach--earned { background: linear-gradient(180deg, color-mix(in oklab, var(--tier) 10%, var(--bg)), var(--bg)); }
.ach--earned:hover { transform: translateY(-2px); }
.ach--locked { opacity: 0.32; }
.ach-icon {
  font-size: 32px; line-height: 1;
  filter: var(--earned, drop-shadow(0 0 8px color-mix(in oklab, var(--tier) 50%, transparent)));
}
.ach--locked .ach-icon { font-size: 22px; opacity: 0.5; }
.ach-name {
  font-family: "Bebas Neue"; font-size: 14px; line-height: 1;
  letter-spacing: 0.04em;
  color: var(--tier);
}
.ach--locked .ach-name { color: var(--paper); }
.ach-desc {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; opacity: 0.65;
  line-height: 1.35;
}

/* Sunday recap modal */
.sr-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.94);
  display: flex; align-items: center; justify-content: center;
  z-index: 250;
  padding: 24px;
  overflow-y: auto;
}
.sr-card {
  background: var(--bg);
  border: 3px solid var(--c);
  width: 100%; max-width: 580px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sr-header {
  padding: 24px 28px 18px;
  border-bottom: 2px solid var(--paper);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 12%, var(--bg)), var(--bg));
  position: relative;
}
.sr-tag {
  font-family: "JetBrains Mono"; font-size: 11px; font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--amber);
}
.sr-title {
  font-family: "Bebas Neue"; font-size: 36px; line-height: 0.95;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.sr-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none;
  font-family: "Archivo"; font-size: 28px; color: var(--paper);
  opacity: 0.6; cursor: pointer;
  width: 32px; height: 32px;
}
.sr-close:hover { opacity: 1; }

.sr-winner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--wc, var(--amber)) 14%, transparent), transparent);
  border-bottom: 1px solid rgba(245,241,232,0.1);
}
.sr-winner-crown {
  font-size: 40px; line-height: 1;
  filter: drop-shadow(0 0 12px var(--wc, var(--amber)));
}
.sr-winner-tag {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 800;
  letter-spacing: 0.25em; opacity: 0.6;
}
.sr-winner-name {
  font-family: "Bebas Neue"; font-size: 28px; line-height: 1;
  letter-spacing: 0.03em;
  margin-top: 4px;
}
.sr-winner-vol {
  font-family: "JetBrains Mono"; font-size: 14px; font-weight: 800;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.sr-bars { padding: 18px 28px; }
.sr-bars-head {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em; opacity: 0.6;
  margin-bottom: 12px;
}
.sr-row {
  display: grid;
  grid-template-columns: 28px 56px 1fr 60px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.sr-row-rank {
  font-family: "Bebas Neue"; font-size: 18px;
  opacity: 0.5;
}
.sr-row-name {
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.05em;
}
.sr-row-bar {
  height: 16px;
  background: rgba(245,241,232,0.06);
  position: relative; overflow: hidden;
}
.sr-row-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  transition: width 0.4s ease;
}
.sr-row-v {
  font-family: "JetBrains Mono"; font-size: 12px; font-weight: 800;
  letter-spacing: 0.05em; text-align: right;
}

.sr-personal {
  border-top: 1px solid rgba(245,241,232,0.1);
  padding: 18px 28px;
}
.sr-personal-head {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em; opacity: 0.55;
  margin-bottom: 14px;
}
.sr-personal-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(245,241,232,0.1);
}
.sr-stat {
  background: var(--bg2);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sr-stat-v {
  font-family: "Bebas Neue"; font-size: 28px; line-height: 1;
}
.sr-stat-l {
  font-family: "JetBrains Mono"; font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; opacity: 0.55;
}

.sr-target {
  padding: 18px 28px;
  background: var(--bg2);
  border-top: 1px solid rgba(245,241,232,0.1);
}
.sr-target-tag {
  font-family: "JetBrains Mono"; font-size: 10px; font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c);
}
.sr-target-text {
  font-family: "Archivo"; font-size: 13px; line-height: 1.5;
  margin-top: 6px;
  opacity: 0.92;
}
.sr-dismiss {
  border: none;
  color: var(--ink);
  padding: 16px;
  font-family: "Bebas Neue"; font-size: 20px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: filter 0.12s;
}
.sr-dismiss:hover { filter: brightness(1.1); }

/* Leaderboard recap button */
.lb-recap-btn {
  background: transparent;
  border: 2px solid var(--amber);
  color: var(--amber);
  padding: 8px 14px;
  font-family: "Bebas Neue"; font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.12s;
}
.lb-recap-btn:hover {
  background: var(--amber);
  color: var(--ink);
}

/* Responsive */
@media (max-width: 900px) {
  .wod-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ach { padding: 12px 8px; }
  .ach-name { font-size: 12px; }
  .ach-desc { font-size: 8px; letter-spacing: 0.06em; }
  .mc-banner { grid-template-columns: 1fr auto; gap: 10px; }
  .mc-bar { grid-column: 1 / -1; }
  .mc-pct { font-size: 22px; }
}

@media (max-width: 640px) {
  .ft-ticker { gap: 10px; padding: 10px 12px; }
  .ft-ticker-action { font-size: 14px; }
  .ft-ticker-detail { font-size: 11px; }
  .wod-head { flex-direction: column; align-items: flex-start; }
  .wod-start { width: 100%; }
  .wod-lift-name { font-size: 16px; }
  .wod-lift-meta { gap: 6px; font-size: 9px; }
  .ach-progress { display: none; }
  .ach-head { padding: 12px 14px; }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .sr-modal { padding: 0; }
  .sr-card {
    max-width: none; max-height: 100vh; border-width: 0; height: 100vh;
  }
  .sr-header { padding: 18px 20px 14px; }
  .sr-title { font-size: 28px; }
  .sr-winner, .sr-bars, .sr-personal, .sr-target { padding: 14px 18px; }
  .sr-winner-name { font-size: 22px; }
  .sr-winner-crown { font-size: 32px; }
  .sr-personal-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-recap-btn { font-size: 13px; padding: 6px 10px; }
}
