/* ============================================================
   Button Up Performance OS — theme
   All brand decisions live in :root. Swap these when the
   real Button Up brand assets arrive.
   ============================================================ */
:root {
  color-scheme: light;
  /* Brand (PLACEHOLDER — replace with Button Up assets) */
  --brand: #1b2a4a;            /* deep navy */
  --brand-2: #b98a2f;          /* brass */
  --brand-2-soft: #f4e9d3;
  --brand-ink: #ffffff;

  /* Surfaces & ink (from validated viz reference) */
  --page: #f4f4f1;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ring: rgba(11,11,11,0.10);

  /* Categorical series (validated order, light mode) */
  --s1: #2a78d6; --s2: #008300; --s3: #e87ba4; --s4: #eda100;
  --s5: #1baf7a; --s6: #eb6834; --s7: #4a3aa7; --s8: #e34948;

  /* Status */
  --good: #0ca30c; --good-text: #006300;
  --warn: #fab219; --serious: #ec835a; --critical: #d03b3b;

  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(11,11,11,.05), 0 4px 14px rgba(11,11,11,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; }

.app { display: flex; height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 216px; flex: 0 0 216px;
  background: var(--brand); color: var(--brand-ink);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
}
.wordmark { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.wordmark .mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-2); position: relative; flex: 0 0 34px;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.28);
}
.wordmark .mark::before {
  /* button holes */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 38% 38%, var(--brand) 2.4px, transparent 2.6px),
    radial-gradient(circle at 62% 38%, var(--brand) 2.4px, transparent 2.6px),
    radial-gradient(circle at 38% 62%, var(--brand) 2.4px, transparent 2.6px),
    radial-gradient(circle at 62% 62%, var(--brand) 2.4px, transparent 2.6px);
}
.wordmark .wm-text { line-height: 1.1; }
.wordmark .wm-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.wordmark .wm-sub { font-size: 10px; opacity: .62; text-transform: uppercase; letter-spacing: 1.4px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav button {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px;
  color: rgba(255,255,255,.78); font-size: 13.5px; font-weight: 500;
  text-align: left; width: 100%;
}
.nav button .ico { width: 20px; text-align: center; font-size: 15px; }
.nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav button.active { background: rgba(255,255,255,.14); color: #fff; }
.nav button .pill {
  margin-left: auto; background: var(--brand-2); color: var(--brand);
  font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 7px;
}
.sidebar .spacer { flex: 1; }
.sidebar .me {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px;
}
.sidebar .me .avatar { width: 32px; height: 32px; font-size: 12px; }
.sidebar .me .who { line-height: 1.2; }
.sidebar .me .who b { font-size: 12.5px; display: block; }
.sidebar .me .who span { font-size: 11px; opacity: .6; }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--grid);
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.topbar .crumb { color: var(--ink-3); font-size: 12.5px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.live-dot::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.content { flex: 1; overflow-y: auto; padding: 20px 22px 32px; }

/* ---------- Generic components ---------- */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--ring); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.card h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mt { margin-top: 14px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--grid); color: var(--ink-2);
}
.chip:hover { border-color: var(--axis); color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.stat-tile .label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stat-tile .value { font-size: 27px; font-weight: 700; margin-top: 3px; letter-spacing: -.3px; }
.stat-tile .delta { font-size: 12px; margin-top: 3px; font-weight: 600; }
.delta.up { color: var(--good-text); }
.delta.down { color: var(--critical); }
.delta .vs { color: var(--ink-3); font-weight: 400; }

.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--grid); }
.tbl td { padding: 8px 8px; border-bottom: 1px solid var(--grid); font-size: 13px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.num, .tbl th.num { text-align: right; }

/* ---------- Leaderboard ---------- */
.lb-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--grid); }
.lb-row:last-child { border-bottom: none; }
.lb-row .rank { width: 30px; font-weight: 700; font-size: 14px; color: var(--ink-3); text-align: center; flex: 0 0 30px; }
.lb-row.top .rank { font-size: 17px; color: var(--ink); }
.lb-row .who { width: 172px; flex: 0 0 172px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.lb-row .who .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .who .tm { font-size: 11px; color: var(--ink-3); }
.lb-row .barwrap { flex: 1; height: 18px; position: relative; }
.lb-row .bar { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 0 4px 4px 0;
  min-width: 3px; transition: width .6s cubic-bezier(.2,.8,.3,1); }
.lb-row .val { width: 84px; flex: 0 0 84px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-row .mv { width: 34px; flex: 0 0 34px; font-size: 11.5px; font-weight: 600; text-align: right; }
.mv.up { color: var(--good-text); } .mv.down { color: var(--critical); } .mv.flat { color: var(--ink-3); }
.lb-row.clickable:hover { background: var(--page); border-radius: 8px; cursor: pointer; }

.medal { font-size: 15px; }

/* ---------- Profiles ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rep-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .12s; }
.rep-card:hover { transform: translateY(-2px); }
.rep-card .top { display: flex; gap: 11px; align-items: center; }
.rep-card .nm { font-weight: 700; font-size: 14px; }
.rep-card .tm { font-size: 11.5px; color: var(--ink-3); }
.rep-card .badges { font-size: 15px; letter-spacing: 2px; min-height: 20px; }
.rep-card .mini-stats { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); }
.rep-card .mini-stats b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head .avatar { width: 62px; height: 62px; font-size: 21px; }
.profile-head h2 { font-size: 21px; }
.profile-head .sub { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.badge-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--page);
  border: 1px solid var(--grid); border-radius: 99px; padding: 5px 12px 5px 8px; font-size: 12.5px; font-weight: 500; }
.back-btn { color: var(--ink-2); font-size: 13px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--grid); background: var(--surface); }
.back-btn:hover { color: var(--ink); border-color: var(--axis); }

/* ---------- Goals ---------- */
.goal-row { padding: 13px 4px; border-bottom: 1px solid var(--grid); }
.goal-row:last-child { border-bottom: none; }
.goal-row .head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.goal-row .head .nm { font-weight: 600; font-size: 13.5px; }
.goal-row .head .kpi { font-size: 12px; color: var(--ink-3); }
.goal-row .head .nums { margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.goal-row .head .nums b { color: var(--ink); font-size: 14px; }
.pace-track { position: relative; height: 14px; background: var(--page); border-radius: 7px; overflow: visible; }
.pace-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px 4px 4px 7px; min-width: 4px; transition: width .5s; }
.pace-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.pace-marker::after { content: 'pace'; position: absolute; top: -15px; left: -12px; font-size: 9.5px; color: var(--ink-3); letter-spacing: .4px; }
.pace-note { font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.pace-note.ahead { color: var(--good-text); }
.pace-note.behind { color: var(--critical); }
.pace-note.on { color: var(--ink-2); }

/* ---------- Competitions ---------- */
.comp-card .comp-head { display: flex; align-items: flex-start; gap: 12px; }
.comp-card .comp-ico { font-size: 26px; }
.comp-card .comp-title { font-weight: 700; font-size: 15px; }
.comp-card .comp-type { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--brand-2); font-weight: 700; }
.comp-card .comp-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.comp-card .comp-meta { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.comp-card .comp-meta b { color: var(--ink); }
.comp-standings { margin-top: 12px; border-top: 1px solid var(--grid); padding-top: 10px; }
.cs-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cs-row .cs-nm { width: 130px; flex: 0 0 130px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row .cs-barwrap { flex: 1; height: 14px; position: relative; }
.cs-row .cs-bar { position: absolute; top: 1px; bottom: 1px; left: 0; border-radius: 0 4px 4px 0; min-width: 3px; }
.cs-row .cs-val { width: 70px; flex: 0 0 70px; text-align: right; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.first-to-track { position: relative; height: 22px; background: var(--page); border-radius: 11px; margin-top: 4px; }
.launch-btn { background: var(--brand); color: #fff; font-weight: 600; font-size: 13px;
  padding: 9px 18px; border-radius: 9px; }
.launch-btn:hover { background: #24365c; }

.bracket { display: flex; gap: 26px; margin-top: 12px; align-items: stretch; }
.bracket .round { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.bracket .match { border: 1px solid var(--grid); border-radius: 9px; overflow: hidden; background: var(--surface); }
.bracket .slot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 12px; }
.bracket .slot + .slot { border-top: 1px solid var(--grid); }
.bracket .slot.win { background: var(--brand-2-soft); font-weight: 700; }
.bracket .slot.tbd { color: var(--ink-3); font-style: italic; }
.bracket .rlabel { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-3); margin-bottom: 4px; font-weight: 600; }

/* ---------- Canvassing ---------- */
.map-wrap { display: flex; gap: 14px; height: calc(100vh - 170px); min-height: 470px; }
.map-panel { flex: 1; position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--ring); background: #eceae3; box-shadow: var(--shadow); }
.map-svg { width: 100%; height: 100%; display: block; }
.map-side { width: 268px; flex: 0 0 268px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.legend-row { display: flex; align-items: center; gap: 9px; padding: 5px 2px; font-size: 12.5px; cursor: pointer; border-radius: 6px; }
.legend-row:hover { background: var(--page); }
.legend-row.dim { opacity: .35; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ring); }
.legend-row .cnt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12px; }
.pin-pop {
  position: absolute; z-index: 30; width: 232px;
  background: var(--surface); border-radius: 11px; border: 1px solid var(--ring);
  box-shadow: 0 6px 24px rgba(11,11,11,.16); padding: 12px 13px;
}
.pin-pop .addr { font-weight: 700; font-size: 13px; }
.pin-pop .meta { font-size: 11.5px; color: var(--ink-2); margin: 3px 0 9px; }
.pin-pop .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pin-pop .actions button {
  font-size: 11.5px; font-weight: 600; padding: 6px 4px; border-radius: 7px;
  border: 1px solid var(--grid); background: var(--page);
}
.pin-pop .actions button:hover { border-color: var(--axis); }
.map-toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500;
  padding: 8px 16px; border-radius: 99px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.map-toast.show { opacity: .94; }

/* ---------- Assistant ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 440px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 6px 2px 14px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 11px; max-width: 78%; }
.msg .avatar { width: 30px; height: 30px; font-size: 11px; }
.msg .bubble { background: var(--surface); border: 1px solid var(--ring); border-radius: 13px;
  padding: 11px 14px; font-size: 13.5px; line-height: 1.55; box-shadow: var(--shadow); }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.msg .bubble b { font-weight: 700; }
.msg .bubble .rec { margin-top: 8px; padding: 9px 11px; background: var(--brand-2-soft);
  border-radius: 9px; font-size: 12.5px; }
.msg .bubble .rec .rec-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--brand-2); font-weight: 700; display: block; margin-bottom: 3px; }
.msg .bubble ul { margin: 6px 0 2px 18px; }
.msg .bubble li { margin: 3px 0; }
.chat-input-row { display: flex; gap: 10px; padding-top: 12px; }
.chat-input-row input { flex: 1; border: 1px solid var(--grid); border-radius: 11px;
  padding: 11px 15px; background: var(--surface); font-size: 13.5px; outline: none; }
.chat-input-row input:focus { border-color: var(--brand); }
.chat-input-row button { background: var(--brand); color: #fff; border-radius: 11px;
  padding: 0 20px; font-weight: 600; font-size: 13.5px; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3);
  animation: blink 1.2s infinite; font-style: normal; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- Feed ---------- */
.feed-item { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--grid);
  font-size: 12.5px; align-items: center; }
.feed-item:last-child { border-bottom: none; }
.feed-item .avatar { width: 28px; height: 28px; font-size: 10px; }
.feed-item .txt b { font-weight: 600; }
.feed-item .when { margin-left: auto; color: var(--ink-3); font-size: 11px; white-space: nowrap; padding-left: 8px; }
.feed-item.flash { animation: flashIn .8s; }
@keyframes flashIn { 0% { background: var(--brand-2-soft); } 100% { background: transparent; } }

/* ---------- Sparkline & charts ---------- */
.spark { display: block; }
.chart-note { font-size: 11px; color: var(--ink-3); margin-top: 6px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,11,11,.42); z-index: 100;
  display: flex; align-items: center; justify-content: center; }
.modal { background: var(--surface); border-radius: 16px; width: 560px; max-width: 92vw;
  max-height: 86vh; overflow-y: auto; padding: 22px 24px; box-shadow: 0 14px 50px rgba(11,11,11,.3); }
.modal h2 { font-size: 17px; margin-bottom: 4px; }
.modal .sub { color: var(--ink-2); font-size: 13px; margin-bottom: 16px; }
.tmpl-row { display: flex; gap: 12px; align-items: center; padding: 12px 12px; border: 1px solid var(--grid);
  border-radius: 11px; margin-bottom: 9px; cursor: pointer; }
.tmpl-row:hover { border-color: var(--brand); background: var(--page); }
.tmpl-row .ico { font-size: 22px; }
.tmpl-row b { font-size: 13.5px; display: block; }
.tmpl-row span { font-size: 12px; color: var(--ink-2); }
.modal .close-x { float: right; font-size: 18px; color: var(--ink-3); padding: 2px 8px; }
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.form-row select, .form-row input { width: 100%; padding: 9px 12px; border: 1px solid var(--grid);
  border-radius: 9px; background: var(--surface); }

@media (max-width: 1100px) {
  .cols-4, .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Button Up Management brand skin ===== */
:root {
  --brand: #32424E;          /* navy */
  --brand-2: #E3AB73;        /* gold */
  --brand-2-soft: #F6E7D3;   /* gold tint */
  --page: #F3EEE6;           /* light background */
  --surface: #FCFAF6;
  --grid: #E4DCCE;
  --axis: #C9C0AF;
  --ring: rgba(50,66,78,.12);
}
/* four-dot logo mark — top-right dot gold */
.wordmark .mark {
  background:
    radial-gradient(circle 7px at 30% 30%, #FCFAF6 97%, transparent) ,
    radial-gradient(circle 7px at 70% 30%, #E3AB73 97%, transparent),
    radial-gradient(circle 7px at 30% 70%, #FCFAF6 97%, transparent),
    radial-gradient(circle 7px at 70% 70%, #FCFAF6 97%, transparent);
  background-color: transparent;
  border-radius: 0; box-shadow: none;
}
.wordmark .mark::before { content: none; }
.wordmark .wm-name { letter-spacing: 2.5px; text-transform: uppercase; font-size: 13.5px; }
.wordmark .wm-sub { color: #E3AB73; opacity: 1; }
.login-card .mark {
  background:
    radial-gradient(circle 11px at 28% 28%, #32424E 97%, transparent),
    radial-gradient(circle 11px at 72% 28%, #E3AB73 97%, transparent),
    radial-gradient(circle 11px at 28% 72%, #32424E 97%, transparent),
    radial-gradient(circle 11px at 72% 72%, #32424E 97%, transparent) !important;
  background-color: transparent !important;
  border-radius: 0 !important; box-shadow: none !important;
}
.login-card h1 { letter-spacing: 1.5px; text-transform: uppercase; font-size: 16px; }
.launch-btn:hover { background: #3d505e; }
.nav button .pill { color: #32424E; }

/* ===== Photos, podium, date range ===== */
.avatar.pic { background-size: cover; background-position: center; color: transparent; }
.podium { display: flex; gap: 16px; align-items: flex-end; justify-content: center;
  margin: 6px auto 26px; max-width: 720px; }
.podium-card { flex: 1; background: var(--surface); border: 1px solid var(--ring); border-radius: 16px;
  box-shadow: 0 8px 28px rgba(50,66,78,.14); padding: 18px 14px 14px; text-align: center;
  cursor: pointer; transition: transform .15s; position: relative; }
.podium-card:hover { transform: translateY(-3px); }
.podium-card.first { padding: 26px 14px 20px; transform: translateY(-14px);
  border: 2px solid var(--brand-2); box-shadow: 0 14px 38px rgba(227,171,115,.35); }
.podium-card.first:hover { transform: translateY(-17px); }
.podium-medal { font-size: 22px; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border-radius: 50%; width: 34px; height: 34px; line-height: 32px;
  border: 1px solid var(--grid); }
.podium-av { width: 64px !important; height: 64px !important; font-size: 22px !important;
  margin: 6px auto 8px; display: inline-flex !important; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--grid); }
.podium-card.first .podium-av { width: 84px !important; height: 84px !important;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--brand-2); }
.podium-name { font-weight: 700; font-size: 14px; }
.podium-card.first .podium-name { font-size: 15.5px; }
.podium-stat { font-size: 12px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.podium-rank { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--brand-2);
  font-weight: 700; margin-top: 7px; }
.date-inp { padding: 8px 12px; border: 1px solid var(--grid); border-radius: 9px;
  background: var(--surface); font: inherit; color: var(--ink); }

/* ===== Mobile layout (bottom tab bar) ===== */
@media (max-width: 768px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: 100dvh; }
  .sidebar {
    order: 2; width: 100%; flex: 0 0 auto; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    flex-direction: row; align-items: center;
    position: sticky; bottom: 0; z-index: 60;
    box-shadow: 0 -4px 16px rgba(50,66,78,.25);
  }
  .wordmark, .sidebar .spacer, .sidebar .me { display: none; }
  .nav { flex-direction: row; flex: 1; margin: 0; gap: 0; justify-content: space-around; }
  .nav button {
    flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 9.5px; font-weight: 600;
    flex: 1; justify-content: center; text-align: center; border-radius: 8px; letter-spacing: 0;
  }
  .nav button .ico { font-size: 19px; width: auto; }
  .nav button .pill { display: none; }
  .main { order: 1; flex: 1; min-height: 0; }
  .topbar { padding: 0 14px; height: 50px; flex: 0 0 50px; }
  .topbar h1 { font-size: 15.5px; }
  .topbar .crumb, .live-dot { display: none; }
  .content { padding: 12px 12px 20px; }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr !important; gap: 10px; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .card { padding: 12px 13px; }
  .stat-tile .value { font-size: 21px; }
  .chip-row { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chip { flex: 0 0 auto; padding: 6px 11px; font-size: 12px; }
  .podium { gap: 8px; margin: 2px 0 18px; }
  .podium-card { padding: 12px 6px 10px; }
  .podium-card.first { padding: 18px 6px 14px; transform: translateY(-10px); }
  .podium-av { width: 48px !important; height: 48px !important; font-size: 16px !important; }
  .podium-card.first .podium-av { width: 62px !important; height: 62px !important; }
  .podium-name { font-size: 12px; }
  .podium-card.first .podium-name { font-size: 13px; }
  .podium-stat { font-size: 10.5px; }
  .lb-row { gap: 8px; padding: 8px 2px; }
  .lb-row .who { width: 128px; flex: 0 0 128px; }
  .lb-row .val { width: 66px; flex: 0 0 66px; font-size: 12.5px; }
  .lb-row .mv { width: 30px; flex: 0 0 30px; font-size: 10px; }
  .rep-card .mini-stats { gap: 8px; font-size: 10.5px; }
  .rep-card .mini-stats b { font-size: 13px; }
  .profile-head { flex-wrap: wrap; gap: 10px; }
  .profile-head h2 { font-size: 17px; }
  .chat-wrap { height: calc(100dvh - 150px); min-height: 320px; }
  .msg { max-width: 92%; }
  .modal { width: 94vw; padding: 16px 16px; }
  .goal-row .head { flex-wrap: wrap; }
}
