/* ===== styles.css ===== */
/* Unorthodox Ops member app — "Clear guidance. Built around you." design language.
   Near-black premium theme: eyebrow labels, Barlow Condensed headlines with red
   accents, subtle-bordered cards, red-pill tab bar. Mobile-first. */

:root {
  --bg: #070708;
  --surface: #0e0e11;
  --card: #121217;
  --card-2: #17171c;
  --line: rgba(255, 255, 255, 0.09);
  --red: #e10600;
  --red-soft: #ff6b61;
  --salmon: #f0756c;
  --green: #22c55e;
  --text: #f5f5f5;
  --muted: #8e939c;
  --radius: 18px;
  --tabbar-h: 74px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100dvh;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 560px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ---------- eyebrow labels ---------- */
.eyebrow-red, .eyebrow-green, .eyebrow-muted {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; margin: 0;
}
.eyebrow-red { color: var(--red-soft); }
.eyebrow-green { color: var(--green); }
.eyebrow-muted { color: var(--muted); }

.green-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  display: inline-block;
}

/* ---------- auth ---------- */
.auth-view[hidden] { display: none; }
.auth-view {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  background:
    radial-gradient(560px 300px at 50% -60px, rgba(225, 6, 0, 0.16), transparent),
    var(--bg);
}
.auth-inner { width: 100%; max-width: 400px; }
.auth-inner > .eyebrow-muted { margin-bottom: 10px; }
.auth-hero {
  font-family: var(--font-display); font-weight: 800;
  font-size: 52px; line-height: 0.95; letter-spacing: 1px; margin: 0 0 10px;
}
.auth-hero span { color: var(--red-soft); }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; line-height: 1.5; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 11px; border-radius: 12px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: var(--font-body);
}
.auth-tab.on { background: rgba(225, 6, 0, 0.16); color: var(--red-soft); border-color: var(--red); }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font-size: 16px; font-family: var(--font-body);
}
.field input:focus { outline: none; border-color: var(--red); }

.auth-error {
  color: #ff8a80; font-size: 13px; margin: 0 0 12px; line-height: 1.4;
}
.auth-error.info { color: var(--green); font-weight: 600; }
.keep-signed {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin: 0 0 12px; cursor: pointer;
}
.keep-signed input { width: 16px; height: 16px; accent-color: var(--red); }
.auth-note { color: var(--muted); font-size: 12px; text-align: center; margin: 14px 0 0; }
.brand-foot {
  text-align: center; margin: 28px 0 0;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 3px;
  color: var(--muted);
}
.brand-foot span { color: var(--red); }

/* ---------- buttons ---------- */
.btn-red {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--red), #a80400);
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(225, 6, 0, 0.3);
  font-family: var(--font-body);
}
.btn-red:active { transform: scale(0.98); }
.btn-block { width: 100%; }

/* ---------- app frame ---------- */
.app-view { min-height: 100dvh; display: flex; flex-direction: column; }
.app-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 18px 12px;
  background: rgba(7, 7, 8, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-title {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.5px; margin: 2px 0 0;
}
.head-right { text-align: right; }
.head-right .eyebrow-muted { margin-bottom: 6px; }
.head-row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.member-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
}
.member-badge.pro { background: rgba(225, 6, 0, 0.15); color: var(--red-soft); border-color: var(--red); }
.member-badge.trial { background: rgba(34, 197, 94, 0.12); color: #4ade80; border-color: #22c55e; }
/* trial-ended paywall */
.trial-paywall {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 8, 10, 0.96);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.trial-paywall[hidden] { display: none; }
.trial-paywall-card {
  max-width: 380px; width: 100%; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 26px;
}
.trial-paywall-card h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 34px;
  line-height: 1.05; margin: 10px 0 12px;
}
.trial-paywall-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 22px; }
.trial-paywall-card .btn-block { width: 100%; margin-bottom: 12px; }
/* trial paywall: concrete "what locks" list */
.trial-paywall-sub { margin-bottom: 10px !important; }
.trial-paywall-locks {
  list-style: none; margin: 0 0 16px; padding: 0; text-align: left;
}
.trial-paywall-locks li {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 2px; font-size: 14px; color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.trial-paywall-locks li:last-child { border-bottom: none; }
.trial-paywall-locks .lock-ico { font-size: 19px; line-height: 1; flex: none; }
.trial-paywall-locks b { font-weight: 700; }
.trial-paywall-note { font-size: 13px !important; margin-bottom: 18px !important; }
/* offline banner (offline.js) — subtle top banner, dark with red accent */
#uo-offline-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 3000; display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px);
  background: rgba(12, 12, 14, 0.97);
  border: 1px solid rgba(225, 6, 0, 0.55); border-top: none;
  border-radius: 0 0 14px 14px;
  color: #ececec; font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  padding: 9px 16px calc(9px + env(safe-area-inset-top, 0px));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
#uo-offline-banner[hidden] { display: none; }
.uo-offline-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #e10600; box-shadow: 0 0 8px rgba(225, 6, 0, 0.9);
}
.link-btn {
  background: none; border: none; color: var(--muted); font-size: 13px;
  text-decoration: underline; cursor: pointer; padding: 6px;
}
.logout-btn {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 6px 10px; border-radius: 999px;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  cursor: pointer;
}
.logout-btn:active { transform: scale(0.96); }
/* profile icon — account settings */
.profile-btn {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); color: var(--text);
  border: 1px solid var(--line); cursor: pointer; padding: 0;
}
.profile-btn svg { width: 16px; height: 16px; }
.profile-btn:active { transform: scale(0.94); border-color: var(--red); }
/* member merch shop */
.shop-btn {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 6px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--red), #a80400);
  color: #fff; border: 1px solid var(--red); cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 6, 0, 0.3);
  font-family: var(--font-body);
}
.shop-btn:active { transform: scale(0.96); }

.app-main {
  flex: 1;
  padding: 18px 16px calc(var(--tabbar-h) + 96px);
  position: relative;
  overflow: hidden;
}
.view { display: none; }
.view.on { display: block; animation: fadeUp 0.25s ease; }
.view.on.no-anim { animation: none; }
/* Direction-aware slide transitions for swipe navigation */
.view.on.slide-left { animation: slideInRight 0.28s cubic-bezier(0.32, 0.72, 0.35, 1); }
.view.on.slide-right { animation: slideInLeft 0.28s cubic-bezier(0.32, 0.72, 0.35, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0.4; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft { from { opacity: 0.4; transform: translateX(-48px); } to { opacity: 1; transform: none; } }

.page-head {
  font-family: var(--font-display); font-weight: 800; font-size: 40px;
  letter-spacing: 0.5px; line-height: 1; margin: 6px 0 16px;
}
.page-head span { color: var(--salmon); }

.section-title {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin: 22px 2px 10px; color: var(--text);
}

/* ---------- coach landing ---------- */
.coach-status {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 2px 12px;
}
.status-left { display: flex; align-items: center; gap: 8px; }
.ready { color: var(--muted); font-size: 13px; }

.hero-card {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #16161b 0%, #0e0e12 70%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px;
  min-height: 250px;
  display: flex;
}
.hero-text { position: relative; z-index: 1; max-width: 62%; }
.hero-head {
  font-family: var(--font-display); font-weight: 800;
  font-size: 44px; line-height: 0.98; letter-spacing: 0.5px;
  margin: 10px 0 12px; color: #fff;
}
.hero-head .salmon { color: var(--salmon); }
.hero-sub { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.hero-art {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 46%; max-width: 210px; opacity: 0.95; pointer-events: none;
}
.hero-art svg { width: 100%; height: auto; display: block; }

.feature-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 0 0 18px 18px; border-top: none;
  margin: -18px 6px 0; padding: 26px 6px 12px;
}
.feature-card { display: flex; gap: 8px; align-items: flex-start; padding: 0 10px; }
.feature-card + .feature-card { border-left: 1px solid var(--line); }
.feature-card b { color: var(--red-soft); font-size: 13px; font-weight: 800; }
.feature-card span {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px; line-height: 1.5;
  color: var(--muted);
}

.missions-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 2px 12px;
}
.missions-head h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.5px; margin: 0;
}
.missions-head .count {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.mission-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mission-card {
  position: relative; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 12px 34px; color: var(--text);
  font-family: var(--font-body); min-height: 148px;
}
.mission-card:active { transform: scale(0.97); border-color: var(--red); }
.mission-card b { color: var(--red-soft); font-size: 13px; font-weight: 800; display: block; margin-bottom: 8px; }
.mission-card .eyebrow-muted { font-size: 9.5px; margin-bottom: 6px; display: block; }
.m-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; display: block; }
.m-arrow {
  position: absolute; right: 12px; bottom: 10px;
  color: var(--red-soft); font-size: 18px; font-weight: 700;
}

.saved-thread {
  width: 100%; text-align: left; cursor: pointer; margin-top: 12px;
  background: linear-gradient(120deg, rgba(34, 197, 94, 0.10), rgba(34, 197, 94, 0.03));
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 16px; padding: 16px;
  color: var(--text); font-family: var(--font-body);
}
.saved-thread:active { transform: scale(0.99); }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saved-thread .eyebrow-red { margin-bottom: 6px; }
.saved-thread b { font-size: 16px; font-weight: 700; display: block; }
.saved-thread small { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.saved-thread .open { color: var(--red-soft); font-size: 13px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }

.disclaimer {
  color: var(--muted); font-size: 11.5px; text-align: center;
  margin: 18px 10px 0; line-height: 1.5;
}

.back-link {
  background: none; border: none; cursor: pointer; padding: 0 0 10px;
  color: var(--muted); font-size: 13px; font-weight: 600; font-family: var(--font-body);
}
.back-link:active { color: var(--red-soft); }

/* ---------- track (legacy placeholder styles removed; see track-styles.css) ---------- */
.activity-chips { display: none; }
.target-chips { display: flex; gap: 8px; margin: 0 0 14px; }
.chip {
  flex: 1; padding: 11px 0; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: 0.5px;
  font-family: var(--font-body);
}
.chip.on { background: rgba(225, 6, 0, 0.16); border-color: var(--red); color: #fff; }

/* (track stage / map placeholder / record button retired — see track-styles.css) */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.stat-card small {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: var(--muted); margin-bottom: 4px;
}
.stat-card b {
  font-family: var(--font-display); font-weight: 800; font-size: 32px;
  letter-spacing: 0.5px; line-height: 1;
}
.stat-card .unit { font-size: 15px; color: var(--muted); margin-left: 3px; }

.record-btn, .record-btn.recording { display: none; } /* retired — see .start-activity in track-styles.css */
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(225, 6, 0, 0.12); } }
.gps-status { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
.gps-status.live { color: var(--green); }

/* ---------- feed / cards ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.activity-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.activity-card .row-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.activity-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(225, 6, 0, 0.14); color: var(--red-soft);
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.activity-card h4 { margin: 0; font-size: 15px; font-weight: 700; }
.activity-card .date { margin-left: auto; color: var(--muted); font-size: 12px; }
.activity-stats { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.activity-stats b { color: var(--text); font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.empty-note { color: var(--muted); font-size: 14px; text-align: center; padding: 26px 10px; }

/* ---------- plans ---------- */
.plan-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
}
.plan-card.active { border-color: var(--red); }
.plan-card h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; }
.plan-card .meta { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 12px; }
.plan-card .plan-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
.plan-card .btn-red { width: 100%; }
.plan-day {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); background: transparent; cursor: pointer; padding: 0;
}
.check.done { background: var(--green); border-color: var(--green); }
.plan-day small { color: var(--muted); display: block; font-size: 12px; }

/* ---------- fasting ---------- */
.fast-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.fast-ring { width: 210px; height: 210px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--card-2); stroke-width: 12; }
.ring-fg {
  fill: none; stroke: var(--red); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 553; stroke-dashoffset: 553;
  transition: stroke-dashoffset 1s linear;
}
.fast-center { position: absolute; text-align: center; }
.fast-center b { font-family: var(--font-display); font-weight: 800; font-size: 42px; display: block; }
.fast-center small { color: var(--muted); font-size: 12px; }

/* ---------- coach chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 280px); min-height: 380px; }
.chat[hidden] { display: none; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.msg {
  max-width: 85%; padding: 11px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.5;
}
.msg.user { align-self: flex-end; background: rgba(225, 6, 0, 0.18); border: 1px solid rgba(225,6,0,.4); }
.msg.coach { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.msg.coach b { color: var(--red-soft); font-family: var(--font-display); letter-spacing: 1px; display: block; margin-bottom: 4px; font-size: 13px; }
.chat-typing { display: flex; gap: 6px; padding: 10px 4px; }
.chat-typing[hidden] { display: none; }
.chat-typing span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  animation: blink 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 0.25; } }
.chat-remaining { font-size: 12px; color: var(--muted); padding: 2px 4px 6px; min-height: 18px; }
.chat-bar { display: flex; gap: 8px; padding-top: 8px; }
.chat-bar input {
  flex: 1; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 16px; /* 16px+ prevents iOS auto-zoom on focus */ font-family: var(--font-body);
}
.chat-bar input:focus { outline: none; border-color: var(--red); }

.lock-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 30px 24px; text-align: left;
}
.lock-card .eyebrow-red { margin-bottom: 8px; }
.lock-card h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 40px;
  line-height: 1; letter-spacing: 0.5px; margin: 0 0 12px;
}
.lock-card p { color: var(--muted); font-size: 14px; margin: 0 0 20px; line-height: 1.55; }
.lock-card .btn-red { width: 100%; }

/* ---------- stats ---------- */
.stat-band {
  display: flex; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 10px; margin-bottom: 6px;
}
.stat-band > div { flex: 1; text-align: center; }
.stat-band > div + div { border-left: 1px solid var(--line); }
.stat-band b { font-family: var(--font-display); font-weight: 800; font-size: 34px; display: block; }
.stat-band .unit { font-size: 16px; color: var(--muted); }
.stat-band small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 2px; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 10px 4px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i {
  width: 100%; border-radius: 6px 6px 3px 3px; min-height: 4px;
  background: linear-gradient(180deg, var(--red), #a80400);
}
.bar small { color: var(--muted); font-size: 10px; font-weight: 700; }

/* ---------- join banner + tabbar ---------- */
.join-banner {
  position: fixed; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%);
  width: min(560px, 100%); z-index: 9;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: 16px;
  background: rgba(14, 14, 17, 0.97); border-top: 1px solid var(--red);
}
.join-banner[hidden] { display: none; }
.join-dismiss {
  position: absolute; top: 2px; left: 6px;
  background: none; border: none; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 12px 14px; cursor: pointer; /* 44px+ tap target */
}
.join-dismiss:active { color: #fff; }
.join-banner b { display: block; font-size: 13px; letter-spacing: 1px; }
.join-banner small { color: var(--muted); font-size: 12px; }

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(560px, 100%); height: var(--tabbar-h); z-index: 10;
  display: flex; gap: 2px;
  background: rgba(7, 7, 8, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  font-family: var(--font-body); border-radius: 14px; padding: 6px 0;
}
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { background: rgba(225, 6, 0, 0.18); color: var(--red-soft); }
.tab:active { transform: scale(0.96); }

/* ---------- nutrition lab ---------- */
.lab-eyebrow { margin-top: 26px; }
.lab-head {
  font-family: var(--font-display); font-weight: 800; font-size: 30px;
  letter-spacing: 0.5px; margin: 2px 0 12px;
}
.fw-card {
  background: linear-gradient(120deg, #16161b 0%, #0e0e12 70%);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; overflow: hidden;
}
.fw-card .eyebrow-red { margin-bottom: 4px; }
.fw-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fw-stat b {
  font-family: var(--font-display); font-weight: 800; font-size: 58px;
  line-height: 1; color: #fff; display: block;
}
.fw-stat span { color: var(--salmon); font-size: 17px; font-weight: 700; }
.fw-stat p { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; max-width: 190px; line-height: 1.5; }
.plate-svg { width: 128px; height: 128px; flex-shrink: 0; }
.fw-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  margin: 16px 0 4px;
}
.fw-legend span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fw-legend i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fw-strip {
  display: flex; margin: 16px -20px -20px; padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.fw-strip span {
  flex: 1; text-align: center; font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px; color: var(--muted);
}
.fw-strip span + span { border-left: 1px solid var(--line); }
.fw-strip b { color: var(--text); }

.fw-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; }
.fw-tab {
  padding: 13px 4px; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
  font-family: var(--font-body);
}
.fw-tab.on { background: #1c1c22; color: var(--red-soft); }
.fw-tab:active { transform: scale(0.97); }

.foundation-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.foundation-card {
  position: relative; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 12px 38px; color: var(--text);
  font-family: var(--font-body); min-height: 176px;
}
.foundation-card:active { transform: scale(0.97); border-color: var(--red); }
.foundation-card b { color: var(--red-soft); font-size: 13px; font-weight: 800; display: block; margin-bottom: 8px; }
.foundation-card .eyebrow-muted { font-size: 9.5px; margin-bottom: 6px; display: block; }
.f-title { font-size: 14px; font-weight: 700; line-height: 1.3; display: block; }
.foundation-card small { color: var(--muted); font-size: 11.5px; display: block; margin-top: 4px; line-height: 1.4; }
.f-load {
  position: absolute; right: 12px; bottom: 10px;
  color: var(--red-soft); font-size: 11px; font-weight: 800; letter-spacing: 1px;
}

.plate-builder {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-top: 16px;
}
.plate-builder .tfield { margin-bottom: 14px; }
.plate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.plate-grid .tfield { margin-bottom: 10px; }
.tfield select {
  width: 100%; padding: 13px 38px 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background-color: var(--bg); color: var(--text);
  font-size: 16px; font-weight: 600; font-family: var(--font-body);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e939c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.tfield select:focus { outline: none; border-color: var(--red); }
#plate-error { margin: 0 0 12px; }
.save-plate { display: flex; align-items: center; justify-content: center; gap: 8px; }
.save-plate span { font-size: 20px; font-weight: 700; line-height: 1; }
.save-plate:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.plate-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.plate-row .pi { flex: 1; min-width: 0; }
.plate-row .pi b { display: block; font-size: 14.5px; font-weight: 700; }
.plate-row .pi small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.plate-fw {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1px; color: var(--red-soft);
  border: 1px solid rgba(225,6,0,.4); border-radius: 999px; padding: 5px 9px; white-space: nowrap;
}
.empty-plates {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 34px 20px; text-align: center;
}
.empty-plates svg { width: 30px; height: 30px; stroke: var(--red-soft); margin-bottom: 10px; }
.empty-plates b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: 1.5px; margin-bottom: 6px;
}
.empty-plates p { color: var(--muted); font-size: 13px; margin: 0; }

.disclaimer-red {
  border: 1px solid rgba(225, 6, 0, 0.35); border-radius: 12px;
  background: rgba(225, 6, 0, 0.06); padding: 12px 14px;
  text-align: left; margin: 18px 0 0;
}

/* ---------- fasting: build your window ---------- */
.journey-card {
  background: linear-gradient(120deg, #101418 0%, #0b0e11 70%);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 18px 18px 8px; margin-bottom: 16px; overflow: hidden;
}
.journey-card .eyebrow-green { margin-bottom: 2px; }
.journey-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.journey-text h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  letter-spacing: 0.5px; margin: 0 0 4px;
}
.journey-text p { color: var(--muted); font-size: 12.5px; margin: 0; }
.journey-art { width: 46%; max-width: 190px; height: auto; flex-shrink: 0; }

.step-head {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: 1px; margin: 24px 2px 2px; display: flex; align-items: baseline; gap: 10px;
}
.step-head b { color: var(--red-soft); font-size: 20px; }
.step-sub { color: var(--muted); font-size: 12.5px; margin: 0 2px 12px; }
.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.preset-grid button {
  padding: 14px 4px 11px; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-family: var(--font-body);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.preset-grid button b { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.preset-grid button span { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); }
.preset-grid button.on {
  background: linear-gradient(135deg, var(--red), #a80400); border-color: var(--red);
  box-shadow: 0 6px 18px rgba(225, 6, 0, 0.35);
}
.preset-grid button.on span { color: rgba(255,255,255,.85); }
.preset-grid button:active { transform: scale(0.96); }

.ctx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctx-grid .tfield { margin-bottom: 0; }

.phase-list { margin: 18px 0 4px; display: flex; flex-direction: column; }
.phase-card { display: flex; gap: 14px; padding: 16px 4px; border-top: 1px solid var(--line); }
.phase-card:last-of-type { border-bottom: 1px solid var(--line); }
.phase-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--green); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.phase-card small {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 4px;
}
.phase-card b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 21px; letter-spacing: 1px; margin-bottom: 6px;
}
.phase-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.phase-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 2px 0; }

.ack-row {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.5;
  cursor: pointer;
}
.ack-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--red); flex-shrink: 0; }

.start-fast { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.start-fast span { font-size: 18px; }
.btn-red:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.fast-note { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0; }

#fast-active-wrap .fast-card { margin-bottom: 12px; }
#btn-fast-end { margin-bottom: 6px; }

.analytics-head {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.5px; margin: 2px 0 12px;
}
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.analytics-grid .stat-card small { font-size: 9.5px; }
.analytics-grid .stat-card b { font-size: 30px; }
.analytics-grid .stat-card span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

.fast-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 10px 4px 0; }
.fbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.fbar i {
  width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px; min-height: 4px;
  background: linear-gradient(180deg, #3a3a41, #232328);
  border: 1px solid var(--line);
}
.fbar small { color: var(--muted); font-size: 10px; font-weight: 700; }

/* ---------- meal plan (nutrition subscription subsection) ---------- */
.meal-subnav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 16px; }
.meal-sub-tab {
  padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted);
  font-weight: 800; font-size: 13px; letter-spacing: 1px; cursor: pointer;
  font-family: var(--font-body);
}
.meal-sub-tab.on { background: rgba(225, 6, 0, 0.16); color: var(--red-soft); border-color: var(--red); }
.meal-sub-tab:active { transform: scale(0.97); }

.np-week { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 14px; }
.np-week b { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: 1px; }
.np-week span { color: var(--muted); font-size: 12px; text-align: right; }

.np-day { margin-bottom: 16px; }
.np-day-label {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--red-soft);
  margin: 0 2px 8px; text-transform: uppercase;
}
.np-meal {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 8px;
}
.np-meal-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.np-meal h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.np-kcal { color: var(--red-soft); font-weight: 800; font-size: 13px; white-space: nowrap; }
.np-macros { display: flex; gap: 12px; color: var(--muted); font-size: 12px; margin: 7px 0 2px; flex-wrap: wrap; }
.np-macros b { color: var(--text); font-weight: 700; }
.np-meal details { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.np-meal summary {
  cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.5px; padding: 6px 0; list-style: none;
}
.np-meal summary::-webkit-details-marker { display: none; }
.np-meal summary::before { content: "+ "; color: var(--red-soft); font-weight: 800; }
.np-meal details[open] summary::before { content: "– "; }
.np-ing { margin: 6px 0 4px; padding-left: 18px; font-size: 13.5px; }
.np-ing li { margin: 3px 0; }
.np-steps { margin: 8px 0 2px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.np-steps li { margin: 5px 0; line-height: 1.55; }

.grocery-cat { margin-bottom: 14px; }
.grocery-cat > h5 {
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  letter-spacing: 1.5px; margin: 0 2px 4px; text-transform: uppercase; color: var(--text);
}
.grocery-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 2px; border-top: 1px solid var(--line);
  font-size: 14px; cursor: pointer; min-height: 44px;
}
.grocery-item input { width: 19px; height: 19px; accent-color: var(--red); flex-shrink: 0; cursor: pointer; }
.grocery-item.done span { text-decoration: line-through; color: var(--muted); }

.np-gen { margin: 18px 0 4px; }
.np-hint { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.np-empty { text-align: center; padding: 26px 10px; }
.np-empty .btn-red { margin-top: 14px; }

/* ---------- coach notifications ---------- */
.notif-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px; margin: 12px 0 20px;
}
.notif-blurb { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.notif-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.notif-toggle input { display: none; }
.toggle-ui {
  width: 44px; height: 24px; border-radius: 12px; background: #333;
  position: relative; flex-shrink: 0; transition: background .2s;
}
.toggle-ui::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: left .2s;
}
.notif-toggle input:checked + .toggle-ui { background: var(--red); }
.notif-toggle input:checked + .toggle-ui::after { left: 22px; }
.toggle-label b { display: block; font-size: 14px; }
.toggle-label small { color: var(--muted); font-size: 12px; }
.notif-phone { margin-top: 6px; display: grid; gap: 10px; }
.notif-phone[hidden] { display: none; }
.notif-status { font-size: 13px; margin: 10px 0 0; }
.notif-status.ok { color: var(--green); }
.notif-status.err { color: #ff8a80; }

/* ============ NATIVE APP FEEL (2026-10-05) ============ */

/* Safe-area top: notch / Dynamic Island clearance for the app header */
.app-header, .topbar, header.app-top {
  padding-top: max(12px, env(safe-area-inset-top));
}
/* Bottom CTAs clear the home indicator */
.bottom-cta, .sticky-cta, .workout-controls {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Pull-to-refresh guard: active workout screen never triggers browser refresh */
.no-pull-refresh {
  overscroll-behavior-y: contain;
}

/* Loading skeletons: shimmer placeholders while tabs fetch */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #161618;
  border-radius: 12px;
  min-height: 64px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: uo-shimmer 1.4s infinite;
}
@keyframes uo-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-line { height: 14px; border-radius: 7px; margin: 8px 0; }
.skeleton-card { height: 96px; margin: 0 0 12px; }

/* Install banner: "Add to Home Screen" prompt */
#uo-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 12px;
  background: #141416;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#uo-install-banner.show { display: flex; }
#uo-install-banner .ib-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
}
#uo-install-banner .ib-text { flex: 1; }
#uo-install-banner .ib-text b { display: block; font-size: 14px; color: #fff; }
#uo-install-banner .ib-text span { font-size: 12px; color: var(--muted); }
#uo-install-banner .ib-install {
  background: var(--red); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; font-weight: 800; font-size: 13px; white-space: nowrap;
}
#uo-install-banner .ib-close {
  background: none; border: none; color: var(--muted); font-size: 18px;
  padding: 4px 8px; line-height: 1;
}
#uo-install-ios-hint {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 9999;
  display: none;
  background: #141416;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#uo-install-ios-hint.show { display: block; }
#uo-install-ios-hint b { color: #fff; }
#uo-install-ios-hint .ib-close {
  float: right; background: none; border: none; color: var(--muted); font-size: 18px;
}

/* ---------- boot splash (hides auth flash for returning users) ---------- */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(560px 300px at 50% -60px, rgba(225, 6, 0, 0.16), transparent),
    #0a0a0a;
  transition: opacity 0.3s ease;
}
#boot-splash.done { opacity: 0; pointer-events: none; }
#boot-splash .splash-bolt {
  width: 56px; height: 56px;
  animation: splash-pulse 1.2s ease-in-out infinite;
}
#boot-splash .splash-word {
  font-size: 13px; letter-spacing: 4px; font-weight: 700; color: #fff;
}
#boot-splash .splash-word span { color: #e10600; }
#boot-splash .splash-bar {
  width: 120px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
#boot-splash .splash-bar i {
  display: block; height: 100%; width: 40%; border-radius: 2px;
  background: #e10600;
  animation: splash-slide 1s ease-in-out infinite;
}
@keyframes splash-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.94); } }
@keyframes splash-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* Visually-hidden file inputs: display:none breaks the picker on iOS Safari
   and some Android WebViews. This keeps them functional but invisible. */
.vh-file {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

/* Boot error banner — persistent, with retry. */
#uo-boot-error {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #3a0a08; border-bottom: 1px solid #e10600;
  color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.ube-retry {
  background: #e10600; color: #fff; border: none; border-radius: 999px;
  font-size: 13px; font-weight: 800; padding: 8px 18px; cursor: pointer;
  min-height: 44px;
}
.ube-retry:disabled { opacity: .6; }
.ube-retry:active { transform: scale(.96); }

/* Visible keyboard focus everywhere. */
:focus-visible { outline: 2px solid var(--red, #e10600); outline-offset: 2px; }

/* Header actions wrap instead of colliding on narrow phones. */
@media (max-width: 380px) {
  .head-row { flex-wrap: wrap; row-gap: 6px; }
  .app-head { align-items: flex-start; }
}

/* ===== track-styles.css ===== */

/* ---------- staggered entrance (tasteful, CSS only) ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.view.on .rise { animation: riseIn 0.5s cubic-bezier(0.2, 0.7, 0.25, 1) both; }
.view.on .d1 { animation-delay: 0.05s; }
.view.on .d2 { animation-delay: 0.1s; }
.view.on .d3 { animation-delay: 0.16s; }
.view.on .d4 { animation-delay: 0.22s; }
.view.on .d5 { animation-delay: 0.28s; }
.view.on .d6 { animation-delay: 0.34s; }
.view.on .d7 { animation-delay: 0.4s; }
.view.on .d8 { animation-delay: 0.46s; }
@media (prefers-reduced-motion: reduce) {
  .view.on .rise { animation: none; }
  .route-dots { animation: none !important; }
  .pin-glow { animation: none !important; }
}

/* ---------- coach quick-ask bar ---------- */
.quick-ask {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 8px 8px 8px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.quick-ask input {
  flex: 1; min-width: 0; background: none; border: none;
  color: var(--text); font-size: 15px; font-family: var(--font-body);
}
.quick-ask input:focus { outline: none; }
.quick-ask input::placeholder { color: var(--muted); }
.quick-send {
  width: 46px; height: 46px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--red), #a80400);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(225, 6, 0, 0.35);
}
.quick-send:active { transform: scale(0.94); }
.quick-send svg { width: 22px; height: 22px; stroke: #fff; }

/* ---------- track: hero ---------- */
.track-hero-head {
  font-family: var(--font-display); font-weight: 800;
  font-size: 46px; line-height: 0.98; letter-spacing: 0.5px;
  margin: 4px 2px 10px; color: #fff;
}
.track-hero-head span { color: var(--salmon); }
.track-hero-sub {
  color: var(--muted); font-size: 14px; line-height: 1.55;
  margin: 0 2px 18px; max-width: 420px;
}

/* ---------- track: 7-day output card ---------- */
.output-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 20px 20px 8px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.028) 0 2px, transparent 2px 15px),
    linear-gradient(120deg, #15151a 0%, #0b0b0f 70%);
}
.output-card .eyebrow-red { margin-bottom: 6px; }
.output-stat { display: flex; align-items: baseline; gap: 8px; }
.output-stat b {
  font-family: var(--font-display); font-weight: 800;
  font-size: 64px; line-height: 1; letter-spacing: 0.5px; color: #fff;
}
.output-stat span {
  font-size: 15px; font-weight: 800; letter-spacing: 1px; color: var(--muted);
}
.output-sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.route-art { display: block; width: 100%; height: auto; margin-top: 2px; }
.route-reveal { transform-box: fill-box; transform-origin: left center; }
.route-art:not(.draw) .route-reveal { transform: scaleX(0); }
.route-art.draw .route-reveal {
  transform: scaleX(1);
  transition: transform 1.15s cubic-bezier(0.45, 0, 0.2, 1) 0.2s;
}
.route-dots { animation: dotFlow 2.8s linear infinite; }
@keyframes dotFlow { to { stroke-dashoffset: -10.5; } }
.pin-glow {
  transform-box: fill-box; transform-origin: center;
  animation: pinPulse 2.2s ease-in-out infinite;
}
@keyframes pinPulse { 50% { transform: scale(1.4); opacity: 0.5; } }

.output-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 4px; margin: 2px 0 4px;
  border-bottom: 1px solid var(--line);
}
.output-strip p { margin: 0; }
.output-strip span { color: var(--muted); font-size: 12px; }

/* ---------- track: activity selector ---------- */
.act-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 14px 0;
}
.act-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 6px 13px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  color: var(--muted); font-family: var(--font-body);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.act-card:active { transform: scale(0.95); }
.act-card svg {
  width: 24px; height: 24px; fill: none;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.act-card span { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
.act-card.on {
  border-color: var(--green); color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 0 22px rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.06);
}

/* ---------- track: name + goal fields ---------- */
.track-fields { display: flex; gap: 10px; margin-bottom: 12px; }
.tfield { flex: 1; min-width: 0; }
.tfield.goal { flex: 0 0 108px; }
.tfield label {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px;
  color: var(--muted); margin: 0 2px 7px;
}
.tfield input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; font-weight: 600; font-family: var(--font-body);
}
.tfield input:focus { outline: none; border-color: var(--red); }

/* ---------- track: start button ---------- */
.start-activity {
  width: 100%; display: flex; align-items: center; gap: 15px;
  padding: 15px 18px; border: none; border-radius: 18px; cursor: pointer;
  background: linear-gradient(135deg, #f1261f, #b30400);
  color: #fff; text-align: left; font-family: var(--font-body);
  box-shadow: 0 10px 30px rgba(225, 6, 0, 0.35);
  transition: transform 0.12s ease;
}
.start-activity:active { transform: scale(0.985); }
.sa-icon {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18);
  display: flex; align-items: center; justify-content: center;
}
.sa-icon svg {
  width: 24px; height: 24px; fill: none;
  stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sa-text b { display: block; font-size: 17px; font-weight: 800; letter-spacing: 0.2px; }
.sa-text small { color: rgba(255, 255, 255, 0.78); font-size: 12px; }
.start-activity.recording {
  background: linear-gradient(135deg, #1b1b20, #2b2b32);
  border: 2px solid var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
.gps-note {
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--muted); font-size: 12px; line-height: 1.5;
  margin: 12px 2px 0;
}
.gps-note svg {
  width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.live-stats { margin-top: 14px; }

/* ---------- track: sensor hub ---------- */
.section-title.eyebrow-green { color: var(--green); }
.sensor-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 6px;
}
.hr-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.hr-readout {
  width: 86px; height: 86px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--green); background: rgba(34, 197, 94, 0.07);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hr-readout b {
  font-family: var(--font-display); font-weight: 800; font-size: 32px;
  color: var(--green); line-height: 1;
}
.hr-readout small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 2px; }
.hr-info b { font-size: 15px; font-weight: 700; display: block; margin-bottom: 4px; }
.hr-status { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
.sensor-card .btn-red:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- saved-plate delete button ---------- */
.meal-del {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 14px; cursor: pointer;
}
.meal-del:active { transform: scale(0.92); color: var(--red-soft); border-color: var(--red); }

/* ---------- sensor hub: rows + import ---------- */
.sensor-title {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  letter-spacing: 0.5px; margin: 0 0 4px;
}
.sensor-title svg { width: 22px; height: 22px; stroke: var(--red-soft); flex-shrink: 0; }
.sensor-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.sensor-row-text { flex: 1; }
.badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1px;
  padding: 5px 8px; border-radius: 7px; flex-shrink: 0; margin-top: 1px;
}
.badge-live { background: rgba(34, 197, 94, 0.14); color: var(--green); border: 1px solid rgba(34,197,94,.35); }
.badge-file { background: rgba(142, 147, 156, 0.12); color: var(--muted); border: 1px solid var(--line); }
.sensor-row-text b { font-size: 14.5px; font-weight: 700; display: block; margin-bottom: 3px; }
.sensor-row-text p { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
.sensor-card .hr-row { margin: 12px 0; }
.import-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 4px; }
.import-row .tfield { flex: 1; margin-bottom: 0; }
.import-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  background: transparent; border: 1.5px solid var(--green); color: var(--green);
  font-weight: 800; font-size: 13px; letter-spacing: 0.5px; font-family: var(--font-body);
}
.import-btn:active { transform: scale(0.97); background: rgba(34, 197, 94, 0.08); }
.import-btn svg { width: 16px; height: 16px; }
.import-status { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.5; }

.empty-activities {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 36px 20px; text-align: center;
}
.empty-activities svg { width: 30px; height: 30px; stroke: var(--red-soft); margin-bottom: 10px; }
.empty-activities b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: 1.5px; margin-bottom: 6px;
}
.empty-activities p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- plans v2: training HQ ---------- */
.plans-sub {
  color: var(--muted); font-size: 14px; line-height: 1.55;
  margin: -8px 2px 16px; max-width: 34ch;
}

.plan-block-card {
  background: linear-gradient(120deg, #16161b 0%, #0e0e12 70%);
  border: 1px solid var(--line); border-radius: 22px;
  overflow: hidden; margin-bottom: 14px;
}
.plan-block-top { display: flex; gap: 8px; padding: 20px 20px 6px; align-items: center; }
.plan-block-text { flex: 1; min-width: 0; }
.plan-block-text .eyebrow-green { margin: 0 0 6px; }
.plan-block-text h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.5px; margin: 0 0 8px; color: #fff; line-height: 1.05;
}
.plan-block-text p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.run-art { width: 132px; height: 110px; flex-shrink: 0; }

.plan-stats {
  display: flex; margin-top: 14px;
  border-top: 1px solid var(--line);
}
.plan-stats > div {
  flex: 1; padding: 14px 18px;
  border-left: 1px solid var(--line);
}
.plan-stats > div:first-child { border-left: none; }
.plan-stats b {
  display: block; font-family: var(--font-display);
  font-size: 30px; font-weight: 800; line-height: 1;
}
.plan-stats small {
  display: block; color: var(--muted); font-size: 10px;
  font-weight: 800; letter-spacing: 1.8px; margin-top: 4px;
}
.stats-hint {
  margin: 0; padding: 10px 18px 14px;
  color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
}

.plan-inputs {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 18px 18px; margin-bottom: 6px;
}
.plan-inputs .eyebrow-green { margin: 0 0 6px; }
.plan-inputs > h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.5px; margin: 0 0 14px; color: #fff;
}
.plan-inputs .plate-grid { margin-bottom: 12px; }
.plan-inputs .tfield { margin-bottom: 12px; }
.plan-inputs .plate-grid .tfield { margin-bottom: 0; }

.freq-card {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 14px; background: var(--bg);
}
.freq-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.freq-head span {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px; color: var(--muted);
}
.freq-head b { font-size: 12px; font-weight: 800; letter-spacing: 0.5px; color: var(--text); }
.freq-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.freq-day {
  padding: 13px 0; /* 44px+ tap target */ border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.freq-day.on {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 3px 12px rgba(225, 6, 0, 0.35);
}
.freq-day:active { transform: scale(0.95); }

.build-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; font-size: 16px; font-weight: 800;
  border-radius: 14px;
}
.build-plan span { font-size: 20px; }
.build-plan:disabled { opacity: 0.55; cursor: wait; }

.plan-note {
  margin: 10px 2px 0; color: var(--red-soft);
  font-size: 13px; line-height: 1.5;
}

.preview-card { border-color: var(--red); }
.preview-card .eyebrow-red { margin: 0 0 6px; }
.join-cta { margin-top: 14px; }
.preview-note {
  text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0;
}

/* expandable saved plans */
.plan-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: none; border: none; cursor: pointer; padding: 0;
  color: var(--text); text-align: left; font-family: inherit;
}
.plan-head h3 { flex: 1; }
.plan-head .meta { display: block; }
.plan-caret {
  font-size: 18px; color: var(--muted); flex-shrink: 0;
  transition: transform 0.2s ease;
}
.plan-card.open .plan-caret { transform: rotate(180deg); }
.plan-days { display: none; margin-top: 6px; }
.plan-card.open .plan-days { display: block; animation: fadeUp 0.22s ease; }

/* live GPS map */
.live-map-wrap {
  margin: 12px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.live-map {
  height: 280px;
  width: 100%;
  background: #0a0a0c;
  z-index: 1;
}
.live-map .leaflet-container { font-family: inherit; }
.gps-permission-help {
  margin: 12px 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(225,6,0,0.08);
  border: 1px solid rgba(225,6,0,0.25);
  font-size: 14px;
  line-height: 1.5;
}
.gps-permission-help b { display: block; margin-bottom: 6px; }
.gps-permission-help ol { margin: 8px 0 0 18px; padding: 0; }
.gps-permission-help li { margin-bottom: 4px; }

/* sensor hub — device picker (Pro) */
.pro-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  background: #e10600; color: #fff; border-radius: 4px; padding: 2px 7px;
  vertical-align: middle; margin-left: 6px;
}
.sensor-lock { text-align: center; padding: 8px 4px 4px; }
.sensor-lock p { margin: 6px 0; font-size: 14px; color: var(--muted); }
.sensor-lock p b { color: var(--text); }
.sensor-step-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted);
  margin: 14px 0 8px;
}
.device-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px;
}
.device-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.1);
  color: var(--text); font-family: inherit; transition: border-color 0.15s, background 0.15s;
}
.device-card .dc-icon { font-size: 26px; }
.device-card span:nth-child(2) { font-weight: 700; font-size: 14px; }
.device-card small { color: var(--muted); font-size: 11px; }
.device-card.on { border-color: #e10600; background: rgba(225,6,0,0.1); }
.device-guide {
  margin: 10px 0; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 14px; line-height: 1.55;
}
.device-guide b.g-title { display: block; font-size: 15px; margin-bottom: 6px; }
.device-guide ol { margin: 8px 0 4px 18px; padding: 0; }
.device-guide li { margin-bottom: 5px; }
.device-guide .g-note {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
  font-size: 13px;
}

.map-preview-label {
  position: absolute; top: 10px; left: 10px; z-index: 500;
  background: rgba(7,7,8,0.75); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; padding: 5px 10px; border-radius: 20px;
  pointer-events: none; text-transform: uppercase;
}
.live-map-wrap { position: relative; }

/* ============ sports-tracker reskin ============ */
.track-mini-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: 3px; color: var(--muted);
  margin: 6px 2px 12px;
}
.gps-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 9px var(--green); flex-shrink: 0;
}

/* compact activity chips */
#activity-chips .act-card { padding: 12px 6px 10px; }
#activity-chips .act-card svg { width: 22px; height: 22px; }

/* big circular start button */
.start-circle-wrap { display: flex; justify-content: center; margin: 22px 0 18px; }
.start-circle {
  width: 188px; height: 188px; border-radius: 50%; cursor: pointer;
  border: 7px solid rgba(34, 197, 94, 0.28);
  background: radial-gradient(circle at 35% 28%, #3bf07f 0%, #1db954 55%, #148a3e 100%);
  color: #052b14;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--font-display);
  box-shadow: 0 0 48px rgba(34, 197, 94, 0.35), inset 0 2px 12px rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease;
}
.start-circle:active { transform: scale(0.955); }
.start-circle b { font-size: 36px; font-weight: 800; letter-spacing: 2px; line-height: 1; }
.start-circle small { font-size: 15px; font-weight: 800; letter-spacing: 5px; }

/* active workout */
#track-active { text-align: center; padding-top: 4px; }
.ta-type { font-size: 12px; font-weight: 800; letter-spacing: 3px; color: var(--muted); margin: 0 0 2px; }
.ta-timer {
  font-family: var(--font-display); font-weight: 800;
  font-size: 88px; line-height: 1; letter-spacing: 1px; color: #fff;
  font-variant-numeric: tabular-nums;
}
.ta-timer-sub { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.ta-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.ta-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 8px;
}
.ta-stat b { display: block; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ta-stat b .unit { font-size: 14px; color: var(--muted); font-weight: 600; }
.ta-stat small { color: var(--green); font-size: 11px; font-weight: 700; }
.ta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.ta-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px; border-radius: 14px; cursor: pointer;
  background: #1c1c21; border: 1px solid var(--line); color: var(--text);
  font-size: 15px; font-weight: 800; font-family: var(--font-body);
}
.ta-btn svg { width: 18px; height: 18px; }
.ta-btn:active { transform: scale(0.97); }
.ta-btn.ta-stop { background: linear-gradient(135deg, #f1261f, #b30400); border: none; color: #fff; }

/* lifetime stats grid */
.tracker-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 16px 0 18px;
}
.tstat { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tstat:nth-child(odd) { border-right: 1px solid var(--line); }
.tstat:nth-child(3), .tstat:nth-child(4) { border-bottom: none; }
.tstat b { display: block; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tstat small { color: var(--muted); font-size: 12px; }

/* completed summary */
.done-panel {
  background: linear-gradient(120deg, #16161b 0%, #0e0e12 70%);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 20px 18px; margin: 4px 0 14px;
}
.done-panel h3 {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  margin: 2px 0 14px; color: #fff;
}
.done-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; margin-bottom: 16px; }
.done-stat b { display: block; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.done-stat small { color: var(--green); font-size: 11px; font-weight: 700; }
.done-splits-head {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--muted);
  margin: 0 0 6px; display: flex; justify-content: space-between;
}
.done-splits { margin-bottom: 14px; }
.done-split {
  display: flex; justify-content: space-between; padding: 9px 2px;
  border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums;
}
.done-split span:first-child { color: var(--muted); }
.done-panel .btn-block { margin-top: 2px; }

/* ===== meals-scan.css ===== */
/* ---- Food barcode scanner (Meals tab) ---- */

/* ---- Food scanner: subtle single-row entry ---- */
.fscan-mini {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px; margin: 0 0 14px;
  cursor: pointer; color: #fff;
}
.fscan-mini:active { transform: scale(.98); }
.fscan-mini svg { width: 24px; height: 24px; color: var(--muted); flex-shrink: 0; }
.fscan-mini span { flex: 1; }
.fscan-mini span b { display: block; font-size: 14px; font-weight: 700; }
.fscan-mini span small { color: var(--muted); font-size: 12px; }
.fscan-mini em {
  font-style: normal; font-size: 13px; font-weight: 700;
  color: var(--red-soft, #ff6b62);
  border: 1px solid rgba(225,6,0,.4); border-radius: 20px;
  padding: 6px 14px; flex-shrink: 0;
}

/* modal */
.scan-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.scan-modal[hidden] { display: none; }
.scan-box {
  position: relative; width: min(480px, 100%); max-height: 92vh; overflow-y: auto;
  background: #101013; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 18px 18px;
}
.scan-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: var(--muted);
  font-size: 30px; line-height: 1; cursor: pointer; padding: 6px;
}
.scan-close:active { color: #fff; }

/* viewfinder */
.scan-viewfinder { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.scan-viewfinder video { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.scan-frame { position: absolute; inset: 0; pointer-events: none; }
.scan-frame .corner { position: absolute; width: 28px; height: 28px; border: 3px solid var(--red); }
.scan-frame .tl { top: 18%; left: 12%; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.scan-frame .tr { top: 18%; right: 12%; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.scan-frame .bl { bottom: 18%; left: 12%; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.scan-frame .br { bottom: 18%; right: 12%; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
.scan-line {
  position: absolute; left: 12%; right: 12%; top: 18%; height: 2px;
  background: var(--red); box-shadow: 0 0 12px var(--red);
  animation: scanSweep 2.2s ease-in-out infinite;
}
@keyframes scanSweep {
  0%, 100% { top: 18%; } 50% { top: calc(82% - 2px); }
}
.scan-status {
  position: absolute; bottom: 0; left: 0; right: 0;
  margin: 0; padding: 10px; text-align: center;
  font-size: 13px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}

/* manual entry */
.scan-manual { margin-top: 16px; }
.scan-manual label { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.scan-manual-row { display: flex; gap: 8px; margin-top: 6px; }
.scan-manual-row input {
  flex: 1; background: #0a0a0c; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; color: #fff; font-size: 16px;
}

/* result card */
.scan-result-box { padding-top: 18px; }
.scan-product-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.scan-product-head img {
  width: 76px; height: 76px; object-fit: contain;
  background: #fff; border-radius: 12px; flex-shrink: 0;
}
.scan-product-head h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.scan-product-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.scan-grade-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.scan-grade {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: #fff;
}
.scan-grade.gA { background: #22c55e; } .scan-grade.gB { background: #84cc16; }
.scan-grade.gC { background: #eab308; } .scan-grade.gD { background: #f97316; }
.scan-grade.gE { background: #e10600; } .scan-grade.gX { background: #444; }
.scan-grade-label { font-size: 13px; color: var(--muted); }
.scan-grade-label b { color: #fff; display: block; font-size: 14px; }

.scan-nutri-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px;
}
.scan-nutri { background: #0a0a0c; border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; }
.scan-nutri b { display: block; font-size: 15px; }
.scan-nutri small { color: var(--muted); font-size: 10px; letter-spacing: .06em; }

.scan-nova {
  display: flex; align-items: center; gap: 10px;
  background: #0a0a0c; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 13px;
}
.scan-nova .nova-dots { display: flex; gap: 4px; }
.scan-nova .nova-dots i { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.scan-nova .nova-dots i.on { background: var(--red); }

.scan-flags { margin-bottom: 12px; }
.scan-flag {
  display: inline-block; font-size: 12px; font-weight: 700;
  background: rgba(225,6,0,.14); color: #ff8a80;
  border: 1px solid rgba(225,6,0,.4); border-radius: 20px;
  padding: 5px 12px; margin: 0 6px 6px 0;
}

.scan-verdict {
  border-left: 3px solid var(--red); padding: 10px 14px; margin-bottom: 16px;
  background: rgba(225,6,0,.06); border-radius: 0 10px 10px 0;
}
.scan-verdict .eyebrow-red { margin-bottom: 4px; }
.scan-verdict p { margin: 0; font-size: 15px; font-weight: 600; }

.scan-actions { display: flex; flex-direction: column; gap: 8px; }
.scan-log-ok {
  text-align: center; color: #22c55e; font-weight: 700;
  padding: 12px; font-size: 14px;
}
.scan-error { text-align: center; padding: 20px 10px; }
.scan-error p { color: var(--muted); margin: 10px 0 16px; font-size: 14px; }

/* ---- Scanner about bubble ---- */
.fscan-row { display: flex; gap: 10px; align-items: stretch; margin: 0 0 14px; }
.fscan-row .fscan-mini { margin: 0; flex: 1; min-width: 0; }
.scan-info-btn {
  flex: 0 0 48px; width: 48px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  color: var(--muted); font-size: 22px; font-weight: 700; font-style: italic;
  font-family: Georgia, 'Times New Roman', serif; line-height: 1; padding: 0;
}
.scan-info-btn:active { transform: scale(.94); color: #fff; border-color: var(--red); }
.scan-about-title { color: #fff; font-size: 20px; font-weight: 800; margin: 6px 0 12px; letter-spacing: -.3px; }
.scan-about-body p { color: #d7d7dc; font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.scan-about-body p b { color: #fff; }
.scan-about-note { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px !important; color: var(--muted) !important; }

/* ===== feat-a.css ===== */
/* ============================================================================
   feat-a.css — GROUP A (Training features) styles.
   Dark theme, brand red #e10600. Include in the Stats tab styles.
   All selectors scoped to feat-a IDs/classes or prefixed pr-/streak-/onerm-.
   ============================================================================ */

/* ---------- PR board ---------- */
.pr-board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr-type {
  background: var(--card, #121217);
  border: 1px solid var(--line, #23232a);
  border-radius: 14px;
  padding: 12px;
}
.pr-type h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--red-soft, #ff4d45);
}
.pr-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 6px 0; border-top: 1px solid var(--line, #23232a);
}
.pr-row small { color: var(--muted, #9a9aa3); font-size: 11px; line-height: 1.3; }
.pr-row b { font-size: 14px; white-space: nowrap; }
.pr-row .pr-date { display: block; color: var(--muted, #9a9aa3); font-size: 10px; font-weight: 400; }
.pr-type .pr-empty { color: var(--muted, #9a9aa3); font-size: 13px; margin: 4px 0 8px; }
.pr-type h3 .pr-trophy { margin-right: 6px; }

/* ---------- NEW PR celebration banner ---------- */
.pr-celebrate {
  background: linear-gradient(135deg, #2a0d0b, #121217);
  border: 1px solid #e10600;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: center;
  animation: prPulse 1.6s ease-in-out infinite;
}
.pr-celebrate b { color: #fff; font-size: 17px; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.pr-celebrate p { margin: 0; font-size: 14px; color: var(--muted, #9a9aa3); }
.pr-celebrate p b { display: inline; font-size: 14px; color: var(--red-soft, #ff4d45); }
@keyframes prPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, .35); }
  50% { box-shadow: 0 0 18px 4px rgba(225, 6, 0, .35); }
}

/* ---------- Streaks ---------- */
.streak-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.streak-card {
  background: var(--card, #121217);
  border: 1px solid var(--line, #23232a);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.streak-flame { font-size: 22px; margin-bottom: 6px; }
.streak-card b { display: block; font-size: 30px; font-weight: 800; color: var(--red-soft, #ff4d45); }
.streak-card small { color: var(--muted, #9a9aa3); font-size: 10px; line-height: 1.5; letter-spacing: .4px; }

/* ---------- 1RM calculator ---------- */
.onerm-card {
  background: var(--card, #121217);
  border: 1px solid var(--line, #23232a);
  border-radius: 14px;
  padding: 14px;
}
.onerm-sub { color: var(--muted, #9a9aa3); font-size: 13px; margin: 0 0 12px; }
.onerm-inputs { display: flex; gap: 10px; align-items: flex-end; }
.onerm-inputs label {
  flex: 1; font-size: 11px; color: var(--muted, #9a9aa3);
  text-transform: uppercase; letter-spacing: .5px;
}
.onerm-inputs input {
  display: block; width: 100%; margin-top: 6px;
  background: var(--card-2, #17171c); color: var(--text, #fff);
  border: 1px solid var(--line, #23232a); border-radius: 10px;
  padding: 10px 12px; font-size: 16px;
}
.onerm-inputs input:focus { outline: none; border-color: #e10600; }
.onerm-inputs .btn-red { flex: 1; padding: 11px 8px; }
.onerm-error { color: var(--red-soft, #ff4d45); font-size: 13px; margin: 10px 0 0; }
.onerm-max { margin: 14px 0 10px; font-size: 13px; letter-spacing: 1px; color: var(--muted, #9a9aa3); }
.onerm-max b { display: block; font-size: 34px; color: #fff; letter-spacing: 0; margin-top: 2px; }
.onerm-table { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.onerm-row { display: grid; grid-template-columns: 44px 1fr 52px; gap: 8px; align-items: center; font-size: 12px; }
.onerm-row .pct { color: var(--muted, #9a9aa3); }
.onerm-row .bar { height: 8px; background: var(--card-2, #17171c); border-radius: 4px; overflow: hidden; }
.onerm-row .bar i { display: block; height: 100%; background: #e10600; border-radius: 4px; }
.onerm-row .wt { text-align: right; font-weight: 700; }
.onerm-row.goal .bar i { background: #fff; }

@media (max-width: 420px) {
  .pr-board { grid-template-columns: 1fr; }
  .streak-board { grid-template-columns: repeat(3, 1fr); }
}

/* ===== feat-b.css ===== */
/* feat-b.css — GROUP B: Health tab styles.
   Dark theme, brand red #e10600. All selectors scoped with featB- prefix.
   Load AFTER styles.css / track-styles.css. */
.featB-trial-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.featB-trial-hint b { color: var(--text); }

.featB-card {
  background: var(--card, #141414);
  border: 1px solid var(--border, #262626);
  border-radius: 14px;
  padding: 16px 14px;
  margin: 0 0 16px;
}
.featB-card .section-title { margin-top: 0; }
.featB-sub {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
}

/* forms */
.featB-form .featB-row { display: flex; gap: 10px; margin-bottom: 10px; }
.featB-form .featB-row label { flex: 1; font-size: 12px; color: var(--muted); display: block; }
.featB-card input[type="text"], .featB-card input[type="number"],
.featB-card input[type="date"], .featB-card input[type="time"],
.featB-card select {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #2c2c2c);
  background: #1e1e1e;
  color: var(--text, #f5f5f5);
  font-size: 15px;
  box-sizing: border-box;
  color-scheme: dark;
}
.featB-card input:focus, .featB-card select:focus { outline: none; border-color: #e10600; }

/* water */
.featB-water-wrap { display: flex; flex-direction: column; align-items: center; }
.featB-ring { width: 168px; height: 168px; transform: rotate(-90deg); }
.featB-ring-bg { fill: none; stroke: #2a2a2a; stroke-width: 11; }
.featB-ring-fg {
  fill: none; stroke: #e10600; stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 339.292; stroke-dashoffset: 339.292;
  transition: stroke-dashoffset .45s ease;
}
.featB-ring-num { font-size: 26px; font-weight: 800; fill: var(--text, #f5f5f5); transform: rotate(90deg); transform-origin: center; }
.featB-ring-label { font-size: 12px; fill: var(--muted, #999); transform: rotate(90deg); transform-origin: center; }
.featB-togo { margin: 10px 0 12px; font-size: 15px; color: var(--muted); }
.featB-togo b { color: var(--text); }
.featB-water-btns { display: flex; gap: 10px; margin-bottom: 12px; }
.featB-qbtn {
  padding: 10px 20px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: #1e1e1e; color: var(--text, #f5f5f5);
  border: 1px solid var(--border, #2c2c2c); cursor: pointer;
}
.featB-qbtn:active { background: #e10600; border-color: #e10600; }
.featB-water-custom { display: flex; gap: 8px; width: 100%; margin-bottom: 10px; }
.featB-water-custom input { flex: 1; }
.featB-goal-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.featB-goal-row input { width: 74px; }

/* lists (sleep + habits) */
.featB-list { display: flex; flex-direction: column; gap: 8px; }
.featB-item {
  display: flex; align-items: center; gap: 10px;
  background: #1b1b1b; border: 1px solid var(--border, #262626);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.featB-item .grow { flex: 1; min-width: 0; }
.featB-item .mut { color: var(--muted); font-size: 12px; }
.featB-stars { color: #e10600; letter-spacing: 1px; white-space: nowrap; }
.featB-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 12px 0; }

/* habit rows */
.featB-check {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  border: 2px solid var(--border, #3a3a3a); background: transparent; cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.featB-check.done { background: #e10600; border-color: #e10600; }
.featB-check:active { transform: scale(.94); }
.featB-streak { font-size: 12px; color: var(--muted); white-space: nowrap; }
.featB-streak b { color: #e10600; }
.featB-del {
  background: none; border: none; color: var(--muted); font-size: 18px;
  cursor: pointer; padding: 4px 6px; line-height: 1;
}
.featB-habit-add { display: flex; gap: 8px; margin-bottom: 12px; }
.featB-habit-add input { flex: 1; }

/* measurements chart */
.featB-chart { width: 100%; height: auto; display: block; background: #1b1b1b; border-radius: 10px; padding: 4px; }
.featB-chart .axis { stroke: #333; stroke-width: 1; }
.featB-chart .line { fill: none; stroke: #e10600; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.featB-chart .dot { fill: #e10600; }
.featB-chart .lbl { fill: #999; font-size: 9px; }
.featB-latest {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted);
}
.featB-latest span { background: #1b1b1b; border: 1px solid var(--border, #262626); border-radius: 8px; padding: 6px 10px; }
.featB-latest b { color: var(--text); }

/* ===== feat-c.css ===== */
/* ============================================================================
 * FEAT-C-CSS — Group C (AI Coach features) styles.
 * Dark theme, brand red #e10600. Class prefixes: featC-, deload-, ready-,
 * wreport-. Paste <link rel="stylesheet" href="feat-c.css"> after styles.css
 * in index.html <head>.
 * ============================================================================ */

.featC-sec { margin: 14px 0; }
.featC-sec[hidden] { display: none; }

.featC-card {
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255,255,255,.09));
  border-radius: var(--radius, 18px);
  padding: 18px 16px;
  color: var(--text, #f5f5f5);
}

.featC-eyebrow {
  font-size: 11px; letter-spacing: 2px; font-weight: 700;
  color: var(--muted, #8e939c); margin: 0 0 8px;
}
.featC-eyebrow-red { color: var(--red, #e10600); }

/* ---- 1) readiness ---- */
.ready-card { text-align: center; }
.ready-score { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin: 4px 0 8px; }
.ready-num { font-size: 64px; font-weight: 800; line-height: 1; color: var(--muted, #8e939c); }
.ready-max { font-size: 18px; color: var(--muted, #8e939c); font-weight: 600; }
.ready-line { font-size: 14px; line-height: 1.5; color: var(--text, #f5f5f5); margin: 0 0 12px; }

.ready-num.ready-green { color: var(--green, #22c55e); }
.ready-num.ready-amber { color: #f5a623; }
.ready-num.ready-red   { color: var(--red, #e10600); }
.ready-card.ready-green { border-color: rgba(34,197,94,.45); box-shadow: 0 0 24px rgba(34,197,94,.10); }
.ready-card.ready-amber { border-color: rgba(245,166,35,.40); }
.ready-card.ready-red   { border-color: rgba(225,6,0,.55); box-shadow: 0 0 24px rgba(225,6,0,.12); }

.featC-refresh {
  background: transparent; border: 1px solid var(--line, rgba(255,255,255,.09));
  color: var(--muted, #8e939c); border-radius: 999px; padding: 7px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.featC-refresh:active { transform: scale(.97); }

/* ---- 2) deload ---- */
.deload-card {
  background: linear-gradient(160deg, rgba(225,6,0,.16), var(--card, #121217) 65%);
  border: 1px solid rgba(225,6,0,.55);
  border-radius: var(--radius, 18px);
  padding: 18px 16px;
  color: var(--text, #f5f5f5);
}
.deload-card h3 { margin: 0 0 8px; font-size: 19px; }
.deload-msg { font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.deload-meta { font-size: 12px; color: var(--muted, #8e939c); margin: 0; }

/* ---- 3) weekly report ---- */
.wreport-card {
  border: 1px solid var(--line, rgba(255,255,255,.09));
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
  background: var(--card-2, #17171c);
}
.wreport-latest { border-color: rgba(225,6,0,.45); }
.wreport-week { font-size: 11px; letter-spacing: 1.5px; font-weight: 700; color: var(--muted, #8e939c); margin: 0 0 10px; }
.wreport-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.wreport-stats div {
  background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.wreport-stats b { font-size: 18px; color: var(--text, #f5f5f5); }
.wreport-stats span { font-size: 10px; color: var(--muted, #8e939c); text-transform: uppercase; letter-spacing: .5px; }
.wreport-summary { font-size: 14px; line-height: 1.6; margin: 0; }
.wreport-empty { font-size: 14px; color: var(--muted, #8e939c); line-height: 1.55; margin: 6px 0 14px; }
.wreport-gen { width: 100%; margin-top: 4px; }
.wreport-err { color: var(--red-soft, #ff6b61); font-size: 13px; margin-top: 10px; }
.wreport-teaser {
  border: 1px dashed rgba(225,6,0,.5); border-radius: 14px;
  padding: 14px; margin: 4px 0 12px; text-align: center;
}
.wreport-teaser p { font-size: 13px; color: var(--muted, #8e939c); line-height: 1.55; margin: 0 0 12px; }
.wreport-teaser p b { color: var(--text, #f5f5f5); }

/* lock cards injected by feat-c.js reuse .sensor-lock from track-styles.css */
#featC-ready-sec .sensor-lock, #featC-deload-sec .sensor-lock, #featC-wreport-sec .sensor-lock {
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255,255,255,.09));
  border-radius: var(--radius, 18px);
  padding: 20px 16px;
}
.btn-block { width: 100%; }

/* ===== feat-d.css ===== */
/* ============ GROUP D (Social: Community tab) ============ */
/* Prefixes: chal-, feed-, share-, featD- */

/* trial hint */
.featD-trial-hint {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(232, 184, 92, 0.35);
  border-radius: 12px;
  background: rgba(232, 184, 92, 0.08);
  font-size: 13px;
  color: var(--text);
}

/* ---------- challenges ---------- */
.chal-hero {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
  margin-top: 8px;
}
.chal-hero h3 {
  margin: 6px 0 4px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 30px;
  letter-spacing: 0.5px;
}
.chal-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 12px;
}
.chal-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.chal-progress-row b { color: var(--text); font-size: 15px; }
.chal-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.chal-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--red);
  transition: width 0.4s;
}
.chal-bar.small { height: 6px; margin-top: 6px; }
.chal-hero .btn-red { width: 100%; margin-top: 6px; }

.chal-board { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.chal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
}
.chal-me { border-color: rgba(225, 6, 0, 0.6); background: rgba(225, 6, 0, 0.08); }
.chal-rank {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--red-soft);
  min-width: 28px;
  text-align: center;
}
.chal-who { flex: 1; min-width: 0; }
.chal-who b { font-size: 14px; }
.chal-mi { font-size: 13px; color: var(--muted); white-space: nowrap; }
.chal-mi b { color: var(--text); font-size: 16px; }

/* ---------- member feed ---------- */
.feed-composer {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}
.feed-composer textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 56px;
}
.feed-composer textarea:focus {
  outline: none;
  border-color: var(--red);
}
.feed-composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.feed-count { font-size: 12px; color: var(--muted); }

.feed-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}
.feed-mine { border-color: rgba(225, 6, 0, 0.4); }
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.feed-head b { font-size: 14px; }
.feed-head span { font-size: 12px; color: var(--muted); }
.feed-you {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--red-soft);
  border: 1px solid rgba(225, 6, 0, 0.5);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: 1px;
}
.feed-msg {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feed-cheer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 6px 14px;
  cursor: pointer;
}
.feed-cheer:active { transform: scale(0.96); }
.feed-cheer.on {
  border-color: var(--red);
  background: rgba(225, 6, 0, 0.15);
}
.feed-del { font-size: 13px; }

/* ---------- share to social ---------- */
.share-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
  margin-top: 8px;
}
.share-card p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.share-status {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--red-soft);
}

/* ===== feat-ef.css ===== */
/* Unorthodox Ops member app — Group E (exercise video library) + Group F (progress photos).
   Coordinator: append to styles.css (or load as feat-ef.css alongside). All classes prefixed exlib- / photo-. */

/* ---------- E1: exercise video library ---------- */
.exlib-search-row { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.exlib-search { flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 15px; font-family: var(--font-body); }
.exlib-search:focus { outline: none; border-color: var(--red); }
.exlib-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.exlib-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.exlib-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body); }
.exlib-chip.on { background: rgba(225, 6, 0, 0.16); color: var(--red-soft); border-color: var(--red); }
.exlib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exlib-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; }
.exlib-card-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.exlib-card h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.exlib-tag { align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--red-soft); border: 1px solid rgba(225, 6, 0, 0.4);
  border-radius: 999px; padding: 3px 9px; }
.exlib-play { display: inline-block; background: linear-gradient(135deg, var(--red), #a80400);
  color: #fff; font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 10px;
  text-decoration: none; }
.exlib-soon { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.4; }
.exlib-empty { color: var(--muted); font-size: 14px; text-align: center; grid-column: 1 / -1;
  padding: 24px 8px; }

/* ---------- F1: progress photos ---------- */
.photo-private-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.photo-private-note b { color: var(--text); }
.photo-date-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.photo-date-row label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); }
.photo-date-row input[type="date"] { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 15px; font-family: var(--font-body);
  color-scheme: dark; }
.photo-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.photo-upload-card { background: var(--card); border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius); padding: 16px 8px; text-align: center; }
.photo-upload-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text); }
.photo-upload-card button { background: rgba(225, 6, 0, 0.14); color: var(--red-soft);
  border: 1px solid var(--red); border-radius: 10px; padding: 9px 10px; font-size: 12px;
  font-weight: 700; cursor: pointer; width: 100%; font-family: var(--font-body); }
.photo-msg { font-size: 13px; color: var(--green); margin: 6px 0 0; min-height: 18px; }
.photo-msg-err { color: #ff8a80; }
.photo-timeline-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.photo-timeline-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800;
  letter-spacing: 1px; }
.photo-count { font-size: 12px; color: var(--muted); }
.photo-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.photo-dot { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body); }
.photo-dot.on { background: rgba(225, 6, 0, 0.16); color: var(--red-soft); border-color: var(--red); }
.photo-view { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-thumb { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 3 / 4; cursor: pointer; background: var(--card-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-angle { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.6);
  border-radius: 6px; padding: 3px 7px; }
.photo-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 13px; cursor: pointer;
  line-height: 1; }
.photo-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 18px 8px; grid-column: 1 / -1; }
.photo-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.photo-lightbox[hidden] { display: none; }
.photo-lightbox-inner { max-width: 480px; width: 100%; text-align: center; }
.photo-lightbox-inner img { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 12px; }
.photo-lightbox-cap { color: var(--muted); font-size: 13px; margin: 10px 0 14px; text-transform: capitalize; }
.photo-lightbox-actions { display: flex; gap: 10px; justify-content: center; }
.photo-del-btn { background: transparent; color: #ff8a80; border: 1px solid rgba(255, 138, 128, 0.5);
  border-radius: 12px; padding: 13px 22px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body); }

/* ===== feat-g.css ===== */
/* GROUP G — Pro AI Lab styles. Matches dark theme, brand red #e10600. */

/* uses-left line */
.featg-uses {
  font-size: 12px; color: var(--muted); letter-spacing: 0.5px;
  margin: 0 0 12px;
}
.featg-uses b { color: var(--red-soft); }
.featg-uses.zero b { color: var(--red); font-weight: 800; }

/* cards */
.featg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.featg-title { font-weight: 800; font-size: 15px; margin: 0 0 4px; }
.featg-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.45; }

/* file picker label (styled button) */
.featg-file {
  display: inline-block;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 10px;
}
.featg-file:active { border-color: var(--red); }

/* file picker + camera button side by side */
.featg-file-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: stretch; }
.featg-file-row .featg-file { margin-bottom: 0; flex: 1; text-align: center; }
.featg-cam-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; min-width: 46px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  cursor: pointer;
}
.featg-cam-btn:active { border-color: var(--red); background: rgba(255, 60, 60, 0.12); }

/* photo preview */
.featg-preview {
  display: block;
  width: 100%; max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0 0 12px;
}

/* lift select */
.featg-field { display: block; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--muted); margin-bottom: 6px; }
.featg-select {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px; font-weight: 600;
  margin-bottom: 12px;
  appearance: none;
}

/* result card */
.featg-result {
  margin-top: 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  padding: 14px;
}
.featg-macros { display: flex; gap: 8px; margin-bottom: 10px; }
.featg-macro { flex: 1; text-align: center; }
.featg-macro b { display: block; font-size: 20px; font-family: var(--font-display); letter-spacing: 1px; }
.featg-macro span { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: 800; }
.featg-cal { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: 1px; margin: 0 0 8px; }
.featg-cal small { font-size: 12px; color: var(--muted); letter-spacing: 2px; font-family: var(--font-body); }
.featg-verdict { font-size: 14px; line-height: 1.5; margin: 0; color: var(--text); }
.featg-points { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.featg-points li { margin-bottom: 6px; }
.featg-points li:last-child { margin-bottom: 0; }

/* status / loading / error lines */
.featg-status { font-size: 13px; color: var(--muted); margin: 10px 0 0; min-height: 0; }
.featg-status.loading { color: var(--text); }
.featg-status.loading::before { content: '⏳ '; }
.featg-status.error { color: var(--red-soft); }
.featg-status.ok { color: var(--green); }

/* upgrade nudge inside result area */
.featg-nudge {
  margin: 12px 0 0; padding: 12px;
  border: 1px solid rgba(225, 6, 0, 0.4);
  border-radius: 12px;
  background: rgba(225, 6, 0, 0.08);
  font-size: 13px; line-height: 1.5;
}
.featg-nudge b { color: var(--red-soft); }

/* the lock block reuses .sensor-lock (track-styles.css) */

/* ===== voice-coach.css ===== */
/* ============================================================================
 * VOICE COACH styles — dark theme, brand red #e10600
 * Pairs with voice-coach.js. Mounts inside the Track tab active-workout
 * screen (container id="voice-coach").
 * ========================================================================== */

.voice-coach-mount {
  margin: 10px 0 0;
}

.vc-card {
  background: #141416;
  border: 1px solid #26262a;
  border-radius: 14px;
  padding: 12px 14px;
  color: #f2f2f2;
}

.vc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  color: inherit;
}

.vc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.vc-mic {
  font-size: 17px;
}

.vc-gear {
  background: none;
  border: 0;
  font-size: 18px;
  padding: 6px 4px;
  cursor: pointer;
  opacity: 0.75;
  color: inherit;
}
.vc-gear:active { opacity: 1; }

/* toggle switch */
.vc-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #3a3a3e;
  background: #232326;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.vc-switch .vc-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8a8a8e;
  transition: transform 0.18s ease, background 0.18s ease;
}
.vc-switch.on {
  background: #e10600;
  border-color: #e10600;
}
.vc-switch.on .vc-knob {
  transform: translateX(20px);
  background: #fff;
}

/* settings body */
.vc-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #26262a;
}

.vc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
}

.vc-row-label {
  font-size: 13.5px;
  color: #c9c9cc;
}

/* segmented options */
.vc-seg {
  display: flex;
  background: #1d1d20;
  border: 1px solid #2c2c30;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.vc-seg-btn {
  background: none;
  border: 0;
  color: #b9b9bd;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
}
.vc-seg-btn.active {
  background: #e10600;
  color: #fff;
}

.vc-hint {
  margin: 8px 0 2px;
  font-size: 12px;
  line-height: 1.45;
  color: #8f8f94;
}

/* small screens */
@media (max-width: 380px) {
  .vc-card { padding: 10px 12px; }
  .vc-seg-btn { padding: 7px 10px; }
}

/* ===== plate-calc.css ===== */
/* plate-calc.css — Plate Calculator tool (Plans tab). Dark theme, brand red #e10600. */

#plate-calc-section { margin-bottom: 10px; }

#plate-calc-section .pc-title { margin-top: 6px; }

.pc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.pc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.pc-field .lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.pc-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background-color: var(--bg);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-body);
}
.pc-field input:focus { outline: none; border-color: var(--red); }
.pc-field input::placeholder { color: var(--muted); opacity: 0.6; font-weight: 400; }

.pc-bar-field { margin-top: 12px; }

.pc-toggle { display: flex; gap: 6px; }
.pc-toggle button {
  flex: 1;
  padding: 11px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pc-toggle button.on {
  background: linear-gradient(135deg, var(--red), #a80400);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225, 6, 0, 0.28);
}

.pc-error {
  color: #ff7b75;
  background: rgba(225, 6, 0, 0.08);
  border: 1px solid rgba(225, 6, 0, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin: 14px 0 0;
}

.pc-total {
  font-size: 20px;
  font-weight: 800;
  margin: 16px 0 4px;
  color: var(--text);
}

.pc-line {
  font-size: 21px;
  font-weight: 800;
  margin: 16px 0 4px;
  color: var(--text);
  line-height: 1.35;
}
.pc-line .pc-per { color: var(--red-soft); font-size: 16px; }

.pc-sum {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 6px;
  line-height: 1.5;
}
.pc-sum b { color: var(--text); }

.pc-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 10px 0 2px;
}

.pc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.pc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}
.pc-chip i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.pc-note {
  font-size: 13px;
  color: var(--muted);
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 0;
  line-height: 1.55;
}
.pc-note b { color: var(--text); }

/* Locked variant reuses .sensor-lock (track-styles.css) + .btn-red.btn-block (styles.css). */
#plate-calc-locked { margin-top: 4px; }
#plate-calc-locked .btn-red { margin-top: 8px; }

/* ===== referral.css ===== */
/* ==========================================================================
   REFER & EARN — referral program (Community tab)
   Dark theme, brand red #e10600. Reuses .sensor-lock, .btn-red,
   .section-title, .eyebrow-red from the app stylesheets.
   ========================================================================== */

#referral-sec { margin-top: 4px; }

.referral-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.referral-pitch {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 8px 0 14px;
}
.referral-pitch b { color: var(--text); }

.referral-linkrow {
  display: flex;
  gap: 8px;
}
.referral-link {
  flex: 1;
  min-width: 0;
  background: #070708;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 12px;
}
.referral-linkrow .btn-red {
  flex: 0 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.referral-stats {
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.referral-stats > div {
  flex: 1;
  text-align: center;
}
.referral-stats b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.referral-stats small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.2px;
}

.referral-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 12px 0 0;
}
.referral-note b { color: var(--green); }

/* "you were referred" banner injected on the auth screen */
.referral-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

/* ===== health-sync.css ===== */
/* health-sync.css — "Health Sync" card. Dark theme, brand red #e10600. */

/* The card reuses .featB-card from feat-b.css for its shell. */
#hs-card .section-title { margin-top: 0; }

.hs-sub {
  color: var(--muted, #9a9a9a);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.45;
}

.hs-provider {
  border: 1px solid var(--border, #262626);
  border-radius: 12px;
  padding: 14px 12px;
  margin: 0 0 12px;
  background: rgba(255, 255, 255, 0.015);
}

.hs-provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.hs-provider-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hs-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #555;
  flex: none;
}
.hs-dot-on { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.7); }

.hs-note {
  color: var(--muted, #9a9a9a);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 6px 0;
}

.hs-last {
  color: var(--muted, #9a9a9a);
  font-size: 12px;
  margin: 8px 0 0;
}

.hs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border, #3a3a3a);
  color: var(--text, #f2f2f2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:active { transform: scale(0.98); }
.btn-ghost:disabled { opacity: 0.5; cursor: default; }

.btn-danger-ghost {
  background: transparent;
  border: 1px solid #5a1a1a;
  color: #ff7a7a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-ghost:active { transform: scale(0.98); }

.hs-setup {
  border: 1px dashed #7a2a1a;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #ffb3a6;
  line-height: 1.5;
}

/* Apple CSV preview */
#hs-apple-preview { margin-top: 10px; }

.hs-preview-sum {
  font-size: 13px;
  margin: 0 0 8px;
}

.hs-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.hs-preview-table th,
.hs-preview-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #262626);
}
.hs-preview-table th {
  color: var(--muted, #9a9a9a);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.hs-preview-more {
  color: var(--muted, #9a9a9a);
  font-size: 12px;
  margin: 6px 0 0;
}

/* Manual quick-log */
.hs-manual-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.hs-manual-row input[type="date"],
.hs-manual-row input[type="number"] {
  background: #0e0e0e;
  border: 1px solid var(--border, #3a3a3a);
  color: var(--text, #f2f2f2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  min-width: 0;
}
.hs-manual-row input[type="date"] { flex: 1 1 40%; }
.hs-manual-row input[type="number"] { flex: 1 1 35%; }
.hs-manual-row .btn-red { flex: 1 1 auto; white-space: nowrap; }

.hs-manual-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb3a6;
  border: 1px solid #7a2a1a;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Status message line */
#hs-msg {
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 0;
  min-height: 0;
}
#hs-msg.hs-ok { color: #7de2a8; }
#hs-msg.hs-err { color: #ff8a8a; }

/* ===== achievements.css ===== */
/* achievements.css — Trophy case + celebration modal (Unorthodox Ops member app).
   Dark theme, brand red #e10600. */

/* ---------- trophy case ---------- */
#ach-section .ach-count {
  color: #e10600;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: .8rem;
  text-transform: uppercase;
  margin: .25rem 0 .75rem;
}

#ach-case {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.ach-card {
  background: #16181d;
  border: 1px solid #2a2d35;
  border-radius: 14px;
  padding: .9rem .75rem;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ach-card.earned {
  border-color: #e10600;
  background: linear-gradient(160deg, #1d1113 0%, #16181d 60%);
  box-shadow: 0 0 18px rgba(225, 6, 0, .18);
}

.ach-card.earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 24px rgba(225, 6, 0, .35);
}

.ach-card.locked {
  opacity: .55;
}

.ach-card.locked .ach-icon {
  filter: grayscale(1) brightness(.6);
}

.ach-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: .5rem;
}

.ach-name {
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: .3rem;
}

.ach-card.earned .ach-name {
  color: #fff;
}

.ach-desc {
  font-size: .78rem;
  color: #a7adb8;
  line-height: 1.35;
  margin-bottom: .5rem;
}

.ach-meta {
  font-size: .72rem;
  color: #ffd34d;
  font-weight: 700;
  letter-spacing: .03em;
}

.ach-hint {
  font-size: .72rem;
  color: #8b93a1;
  font-style: italic;
}

.ach-error {
  color: #a7adb8;
  font-size: .85rem;
  padding: 1rem 0;
  text-align: center;
}

/* locked variant (free users) — same shape as feat-a sensor lock */
#ach-locked[hidden] { display: none; }
#ach-locked {
  background: #16181d;
  border: 1px dashed #3a3e48;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

#ach-locked p {
  color: #a7adb8;
  font-size: .9rem;
  margin: .4rem 0 .9rem;
}

/* ---------- celebration modal ---------- */
#ach-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(4px);
}

#ach-modal[hidden] {
  display: none;
}

.ach-modal-card {
  width: 100%;
  max-width: 360px;
  background: #1a1d23;
  border: 2px solid #e10600;
  border-radius: 20px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(225, 6, 0, .45);
  animation: ach-pop .35s cubic-bezier(.2, 1.4, .4, 1);
}

@keyframes ach-pop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.ach-modal-eyebrow {
  color: #e10600;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .75rem;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.ach-modal-icon {
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: .75rem;
  animation: ach-bounce 1s ease infinite;
  display: inline-block;
}

@keyframes ach-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.ach-modal-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: .4rem;
}

.ach-modal-desc {
  color: #a7adb8;
  font-size: .9rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.ach-modal-btn {
  width: 100%;
}

body.ach-modal-open {
  overflow: hidden;
}

/* respects prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ach-modal-card { animation: none; }
  .ach-modal-icon { animation: none; }
  .ach-card { transition: none; }
}

/* ===== today.css ===== */
/* Unorthodox Ops — Today tab (home dashboard).
   Dark premium theme matching the app. Mobile-first. */

/* ---------- greeting header ---------- */
.today-head { margin: 6px 0 18px; }
.today-greet {
  font-family: var(--font-display); font-weight: 800;
  font-size: 38px; letter-spacing: 0.5px; line-height: 1.05; margin: 0;
}
.today-greet .today-name { color: var(--red-soft); }
.today-date {
  color: var(--muted); font-size: 13px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; margin: 6px 0 0;
}

/* ---------- readiness ring ---------- */
.today-readiness {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
}
.today-ring { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.today-ring svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.today-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.today-ring .ring-fg {
  fill: none; stroke: var(--red); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.today-ring .ring-fg.ring-green { stroke: var(--green); }
.today-ring .ring-fg.ring-amber { stroke: #f5a623; }
.today-ring-num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.today-ring-num b { font-family: var(--font-display); font-size: 32px; font-weight: 800; line-height: 1; }
.today-ring-num small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.today-readiness-copy { flex: 1; min-width: 0; }
.today-readiness-copy .eyebrow-red { margin: 0 0 4px; }
.today-readiness-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.today-readiness-copy p b { color: var(--text); }

/* ---------- workout card ---------- */
.today-workout {
  background: linear-gradient(135deg, #1a0a0a 0%, var(--card) 60%);
  border: 1px solid rgba(225, 6, 0, 0.25);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.today-workout::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), transparent);
}
.today-workout .eyebrow-red { margin: 0 0 6px; }
.today-workout h3 { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: 0.5px; }
.today-workout .today-wo-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.today-workout .today-wo-ex { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
.today-cta {
  display: block; width: 100%; height: 52px; border: none; border-radius: 14px;
  background: var(--red); color: #fff; font-family: var(--font-body);
  font-size: 15px; font-weight: 800; letter-spacing: 0.5px; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.today-cta:active { transform: scale(0.98); background: #c00500; }
.today-cta.secondary { background: rgba(255,255,255,0.08); color: var(--text); }

/* ---------- streak + stats row ---------- */
.today-stats-row { display: flex; gap: 10px; margin-bottom: 14px; }
.today-stat {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 12px; text-align: center;
}
.today-stat .today-stat-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.today-stat b { font-family: var(--font-display); font-size: 28px; font-weight: 800; display: block; line-height: 1; }
.today-stat small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- quick actions ---------- */
.today-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 10px;
}
.today-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px; }
.today-action {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text); font-family: var(--font-body); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease;
}
.today-action:active { transform: scale(0.95); border-color: var(--red); }
.today-action svg { width: 24px; height: 24px; fill: none; stroke: var(--red-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.today-action span { text-align: center; line-height: 1.3; }

/* ---------- week chart ---------- */
.today-week {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
}
.today-week .eyebrow-red { margin: 0 0 12px; }
.today-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.today-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.today-bar {
  width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px;
  background: rgba(255,255,255,0.10); min-height: 6px;
  transition: height 0.8s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.today-bar.active { background: linear-gradient(180deg, var(--red-soft), var(--red)); }
.today-bar.today { outline: 2px solid var(--red-soft); outline-offset: 2px; }
.today-bar-day { color: var(--muted); font-size: 10px; font-weight: 700; }
.today-bar-day.today { color: var(--red-soft); }

/* ---------- lock state ---------- */
.today-lock {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; text-align: center; margin-bottom: 14px;
}
.today-lock p { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
.today-lock p b { color: var(--text); }

/* ---------- skeleton shimmer ---------- */
.today-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%; animation: todayShimmer 1.4s infinite;
}
@keyframes todayShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* rise-in stagger for cards */
.today-rise { opacity: 0; transform: translateY(14px); animation: todayRise 0.5s ease forwards; }
@keyframes todayRise { to { opacity: 1; transform: none; } }

/* ===== onboarding.css ===== */
/* Unorthodox Ops — first-run onboarding.
   Full-screen modal, 4 questions + ready screen. Dark premium theme. */

.ob-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 0.3s ease;
}
.ob-overlay.show { opacity: 1; }
.ob-overlay.hide { opacity: 0; pointer-events: none; }

.ob-top { padding: calc(20px + env(safe-area-inset-top)) 20px 0; display: flex; align-items: center; justify-content: space-between; }
.ob-back {
  background: none; border: none; color: var(--muted);
  font-size: 15px; font-weight: 700; cursor: pointer; padding: 8px;
  visibility: hidden;
}
.ob-back.visible { visibility: visible; }
.ob-skip { background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px; }

.ob-dots { display: flex; gap: 8px; justify-content: center; padding: 16px 0 8px; }
.ob-dot { width: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.12); transition: background 0.3s ease; }
.ob-dot.on { background: var(--red); }

.ob-body { flex: 1; overflow: hidden; position: relative; }
.ob-screen {
  position: absolute; inset: 0; padding: 24px 24px 0;
  display: flex; flex-direction: column;
  transform: translateX(60px); opacity: 0; pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.28, 1), opacity 0.28s ease;
}
.ob-screen.active { transform: none; opacity: 1; pointer-events: auto; }
.ob-screen.exit-left { transform: translateX(-60px); opacity: 0; }

.ob-eyebrow {
  color: var(--red-soft); font-size: 11px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase; margin: 8px 0 12px;
}
.ob-title {
  font-family: var(--font-display); font-weight: 800; font-size: 42px;
  line-height: 1.02; letter-spacing: 0.5px; margin: 0 0 10px;
}
.ob-sub { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 28px; }

.ob-options { display: flex; flex-direction: column; gap: 12px; }
.ob-opt {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--text); font-family: var(--font-body);
  font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}
.ob-opt:active { transform: scale(0.98); }
.ob-opt.selected { border-color: var(--red); background: rgba(225, 6, 0, 0.10); }
.ob-opt .ob-opt-icon { font-size: 24px; }
.ob-opt .ob-opt-check {
  margin-left: auto; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: transparent; transition: all 0.15s ease;
}
.ob-opt.selected .ob-opt-check { border-color: var(--red); background: var(--red); color: #fff; }

.ob-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ob-day {
  aspect-ratio: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); font-family: var(--font-display);
  font-size: 34px; font-weight: 800; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.ob-day small { font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.ob-day:active { transform: scale(0.96); }
.ob-day.selected { border-color: var(--red); background: rgba(225, 6, 0, 0.10); }
.ob-day.selected small { color: var(--red-soft); }

.ob-foot { padding: 16px 24px calc(24px + env(safe-area-inset-bottom)); }
.ob-cta {
  width: 100%; height: 56px; border: none; border-radius: 16px;
  background: var(--red); color: #fff; font-family: var(--font-body);
  font-size: 16px; font-weight: 800; letter-spacing: 0.5px; cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.ob-cta:active { transform: scale(0.98); }
.ob-cta:disabled { opacity: 0.35; }

.ob-ready { text-align: center; padding-top: 40px; }
.ob-ready .ob-bolt { font-size: 72px; margin-bottom: 16px; animation: obPulse 1.6s ease infinite; }
@keyframes obPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.ob-ready .ob-title { margin-bottom: 12px; }

/* ===== polish.css ===== */
/* Unorthodox Ops — 2.0 polish layer.
   Design tokens + unification pass. Loaded LAST so it wins ties.
   Does not rewrite existing CSS — it harmonizes it. */

/* ---------- design tokens ---------- */
:root {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-sm: 12px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 8px 32px rgba(0, 0, 0, 0.5);
  --btn-h: 52px;
}

/* ---------- cards: one language ---------- */
.card,
.today-readiness, .today-workout, .today-stat, .today-week, .today-lock,
.featC-card, .sensor-lock, .lock-card, .done-panel, .fw-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
/* Normalize card padding where the base didn't set it */
.card { padding: var(--sp-5); }

/* ---------- section headers: eyebrow + title, always ---------- */
.section-head { margin: 0 0 var(--sp-3); }
.section-head .eyebrow-red,
.section-head .eyebrow-green,
.section-head .eyebrow-muted { margin: 0 0 var(--sp-1); display: block; }
.card-title, .section-title {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: 0.5px; line-height: 1.05;
}

/* ---------- buttons: consistent sizing + press physics ---------- */
.btn-red, .btn-block, .today-cta, .ob-cta,
.ta-btn, .featg-file, .featC-refresh {
  min-height: var(--btn-h);
  border-radius: var(--r-md);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-red:active, .today-cta:active, .ob-cta:active { transform: scale(0.98); }
.tab:active { transform: scale(0.94); }
.today-action:active, .ob-opt:active, .ob-day:active { transform: scale(0.96); }

/* ---------- Coach tab: give the insight cards air + identity ----------
   Readiness / deload / weekly report were identical stacked blocks.
   Each gets a distinct top accent + spacing so the eye can parse them. */
#view-coach .featC-sec {
  margin: var(--sp-4) 0;
  position: relative;
}
#view-coach .featC-sec + .featC-sec { margin-top: var(--sp-5); }
#view-coach #featC-ready-sec .featC-card { border-top: 3px solid var(--green); }
#view-coach #featC-deload-sec .featC-card,
#view-coach #featC-deload-sec > div:not(:empty) { border-top: 3px solid #f5a623; }
#view-coach #featC-wreport-sec .featC-card { border-top: 3px solid var(--red); }
/* Section labels above each insight card */
#view-coach #featC-ready-sec::before,
#view-coach #featC-deload-sec::before,
#view-coach #featC-wreport-sec::before {
  display: block; margin: 0 0 var(--sp-2);
  font-size: 11px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
#view-coach #featC-ready-sec::before { content: 'Recovery'; }
#view-coach #featC-deload-sec::before { content: 'Load management'; }
#view-coach #featC-wreport-sec::before { content: 'Weekly review'; }
/* Pro AI Lab gets the same treatment */
#view-coach #featg-lab { margin-top: var(--sp-6); }
#view-coach #featg-lab::before {
  display: block; margin: 0 0 var(--sp-2);
  font-size: 11px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); content: 'AI tools';
}

/* ---------- number count-up utility ---------- */
.count-up { font-variant-numeric: tabular-nums; }

/* ---------- focus visibility (accessibility polish) ---------- */
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--red-soft); outline-offset: 2px;
}

/* ---------- tab bar: 9 tabs fit ---------- */
.tabbar { gap: 1px; padding-left: 6px; padding-right: 6px; }
.tab { font-size: 9px; padding: 6px 0; min-width: 0; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab svg { width: 21px; height: 21px; }

/* ---------- page-head rhythm ---------- */
.page-head { margin-bottom: var(--sp-4); }
.view > *:first-child { animation: fadeUp 0.3s ease; }

/* ---------- dividers between stacked cards ---------- */
.stack-gap > * + * { margin-top: var(--sp-4); }

/* ---- Tab bar: make it unmissable but on-brand ---- */
.tabbar {
  border-top: 1px solid rgba(225, 6, 0, 0.45);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.65), 0 -1px 12px rgba(225, 6, 0, 0.12);
  background: rgba(10, 10, 12, 0.98);
}
.tabbar::before {
  content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  filter: blur(1px); opacity: 0.8; pointer-events: none;
}
.tab { color: #9a9aa3; position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.on {
  background: linear-gradient(135deg, rgba(225, 6, 0, 0.32), rgba(225, 6, 0, 0.10));
  color: #fff;
  box-shadow: 0 0 18px rgba(225, 6, 0, 0.35), inset 0 0 0 1px rgba(225, 6, 0, 0.35);
}
.tab.on::after {
  content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 3px;
  background: var(--red); box-shadow: 0 0 8px var(--red);
}
.tab.on svg { color: var(--red-soft, #ff6b62); }

/* ---- Generic promo-code redeem (join screen) ---- */
.promo-redeem { margin: 10px 0 4px; }
.promo-row { display: flex; gap: 8px; }
.promo-row input {
  flex: 1; min-width: 0;
  background: #0a0a0c; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px;
  color: #fff; font-size: 16px; letter-spacing: .08em;
  text-transform: uppercase;
}
.promo-row input:focus { outline: none; border-color: var(--red); }
.promo-row .btn-red { flex-shrink: 0; padding: 0 22px; }

/* ===== toast.css ===== */
/* ---------- toast ---------- */
#uo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 74px) + 18px);
  transform: translateX(-50%) translateY(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 14px;
  background: #1b1b20;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  border-left: 3px solid var(--muted, #8e939c);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: var(--text, #f5f5f5);
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#uo-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
#uo-toast.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}
#uo-toast.toast-success { border-left-color: var(--green, #22c55e); }
#uo-toast.toast-error { border-left-color: var(--red, #e10600); }
#uo-toast .toast-ico {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
}
#uo-toast .toast-ico svg { width: 100%; height: 100%; }
#uo-toast.toast-success .toast-ico { color: var(--green, #22c55e); }
#uo-toast.toast-error .toast-ico { color: var(--red-soft, #ff6b61); }
#uo-toast.toast-info .toast-ico { color: var(--muted, #8e939c); }
#uo-toast .toast-msg { flex: 1 1 auto; }

/* ---------- confirm modal (bottom sheet) ---------- */
.cmodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cmodal-overlay.open { opacity: 1; }
.cmodal-overlay.closing { opacity: 0; }
.cmodal-sheet {
  width: min(560px, 100%);
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0.35, 1);
}
.cmodal-overlay.open .cmodal-sheet { transform: translateY(0); }
.cmodal-overlay.closing .cmodal-sheet { transform: translateY(100%); }
.cmodal-grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  margin: 6px auto 14px;
}
.cmodal-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text, #f5f5f5);
}
.cmodal-body {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted, #8e939c);
}
.cmodal-actions {
  display: flex;
  gap: 10px;
}
.cmodal-btn {
  flex: 1;
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  background: var(--card-2, #17171c);
  color: var(--text, #f5f5f5);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.cmodal-btn:active { transform: scale(0.98); }
.cmodal-btn.cmodal-confirm {
  background: var(--red, #e10600);
  border-color: transparent;
  color: #fff;
}
.cmodal-btn.cmodal-confirm.danger {
  background: var(--red, #e10600);
}

/* ===== empty.css ===== */
/* ---------- illustrated empty states ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  animation: emptyRise 0.4s ease;
}
@keyframes emptyRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(225, 6, 0, 0.08);
  border: 1px solid rgba(225, 6, 0, 0.22);
  margin-bottom: 16px;
}
.empty-icon svg {
  width: 36px;
  height: 36px;
  color: var(--red-soft, #ff6b61);
}
.empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #f5f5f5);
}
.empty-body {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted, #8e939c);
  max-width: 300px;
}
.empty-cta {
  min-height: 48px;
  padding: 0 26px;
  border-radius: 14px;
  border: none;
  background: var(--red, #e10600);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.empty-cta:active { transform: scale(0.97); }

/* ===== skeleton.css ===== */
/* ---------- skeleton shimmer loaders ---------- */
.skel-wrap { display: flex; flex-direction: column; gap: 12px; }
.skel-card {
  border-radius: var(--radius, 18px);
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.skel-line {
  height: 13px;
  border-radius: 7px;
  margin-bottom: 12px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.11) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skelShimmer 1.4s infinite ease-in-out;
}
.skel-line:last-child { margin-bottom: 0; }
.skel-w40 { width: 40%; }
.skel-w70 { width: 70%; }
.skel-w90 { width: 90%; }
@keyframes skelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel-line { animation: none; }
}

/* ===== tabs21.css ===== */
/* ---------- 2.1 tab consolidation: Train / Fuel / More ---------- */

/* Merged panes (moved sections) */
.t21-pane { display: none; }
.t21-pane.on { display: block; animation: fadeUp 0.25s ease; }

/* Segmented control (Train + Fuel) */
.seg-wrap {
  padding: 4px 0 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg, #070708);
}
.seg {
  display: flex;
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.seg-btn {
  flex: 1;
  border: none;
  background: none;
  color: var(--muted, #8e939c);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.08s ease;
  font-family: var(--font-body, system-ui, sans-serif);
}
.seg-btn:active { transform: scale(0.98); }
.seg-btn.on {
  background: var(--red, #e10600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225, 6, 0, 0.35);
}

/* More menu */
.more-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.more-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card, #121217);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  border-radius: var(--radius, 18px);
  padding: 16px;
  cursor: pointer;
  color: var(--text, #f5f5f5);
  transition: transform 0.08s ease;
  font-family: var(--font-body, system-ui, sans-serif);
}
.more-row:active { transform: scale(0.98); }
.more-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(225, 6, 0, 0.1);
  border: 1px solid rgba(225, 6, 0, 0.22);
}
.more-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--red-soft, #ff6b61);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.more-label {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
}
.more-label small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted, #8e939c);
  margin-top: 2px;
}
.more-chev {
  font-size: 22px;
  color: var(--muted, #8e939c);
  font-weight: 300;
}

/* Back button inside More subviews */
.t21-back {
  border: none;
  background: none;
  color: var(--red-soft, #ff6b61);
  font-size: 16px;
  font-weight: 700;
  padding: 4px 0 12px;
  cursor: pointer;
  font-family: var(--font-body, system-ui, sans-serif);
}
.t21-back:active { opacity: 0.7; }

/* 6 tabs breathe again */
.tab { font-size: 10px; }
.tab svg { width: 24px; height: 24px; }

/* ===== swipe-hint.css ===== */
/* SWIPE HINT — one-time coach-mark for swipe-between-tabs.
   Dark pill, red accent, matches the Unorthodox Ops theme. */
.swipe-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 74px) + 14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 12, 14, 0.94);
  border: 1px solid rgba(225, 6, 0, 0.65);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  color: #f2f2f2;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}
.swipe-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.swipe-hint.leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}
.swipe-hint-arrow {
  color: #e10600;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

/* ===== reset.css ===== */
/* Password reset — red/black theme, matches toast confirmModal sheet style. */

.forgot-row {
  margin: 10px 0 0;
  text-align: center;
}

.forgot-link {
  background: none;
  border: 0;
  padding: 6px 10px;
  color: var(--muted, #9a9aa3);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.forgot-link:active { color: var(--red, #e11d2e); }

.rs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rs-overlay.show { opacity: 1; }

.rs-sheet {
  width: 100%;
  max-width: 480px;
  background: #141417;
  border-top: 1px solid #26262b;
  border-radius: 18px 18px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(24px);
  transition: transform 0.22s ease;
}

.rs-overlay.show .rs-sheet { transform: translateY(0); }

.rs-grip {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #2c2c31;
  margin: 4px auto 14px;
}

.rs-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.rs-note {
  margin: 0 0 12px;
  color: var(--muted, #9a9aa3);
  font-size: 14px;
  line-height: 1.45;
}

.rs-label {
  display: block;
  margin: 12px 0 6px;
  color: #d7d7dc;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.rs-input {
  width: 100%;
  box-sizing: border-box;
  background: #0d0d0f;
  border: 1px solid #26262b;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  padding: 12px 14px;
}

.rs-input:focus {
  outline: none;
  border-color: var(--red, #e11d2e);
}

.rs-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.rs-btn {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 13px 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.rs-cancel {
  background: #1c1c20;
  color: #d7d7dc;
}

.rs-primary {
  background: var(--red, #e11d2e);
  color: #fff;
}

.rs-primary:disabled { opacity: 0.55; }

/* ===== settings.css ===== */
/* Profile & Settings pane — red/black theme, matches .t21-pane pattern. */

#pane-settings { padding-bottom: 40px; }

.set-card {
  background: #141417;
  border: 1px solid #232327;
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0 16px;
}

.set-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.set-label {
  display: block;
  margin: 12px 0 6px;
  color: #d7d7dc;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.set-input {
  width: 100%;
  box-sizing: border-box;
  background: #0d0d0f;
  border: 1px solid #26262b;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  padding: 12px 14px;
}

.set-input:focus {
  outline: none;
  border-color: var(--red, #e11d2e);
}

.set-btn {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  padding: 13px 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.set-btn:disabled { opacity: 0.55; }

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.set-row b {
  display: block;
  color: #fff;
  font-size: 15px;
}

.set-row small, .set-hint {
  display: block;
  color: var(--muted, #9a9aa3);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.set-hint { margin: 10px 0 0; }

.set-switch {
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border-radius: 30px;
  border: 1px solid #2c2c31;
  background: #1c1c20;
  position: relative;
  cursor: pointer;
  padding: 0;
}

.set-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6d6d75;
  transition: left 0.18s ease, background 0.18s ease;
}

.set-switch[aria-checked="true"] { background: #2a1416; border-color: var(--red, #e11d2e); }
.set-switch[aria-checked="true"] .set-knob { left: 25px; background: var(--red, #e11d2e); }

.set-danger { border-color: #4a1a1d; }

.set-delete {
  background: transparent;
  border: 1px solid var(--red, #e11d2e);
  color: var(--red, #e11d2e);
}

.set-delete:active { background: rgba(225, 29, 46, 0.12); }

/* Profile header — who you are + membership at a glance. */
.set-profile {
  display: flex; align-items: center; gap: 14px;
  background: #141417; border: 1px solid #232327;
  border-radius: 14px; padding: 16px; margin: 12px 0 4px;
}
.set-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e10600, #7a0300);
  color: #fff; font-size: 22px; font-weight: 800;
}
.set-id { flex: 1; min-width: 0; }
.set-id b { display: block; color: #fff; font-size: 17px; font-weight: 800; }
.set-id small { display: block; color: #9a9aa2; font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-mbadge {
  flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: #9a9aa2; border: 1px solid #2a2a2e;
}
.set-mbadge.pro { background: rgba(225,6,0,0.15); color: #ff6b62; border-color: #e10600; }
.set-mbadge.trial { background: rgba(34,197,94,0.12); color: #4ade80; border-color: #22c55e; }

/* ===== sidekick.css ===== */
/* AI Sidekick — floating companion, chat, and Avatar Studio. */

/* ---------- floating widget ---------- */
#sk-widget {
  position: fixed;
  right: 14px;
  bottom: calc(var(--tabbar-h, 74px) + 14px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.sk-avatar-btn {
  pointer-events: auto;
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid rgba(255,255,255,.14);
  background: #141417;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 0 3px rgba(225,6,0,.18);
}
.sk-avatar-btn:active { transform: scale(.93); }
.sk-avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.sk-dot {
  position: absolute;
  right: 2px; bottom: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #e10600;
  border: 2px solid #0a0a0c;
}
.sk-bubble {
  pointer-events: none;
  max-width: 220px;
  background: #1b1b1f;
  border: 1px solid #2c2c31;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 10px 13px;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.6);
}
.sk-bubble[hidden] { display: none; }
.sk-pop { animation: skPop .28s cubic-bezier(.2,1.4,.4,1); }
@keyframes skPop {
  from { transform: translateY(8px) scale(.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- chat panel ---------- */
.sk-chat {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  bottom: calc(var(--tabbar-h, 74px) + 8px);
  width: min(430px, calc(100vw - 24px));
  height: min(520px, calc(100dvh - var(--tabbar-h, 74px) - 120px));
  min-height: 340px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #101013;
  border: 1px solid #2a2a2e;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.sk-chat[hidden] { display: none; }
.sk-chat.open { opacity: 1; transform: translateX(-50%) translateY(0); }
.sk-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #232327;
  background: #141417;
}
.sk-chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #333; }
.sk-chat-id { flex: 1; min-width: 0; }
.sk-chat-id b { display: block; color: #fff; font-size: 15px; }
.sk-chat-id small { color: #9a9aa2; font-size: 12px; }
.sk-chat-x {
  background: none; border: none; color: #9a9aa2;
  font-size: 30px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.sk-chat-x:active { color: #fff; }
.sk-chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.sk-msg {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.sk-user {
  align-self: flex-end;
  background: #e10600;
  color: #fff;
  border-bottom-right-radius: 5px;
}
.sk-assistant {
  align-self: flex-start;
  background: #1c1c20;
  border: 1px solid #2a2a2e;
  color: #f0f0f3;
  border-bottom-left-radius: 5px;
}
.sk-typing span {
  display: inline-block; width: 7px; height: 7px; margin-right: 4px;
  border-radius: 50%; background: #8a8a92;
  animation: skBlink 1.1s infinite;
}
.sk-typing span:nth-child(2) { animation-delay: .18s; }
.sk-typing span:nth-child(3) { animation-delay: .36s; margin-right: 0; }
@keyframes skBlink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.sk-chat-bar {
  display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #232327;
  background: #141417;
}
.sk-chat-bar input {
  flex: 1; min-width: 0;
  background: #0d0d0f; border: 1px solid #2a2a2e; border-radius: 12px;
  color: #fff; font-size: 15px; padding: 11px 13px;
}
.sk-chat-bar input:focus { outline: none; border-color: #e10600; }
.sk-chat-send {
  flex: 0 0 46px; width: 46px; border-radius: 12px;
  background: #e10600; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sk-chat-send svg { width: 20px; height: 20px; }
.sk-chat-send:active { transform: scale(.93); }

/* ---------- Avatar Studio ---------- */
#pane-sidekick { padding-bottom: 48px; }
.sk-row-ico img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.sk-preview {
  --sk-c: #e10600;
  display: flex; align-items: center; gap: 14px;
  background: #141417; border: 1px solid #232327; border-radius: 14px;
  padding: 16px; margin: 12px 0 4px;
}
.sk-preview img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 72px;
  border: 3px solid var(--sk-c);
  box-shadow: 0 0 22px color-mix(in srgb, var(--sk-c) 45%, transparent);
}
.sk-preview b { display: block; color: #fff; font-size: 18px; }
.sk-preview p { color: #b9b9c0; font-size: 13.5px; font-style: italic; margin: 4px 0 0; line-height: 1.45; }
.sk-arch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.sk-arch {
  background: #0d0d0f; border: 2px solid #26262b; border-radius: 12px;
  padding: 8px 6px; cursor: pointer; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.sk-arch img { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; }
.sk-arch small { font-size: 11px; font-weight: 700; color: #c9c9cf; }
.sk-arch.on { border-color: #e10600; box-shadow: 0 0 0 1px #e10600, 0 6px 18px rgba(225,6,0,.25); }
.sk-vibe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-vibe {
  background: #0d0d0f; border: 2px solid #26262b; border-radius: 12px;
  padding: 12px; cursor: pointer; text-align: left; color: #fff;
}
.sk-vibe b { display: block; font-size: 14px; margin-bottom: 3px; }
.sk-vibe small { color: #9a9aa2; font-size: 12px; line-height: 1.4; }
.sk-vibe.on { border-color: #e10600; box-shadow: 0 0 0 1px #e10600; }
.sk-color-row { display: flex; gap: 12px; padding: 4px 2px; }
.sk-color {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 2px solid transparent;
}
.sk-color.on { border-color: #fff; box-shadow: 0 0 0 2px #0d0d0f, 0 0 0 4px #fff; }
.sk-save { margin-top: 6px; }
.sk-save:disabled { opacity: .55; }
.sk-hint { color: #77777f; font-size: 12.5px; line-height: 1.5; text-align: center; margin: 12px 4px 0; }

/* ===== photoslider.css ===== */
/* Before/after photo comparison slider — red/black theme. */

.photo-compare-btn {
  margin-left: auto;
  background: #1c1c20;
  border: 1px solid #2c2c31;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.photo-compare-btn:active { border-color: var(--red, #e11d2e); }

.photo-timeline-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0b0b0d;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-y: auto;
}

.cmp-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmp-top .eyebrow-red { margin: 0; }

.cmp-close {
  background: #1c1c20;
  border: 1px solid #2c2c31;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

.cmp-pickers {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.cmp-pick { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.cmp-pick span {
  color: var(--muted, #9a9aa3);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cmp-pick select {
  background: #141417;
  border: 1px solid #2c2c31;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  padding: 10px;
  width: 100%;
}

.cmp-stage {
  position: relative;
  flex: 1;
  min-height: 46vh;
  background: #000;
  border: 1px solid #232327;
  border-radius: 14px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

.cmp-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.cmp-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--red, #e11d2e);
  transform: translateX(-50%);
  pointer-events: none;
}

.cmp-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red, #e11d2e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.cmp-tag {
  position: absolute;
  top: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 5px 9px;
  border-radius: 8px;
  pointer-events: none;
  max-width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmp-tag-a { left: 10px; }
.cmp-tag-b { right: 10px; }

.cmp-hint {
  text-align: center;
  color: var(--muted, #9a9aa3);
  font-size: 13px;
  margin: 12px 0 0;
}

/* ===== coach-picker.css ===== */
/* ============================================================================
   coach-picker.css — AI coach persona picker (trainer clones).
   Red/black Unorthodox Ops theme. Bottom sheet reuses .cmodal-* conventions.
   ============================================================================ */

.cp-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cp-strip:active { transform: scale(0.99); }

.cp-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, #e10600, #7a0400);
  border: 2px solid rgba(255,255,255,0.18);
  flex: none;
  overflow: hidden;
}
.cp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-avatar.demo { background: linear-gradient(135deg, #b45309, #7c2d12); }

.cp-meta { flex: 1; min-width: 0; }
.cp-eyebrow {
  font-size: 10px; letter-spacing: 2px; color: #e10600; font-weight: 700;
  text-transform: uppercase;
}
.cp-name { font-size: 16px; font-weight: 800; color: #fff; margin-top: 1px; }
.cp-tag { font-size: 12px; color: rgba(255,255,255,0.6); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }

.cp-change {
  flex: none; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(225,6,0,0.16); border: 1px solid rgba(225,6,0,0.55);
  border-radius: 999px; padding: 8px 14px;
}

/* demo badge */
.cp-demo-badge {
  display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  color: #0a0a0a; background: #fbbf24; border-radius: 5px;
  padding: 2px 7px; margin-left: 7px; vertical-align: 2px;
}

/* bottom sheet list */
.cp-sheet-list { display: flex; flex-direction: column; gap: 10px;
  max-height: 62vh; overflow-y: auto; padding: 2px; }

.cp-card {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 13px 14px; width: 100%; color: #fff;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cp-card:active { transform: scale(0.99); }
.cp-card.selected { border-color: #e10600; background: rgba(225,6,0,0.09); }
.cp-card .cp-avatar { width: 52px; height: 52px; font-size: 19px; }

.cp-card-body { flex: 1; min-width: 0; }
.cp-card-name { font-size: 15px; font-weight: 800; }
.cp-card-cred { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 1px; }
.cp-card-tag { font-size: 12.5px; color: rgba(255,255,255,0.75); margin-top: 4px; }
.cp-card-bio { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 6px;
  line-height: 1.45; }
.cp-card-programs { margin-top: 8px; }
.cp-prog {
  font-size: 11.5px; color: #ffd9d9; background: rgba(225,6,0,0.12);
  border: 1px solid rgba(225,6,0,0.3); border-radius: 8px;
  padding: 5px 9px; margin: 4px 6px 0 0; display: inline-block;
}
.cp-check { color: #22c55e; font-weight: 800; font-size: 18px; flex: none; }

.cp-note {
  font-size: 11px; color: rgba(255,255,255,0.45); text-align: center;
  margin-top: 10px; line-height: 1.5;
}

/* ===== forum.css ===== */
/* Community forums */
.forum-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.forum-cat {
  flex: 0 0 auto; padding: 10px 16px; border-radius: 999px; min-height: 44px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer;
}
.forum-cat.on { background: var(--red); border-color: var(--red); color: #fff; }
.forum-list { display: flex; flex-direction: column; gap: 8px; }
.forum-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; color: var(--text); font-family: var(--font-body);
  min-height: 56px;
}
.forum-row:active { transform: scale(.99); }
.forum-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-row-main b { font-size: 14px; line-height: 1.3; }
.forum-row-main small { color: var(--muted); font-size: 12px; }
.forum-replies { font-size: 13px; color: var(--muted); white-space: nowrap; }
.forum-pin { font-size: 14px; }
.forum-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }
.forum-owner {
  display: inline-block; background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; margin-left: 4px;
}
.forum-thread { display: flex; flex-direction: column; gap: 10px; }
.forum-back {
  align-self: flex-start; background: none; border: none; color: var(--red);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 8px 0; font-family: var(--font-body);
}
.forum-op { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.forum-op h3 { margin: 0 0 4px; font-size: 16px; }
.forum-meta { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.forum-body { font-size: 14px; line-height: 1.55; margin: 0; white-space: normal; }
.forum-replies-list { display: flex; flex-direction: column; gap: 8px; }
.forum-reply { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.forum-reply p { margin: 0; font-size: 14px; line-height: 1.5; }
.forum-reply .forum-meta { margin-bottom: 6px; }
.forum-reply-box { display: flex; gap: 8px; }
.forum-reply-box textarea {
  flex: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); padding: 12px; font-size: 16px; font-family: var(--font-body); resize: vertical;
}
.forum-composer { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.forum-composer[hidden] { display: none; }
.forum-composer input, .forum-composer textarea {
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); padding: 12px; font-size: 16px; font-family: var(--font-body);
}
.forum-composer-row { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== rewards.css ===== */
/* rewards.css — Token rewards UI (Option A + C) */
.rw-wrap { margin: 16px 0; }
.rw-card {
  background: var(--card-bg, #141416);
  border: 1px solid var(--border, #2a2a2e);
  border-radius: 12px;
  padding: 16px;
}
.rw-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
}
.rw-coins { font-size: 24px; }
.rw-coins b { color: #ffd54a; }
.rw-tier { font-size: 16px; font-weight: 700; }
.rw-perk { color: var(--muted, #999); font-size: 14px; margin: 4px 0 8px; }
.rw-next { margin: 8px 0; font-size: 13px; color: var(--muted, #999); }
.rw-next .chal-bar { margin-top: 6px; }
.rw-divider { border-top: 1px solid var(--border, #2a2a2e); margin: 12px 0; }
.rw-sub { font-weight: 700; margin-bottom: 8px; }
.rw-reward {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #2a2a2e);
}
.rw-reward:last-of-type { border-bottom: none; }
.rw-reward-info { flex: 1; }
.rw-reward-info b { display: block; }
.rw-reward-info span { font-size: 13px; color: var(--muted, #999); }
.rw-note { font-size: 12px; color: var(--muted, #999); margin-top: 12px; }
.btn-small { padding: 8px 14px; font-size: 14px; min-height: 44px; }
.btn-small:disabled { opacity: 0.4; }

/* ===== lab-ui.css ===== */
/* lab-ui.css — Pro AI Lab new features */
.lab-form { display: grid; gap: 10px; margin: 12px 0; }
.lab-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.lab-form input {
  padding: 10px 12px;
  border: 1px solid var(--border, #2a2a2e);
  border-radius: 8px;
  background: var(--input-bg, #1c1c1f);
  color: var(--text, #fff);
  font-size: 16px; /* no iOS zoom */
  min-height: 44px;
}
.lab-ex-list { margin: 8px 0; padding-left: 20px; }
.lab-ex-list li { margin-bottom: 10px; }
.lab-rest { color: var(--muted, #999); font-size: 13px; }
.lab-swap { margin-left: 8px; font-size: 13px; }
.lab-verdict {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.lab-verdict-hard { background: #1a3a1a; color: #7dff7d; }
.lab-verdict-light { background: #3a3413; color: #ffd54a; }
.lab-verdict-rest { background: #3a1a1a; color: #ff8a8a; }

/* ===== rest-timer.css ===== */
/* rest-timer.css — floating rest timer FAB + overlay */
.rt-fab {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: #1a1a1c;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
  cursor: pointer;
}
.rt-fab.active {
  background: #c1121f;
}
.rt-fab.active #rt-fab-time {
  font-variant-numeric: tabular-nums;
}
.rt-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  padding: 20px;
}
.rt-overlay[hidden] { display: none; }
.rt-card {
  background: #141416;
  border: 1px solid #2a2a2e;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.rt-label {
  color: #8a8a8e;
  font-size: 13px;
  letter-spacing: 2px;
  margin: 0 0 8px;
}
.rt-time {
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  margin: 0 0 20px;
  font-variant-numeric: tabular-nums;
}
.rt-presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.rt-presets button {
  flex: 1;
  min-height: 44px;
  border: 1px solid #2a2a2e;
  border-radius: 10px;
  background: #1c1c1f;
  color: #ccc;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.rt-presets button.on {
  border-color: #c1121f;
  color: #fff;
  background: #2a1215;
}
.rt-actions {
  display: flex;
  gap: 10px;
}
.rt-actions button {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.rt-actions .btn-red {
  background: #c1121f;
  color: #fff;
}
.rt-actions .btn-ghost {
  background: transparent;
  color: #8a8a8e;
  border: 1px solid #2a2a2e;
}
