/* ==========================================================================
   ARF IRON METRICS — Design System
   Mobile-first, dark, high-contrast, athletic.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0a0b0d;
  --bg-elev: #101216;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --surface-3: #232833;
  --border: #262b34;
  --border-strong: #343b47;

  /* Text */
  --text: #f4f5f7;
  --text-dim: #b7bcc6;
  --muted: #838a96;
  --faint: #5b616c;

  /* Brand */
  --accent: #ff4d1c;
  --accent-hi: #ff6a3d;
  --accent-dim: rgba(255, 77, 28, 0.14);
  --gold: #ffb020;

  /* Status */
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.14);
  --info: #60a5fa;
  --info-dim: rgba(96, 165, 250, 0.14);

  /* Geometry */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  --shadow-sm: 0 4px 14px -8px rgba(0, 0, 0, 0.7);

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --bottomnav-h: 64px;
  --maxw: 1180px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100dvh; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75em; color: var(--text-dim); }

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 700;
  line-height: 1;
}

/* ------------------------------------------------------------------ *
 * Utility
 * ------------------------------------------------------------------ */
.muted { color: var(--muted); }
.dim { color: var(--text-dim); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.success { color: var(--success); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ *
 * App shell
 * ------------------------------------------------------------------ */
.app {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d0f12 0%, #0a0b0d 100%);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent) 0%, #b3270a 100%);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -8px rgba(255, 77, 28, 0.9);
  flex-shrink: 0;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  background: #0a0b0d;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.9);
}
.brand-logo.lg { width: 56px; height: 56px; border-radius: 15px; }
.brand-logo.sm { width: 30px; height: 30px; border-radius: 8px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 0.95;
}
.brand-name-alt { color: var(--accent); }
.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-section { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 10px 10px 6px;
  font-weight: 700;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
  position: relative;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -14px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-item .ico { width: 18px; text-align: center; font-size: 0.95rem; opacity: 0.9; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--surface-3), var(--bg-elev));
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.8rem; color: var(--text-dim);
  flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar.xl { width: 76px; height: 76px; font-size: 1.5rem; }
.avatar.accent { background: linear-gradient(140deg, var(--accent), #b3270a); color: #fff; border-color: transparent; }

/* Main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 13, 0.86);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center;
  padding: 0 18px; gap: 14px;
}
.topbar .brand { display: none; }
.topbar-title { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content {
  padding: 22px 18px 40px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.page-head { margin-bottom: 20px; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-head h1 { font-size: 1.75rem; }
.page-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

/* Mobile bottom nav */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(12, 13, 16, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 50;
}
.bottom-nav .bn-inner { display: flex; height: var(--bottomnav-h); }
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.bn-item .ico { font-size: 1.15rem; }
.bn-item.active { color: var(--accent); }

.mobile-only { display: none; }
.menu-btn {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); width: 38px; height: 38px; border-radius: 10px;
  font-size: 1rem; cursor: pointer;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 55; backdrop-filter: blur(2px);
  }
  .topbar .brand { display: flex; }
  .menu-btn { display: inline-grid; place-items: center; }
  .bottom-nav { display: block; }
  .content { padding-bottom: calc(var(--bottomnav-h) + 30px); }
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
}

/* ------------------------------------------------------------------ *
 * Cards & surfaces
 * ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card.pad-lg { padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-accent { border-color: rgba(255, 77, 28, 0.35); background: linear-gradient(180deg, rgba(255,77,28,0.06), var(--surface)); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.card-head h3 { font-size: 1rem; }
.card-title-sm { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }

.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-head h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.3rem; }

/* Stat blocks */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 15px;
}
.stat .stat-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.stat .stat-value {
  font-family: var(--font-display);
  font-size: 2rem; line-height: 1.05; margin-top: 5px;
  letter-spacing: 0.01em;
}
.stat .stat-value small { font-size: 0.95rem; color: var(--muted); font-family: var(--font); font-weight: 600; }
.stat .stat-delta { font-size: 0.76rem; margin-top: 3px; font-weight: 600; }
.stat.accent .stat-value { color: var(--accent); }

/* Hero (today's workout / next action) */
.hero {
  border-radius: var(--radius-lg);
  padding: 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 77, 28, 0.22) 0%, rgba(255, 77, 28, 0) 55%),
    linear-gradient(160deg, #191c22 0%, #101216 100%);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
}
.hero h1 { font-size: 1.9rem; }
.hero .hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--text-dim); font-size: 0.85rem; }
.hero .hero-meta b { color: var(--text); }

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 17px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: transform 0.08s, background 0.14s, border-color 0.14s, opacity 0.14s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(140deg, var(--accent) 0%, #d63a0e 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px -12px rgba(255, 77, 28, 0.95);
}
.btn-primary:hover { background: linear-gradient(140deg, var(--accent-hi) 0%, var(--accent) 100%); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }
.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger-dim); border-color: rgba(248,113,113,0.4); color: var(--danger); }
.btn-icon { padding: 9px; width: 38px; height: 38px; }
/* Gym tap targets: thumb-sized controls for use mid-set, on a phone, with
   chalked hands. 44px is the minimum comfortable target. */
.btn-gym { min-height: 44px; min-width: 44px; padding: 10px 14px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ------------------------------------------------------------------ *
 * Searchable exercise picker
 * Every row is a full-width submit button so one tap adds the exercise.
 * Rows are 52px+ tall because they are tapped on a phone, in a gym.
 * ------------------------------------------------------------------ */
.ex-list {
  margin-top: 10px;
  max-height: 340px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ex-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.ex-item:hover { border-color: var(--accent); }
.ex-item:active { background: var(--accent-dim); transform: scale(0.995); }
.ex-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-item-name { font-weight: 600; font-size: 0.95rem; }
.ex-item-meta { font-size: 0.76rem; color: var(--muted); }
.ex-item i { color: var(--accent); font-size: 0.9rem; flex: 0 0 auto; }
.ex-item[hidden] { display: none; }

/* ------------------------------------------------------------------ *
 * Pills, tags, chips
 * ------------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); text-transform: uppercase;
}
.pill.accent { background: var(--accent-dim); border-color: rgba(255,77,28,0.35); color: var(--accent-hi); }
.pill.success { background: var(--success-dim); border-color: rgba(52,211,153,0.35); color: var(--success); }
.pill.warn { background: var(--warn-dim); border-color: rgba(251,191,36,0.35); color: var(--warn); }
.pill.danger { background: var(--danger-dim); border-color: rgba(248,113,113,0.35); color: var(--danger); }
.pill.info { background: var(--info-dim); border-color: rgba(96,165,250,0.35); color: var(--info); }
.pill.plain { background: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.7rem; color: var(--muted); font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * Lists & tables
 * ------------------------------------------------------------------ */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row.hoverable:hover { background: var(--surface-2); }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-title { font-weight: 600; font-size: 0.92rem; }
.list-row .lr-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th {
  text-align: left; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; padding: 10px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.table tr:last-child td { border-bottom: none; }
.table td.strong { color: var(--text); font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ *
 * Forms
 * ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; padding: 12px 13px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 0.76rem; color: var(--faint); }

.segmented { display: inline-flex; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.segmented a, .segmented button {
  padding: 7px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); background: transparent; border: none; cursor: pointer;
}
.segmented a.active, .segmented button.active { background: var(--surface-3); color: var(--text); }

/* ------------------------------------------------------------------ *
 * Auth screen
 * ------------------------------------------------------------------ */
.auth-wrap {
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-aside {
  background:
    radial-gradient(90% 120% at 10% 0%, rgba(255,77,28,0.28) 0%, rgba(255,77,28,0) 60%),
    linear-gradient(160deg, #15181e 0%, #0a0b0d 100%);
  border-right: 1px solid var(--border);
  padding: 46px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ''; position: absolute; right: -80px; bottom: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,77,28,0.22), transparent 70%);
}
.auth-aside .big {
  font-family: var(--font-display); font-size: 3.4rem; text-transform: uppercase;
  line-height: 0.94; letter-spacing: 0.01em; margin: 22px 0;
}
.auth-main { display: grid; place-items: center; padding: 34px 22px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 1.6rem; margin-bottom: 4px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

/* ------------------------------------------------------------------ *
 * Misc components
 * ------------------------------------------------------------------ */
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty .empty-ico { font-size: 1.9rem; opacity: 0.5; margin-bottom: 10px; }
.empty h3 { color: var(--text-dim); margin-bottom: 6px; }

.progress-bar { height: 8px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.progress-bar.thin { height: 5px; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.alert {
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.86rem; margin-bottom: 14px; border: 1px solid;
}
.alert.error { background: var(--danger-dim); border-color: rgba(248,113,113,0.35); color: #fecaca; }
.alert.success { background: var(--success-dim); border-color: rgba(52,211,153,0.35); color: #a7f3d0; }
.alert.info { background: var(--info-dim); border-color: rgba(96,165,250,0.35); color: #bfdbfe; }
.alert.warn { background: var(--warn-dim); border-color: rgba(251,191,36,0.4); color: var(--warn); }

/* Soft email-verification reminder (non-blocking). */
.verify-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 16px; margin-bottom: 18px;
  border: 1px solid rgba(255,77,28,0.38); border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,77,28,0.12), rgba(255,77,28,0.04));
}
.verify-banner .vb-ico { font-size: 1.05rem; color: var(--accent); display: flex; }
.verify-banner .vb-copy { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.verify-banner .vb-copy strong { font-size: 0.9rem; color: var(--text); }
.verify-banner .vb-sub { font-size: 0.8rem; color: var(--muted); }
.verify-banner .vb-email { color: var(--text-dim); word-break: break-all; }
.verify-banner form { margin: 0; flex: 0 0 auto; }
@media (max-width: 560px) {
  .verify-banner form, .verify-banner form .btn { width: 100%; }
}

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.87rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); font-weight: 600; text-align: right; }

.role-switch { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.role-switch a { padding: 6px 12px; border-radius: 7px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.role-switch a.active { background: var(--surface-3); color: var(--text); }

/* Mini bar chart (progress) */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 120px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(255,77,28,0.35)); border-radius: 5px 5px 0 0; min-height: 4px; position: relative; }
.bars .bar:hover { filter: brightness(1.15); }

.sparkline { display: flex; align-items: flex-end; gap: 2px; height: 42px; }
.sparkline .s { flex: 1; background: var(--surface-3); border-radius: 2px; min-height: 3px; }
.sparkline .s.hi { background: var(--accent); }

/* Quick action tiles */
.tile {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.14s, transform 0.1s;
}
.tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.tile .tile-ico { font-size: 1.15rem; }
.tile .tile-title { font-weight: 600; font-size: 0.92rem; }
.tile .tile-sub { font-size: 0.78rem; color: var(--muted); }

/* ------------------------------------------------------------------ *
 * Animations
 * ------------------------------------------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.3s ease both; }

/* Print */
@media print { .sidebar, .topbar, .bottom-nav { display: none; } }

/* ------------------------------------------------------------------ *
 * Program Builder
 * ------------------------------------------------------------------ */
.builder-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.builder-day-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.builder-day-head .bd-title { font-weight: 700; font-size: 0.98rem; min-width: 0; flex: 1; }
.builder-day-head .bd-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-dim); color: var(--accent-hi);
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; flex: none;
}
.builder-day-head .bd-meta { font-size: 0.74rem; color: var(--muted); }
.builder-day-body { padding: 12px; }

.builder-exercise {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.builder-exercise:last-child { margin-bottom: 0; }
.builder-exercise .be-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.builder-exercise .be-name { font-weight: 600; font-size: 0.9rem; min-width: 0; flex: 1; }
.builder-exercise .be-name .be-cat { font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.builder-exercise .be-actions { display: flex; gap: 4px; flex: none; }

.drag-handle {
  color: var(--faint); cursor: grab; flex: none;
  width: 22px; text-align: center; font-size: 0.85rem;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}
.config-field { display: flex; flex-direction: column; gap: 4px; }
.config-field label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint);
}
.config-field .input, .config-field .select {
  padding: 8px 9px; font-size: 0.86rem; text-align: center;
}
.config-field.wide { grid-column: span 2; }
.config-field.wide .input { text-align: left; }

.add-exercise {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
  background: transparent;
}
.add-exercise .ae-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px;
}

.add-custom { margin-top: 10px; }
.add-custom summary {
  cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--accent-hi); list-style: none;
}
.add-custom summary::-webkit-details-marker { display: none; }
.add-custom summary i { margin-right: 6px; }
.add-custom[open] summary { margin-bottom: 12px; }

.builder-empty {
  text-align: center; padding: 22px 12px;
  color: var(--muted); font-size: 0.85rem;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}

@media (min-width: 700px) {
  .add-exercise .ae-grid { grid-template-columns: 1fr auto; align-items: end; }
}

@media (max-width: 520px) {
  .config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-field.wide { grid-column: span 2; }
}

/* ------------------------------------------------------------------ *
 * Exercise picker (search + create)
 * ------------------------------------------------------------------ */
.picker { position: relative; }
.picker-field { position: relative; }
.picker-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-size: 0.85rem; pointer-events: none;
}
.picker-input { padding-left: 34px; }
.picker-menu {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 4px;
}
.picker-opt {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 9px 10px; border: none; background: transparent; color: var(--text);
  border-radius: 8px; cursor: pointer; font-family: inherit;
}
.picker-opt:hover, .picker-opt.active { background: var(--surface-3); }
.picker-opt .po-name { font-size: 0.88rem; font-weight: 600; }
.picker-opt .po-meta { font-size: 0.72rem; color: var(--muted); text-transform: capitalize; }
.picker-empty { padding: 10px; font-size: 0.82rem; color: var(--muted); text-align: center; }
.picker-create {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
}
.picker-create .hint { flex: 1; min-width: 140px; }
.picker-custom {
  margin-top: 10px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.picker-custom summary {
  cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--text-dim); list-style: none;
}
.picker-custom summary::-webkit-details-marker { display: none; }
.picker-custom summary i { margin-right: 6px; color: var(--accent-hi); }

/* Muscle chip multi-select */
.config-label {
  display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 6px;
}
.muscle-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; }
.muscle-chip { position: relative; }
.muscle-chip input { position: absolute; opacity: 0; pointer-events: none; }
.muscle-chip span {
  display: inline-block; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.74rem; color: var(--text-dim); cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}
.muscle-chip input:checked + span {
  background: var(--accent-dim); border-color: rgba(255,77,28,0.45); color: var(--accent-hi);
}

/* Library reference accordion */
.lib-cat { border-bottom: 1px solid var(--border); padding: 10px 0; }
.lib-cat:last-child { border-bottom: none; }
.lib-cat summary {
  cursor: pointer; list-style: none; display: flex;
  justify-content: space-between; align-items: center;
}
.lib-cat summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------------ */
/* Multi-rotation builder                                              */
/* ------------------------------------------------------------------ */
.rot-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.rot-tab {
  display: flex; flex-direction: column; gap: 2px; min-width: 132px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); text-decoration: none; position: relative;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}
.rot-tab:hover { border-color: var(--border-strong); color: var(--text); }
.rot-tab.active { background: var(--accent-dim); border-color: rgba(255,77,28,0.5); color: var(--text); }
.rot-tab .rt-name { font-weight: 700; font-size: 0.9rem; }
.rot-tab .rt-meta { font-size: 0.72rem; color: var(--muted); }
.rot-tab .rt-badge {
  position: absolute; top: -7px; right: 8px; font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.06em; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 999px;
}
.rot-add { display: flex; gap: 6px; align-items: center; }
.rot-add .input { max-width: 160px; }
.rot-head { border: 1px solid var(--border); }

/* ------------------------------------------------------------------ */
/* Workout logger — fast logging between sets on a phone              */
/* ------------------------------------------------------------------ */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-4 { grid-template-columns: 1fr; } }

/* Warm-up accordion (collapsed by default when empty) */
.warmup-block {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 10px 12px;
}
.warmup-block > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
}
.warmup-block > summary::-webkit-details-marker { display: none; }
.warmup-block > summary i { color: var(--warn); }

/* Set row: number/prev badge | weight | reps | rir | done | e1RM | remove */
.set-row {
  display: grid;
  grid-template-columns: minmax(84px, 1.4fr) repeat(3, minmax(58px, 0.9fr)) auto auto auto;
  align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color 0.14s, background 0.14s;
}
.set-row.is-done {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(0deg, var(--success-dim), var(--success-dim)), var(--surface-2);
}
.set-row.is-warmup { opacity: 0.9; }

.set-no { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  font-weight: 700; font-size: 0.78rem; color: var(--text-dim);
}
.set-row.is-warmup .set-badge { background: var(--warn-dim); color: var(--warn); border-color: rgba(251,191,36,0.4); }
.set-row.is-done .set-badge { background: var(--success-dim); color: var(--success); border-color: rgba(52,211,153,0.4); }
.set-prev { font-size: 0.66rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-prev i { margin-right: 3px; opacity: 0.7; }

.set-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sf-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.set-input {
  width: 100%; padding: 9px 8px; text-align: center;
  font-size: 1rem; font-weight: 600;
  border-radius: 9px; background: var(--bg-elev);
  border: 1px solid var(--border-strong); color: var(--text);
}
.set-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

/* PPS entry — a plain manually-typed text field, never a plate picker or
   calculator. Monospace so the digits line up and the exact notation is legible. */
input.set-input[data-pps-input] {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  letter-spacing: 0.04em;
}
.set-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-dim); }
.set-error {
  font-size: 0.64rem; line-height: 1.25; color: var(--danger);
  margin-top: 2px; text-align: center;
}
.mode-toggle { display: inline-flex; margin: 0; }
.mode-toggle .btn { min-width: 58px; justify-content: center; }

.set-done { position: relative; display: inline-flex; cursor: pointer; }
.set-done input { position: absolute; opacity: 0; width: 0; height: 0; }
.set-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  color: var(--faint); font-size: 1rem;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.set-done input:checked + .set-check {
  background: var(--success); border-color: var(--success); color: #06281c;
}
.set-done input:focus-visible + .set-check { box-shadow: 0 0 0 2px var(--accent-dim); }

.set-e1rm { font-size: 0.68rem; min-width: 56px; text-align: right; }
.set-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border);
  color: var(--faint); transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.set-remove:hover { color: var(--danger); border-color: rgba(248,113,113,0.5); background: var(--danger-dim); }

/* Mini stat tiles (per-exercise PRs on the summary) */
.mini-stat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.ms-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.ms-value { font-size: 0.95rem; font-weight: 700; }

/* Comparison row (vs previous performance) */
.compare-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 620px) {
  /* On a phone the prev-performance line moves under the set number so the
     weight/reps/RIR inputs keep full width for fast thumb entry. */
  .set-row {
    grid-template-columns: 52px repeat(3, minmax(52px, 1fr)) auto;
    grid-template-areas:
      'no w r rir done'
      'prev e1rm e1rm e1rm remove';
    gap: 6px 8px;
  }
  .set-no { grid-area: no; }
  .set-field:nth-of-type(1) { grid-area: w; }
  .set-field:nth-of-type(2) { grid-area: r; }
  .set-field:nth-of-type(3) { grid-area: rir; }
  .set-done { grid-area: done; justify-self: end; }
  .set-e1rm { grid-area: e1rm; text-align: left; }
  .set-row > form { grid-area: remove; justify-self: end; }
  .set-prev { grid-area: prev; }
  .set-input { padding: 12px 6px; font-size: 1.05rem; }
  .set-check { width: 46px; height: 46px; }
  /* The per-set delete control is the one destructive tap in the set row, so on
     a phone it gets a full 44px target instead of the desktop 36px. */
  .set-remove { width: 44px; height: 44px; }
  /* Exercise name stays legible while scrolling a long workout. */
  .builder-day-head .strong { font-size: 1.02rem; }
}

/* ==========================================================================
   WEEKLY SCHEDULE — flexible calendar
   Spacing / readability pass. Layout only — no logic lives here.
   ========================================================================== */

/* Give the calendar page more of the desktop canvas without touching other
   pages (the shell's .content keeps its default width everywhere else). */
.content:has(.week-grid) { max-width: 1440px; }

/* --- Section rhythm: ~24–32px between nav, stats, calendar, reschedule --- */
.week-nav { margin-bottom: 26px; }
.week-stats { margin-bottom: 28px; }
.week-grid { margin-bottom: 30px; }

.week-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
}
.week-nav-label { text-align: center; min-width: 0; }
.week-nav-label .strong { font-weight: 700; font-size: 1rem; }
.week-nav .btn { min-height: 42px; }

/* --- The seven-day grid: 12–16px between cards --- */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.day-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  min-height: 224px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.day-card.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim), var(--shadow-sm); }
.day-card.rest { background: var(--bg-elev); opacity: 0.86; }

.day-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.day-name { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; }
.day-date { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.accent-tag { background: var(--accent-dim); color: var(--accent-hi); border-color: transparent; }

.day-card-body { padding: 16px; flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; }

/* Prominent, naturally wrapping workout name. */
.day-workout { font-size: 0.94rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.day-workout .strong { font-weight: 700; font-size: 1.05rem; line-height: 1.35; color: var(--text); }
.day-workout .wk-sub { display: block; margin-top: 5px; font-size: 0.74rem; color: var(--faint); }
.day-workout .wk-swap-note { display: block; margin-top: 5px; font-size: 0.72rem; color: var(--warn); }
.day-card.rest .day-workout { color: var(--muted); }

.day-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* The action button is pinned to the bottom so every card lines up. */
.day-card-foot { margin-top: auto; padding: 0 16px 16px; }
.day-card-foot .btn { min-height: 44px; }

/* --- Reschedule panel --- */
.resched-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.resched-block {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.resched-block h4 { font-size: 0.95rem; display: flex; align-items: center; gap: 8px; margin: 0; }
.resched-block p { margin: 0; }
.resched-form { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.resched-form .btn { min-height: 44px; }
.resched-field { display: flex; flex-direction: column; gap: 6px; }
.resched-field label {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); font-weight: 700;
}

/* --------------------------------------------------------------------------
   Drag & drop scheduling (progressive enhancement — the dropdown controls
   above remain the accessible fallback when JS is unavailable).
   -------------------------------------------------------------------------- */
/* Drag affordances only render once the DnD script is active (.js-dnd), so a
   no-JS visitor just sees the dropdown controls. */
.dnd-only { display: none; }
.js-dnd .dnd-hint { display: block; margin-bottom: 18px; }
.js-dnd .dnd-drag-handle { display: inline-flex; }
.day-card.draggable { cursor: grab; }
.day-card.draggable:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.day-card.draggable:active { cursor: grabbing; }
.day-card.is-dragging { opacity: 0.45; border-style: dashed; border-color: var(--accent); }
.day-card.drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim), var(--shadow-sm);
}
.day-card.drop-target::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--accent-dim); border-radius: inherit;
}
.day-card { position: relative; }
.dnd-ghost {
  position: fixed; z-index: 90; pointer-events: none;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface-3); border: 1px solid var(--accent);
  color: var(--text); font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow); transform: translate(-50%, -50%) rotate(-1.5deg);
  max-width: 220px;
}
.day-card.locked { cursor: not-allowed; }
.dnd-drag-handle {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface-3); border: 1px solid var(--border);
  color: var(--faint); cursor: grab; font-size: 0.8rem;
  touch-action: none; /* touch drags from the handle don't scroll the page */
}
.dnd-drag-handle:hover { color: var(--text); border-color: var(--border-strong); }
.dnd-drag-handle:active { cursor: grabbing; }
.day-card.draggable .day-card-head { padding-right: 46px; }
.day-card.rest .dnd-drag-handle { display: none; }

/* --- Action-choice modal (swap / move / cancel) --- */
.dnd-modal {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}
.dnd-modal.open { display: flex; }
.dnd-modal-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; animation: fadeUp 0.18s ease both;
}
.dnd-modal-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.dnd-modal-card .dnd-modal-sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.dnd-modal-card .dnd-modal-sub b { color: var(--text); }
.dnd-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.dnd-modal-actions .btn { min-height: 46px; }
.dnd-modal-note {
  font-size: 0.78rem; color: var(--faint); margin-top: 4px; text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive: never let the seven columns shrink into unusable slivers and
   never allow horizontal overflow.
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  /* Two columns on tablet — whole week still visible, cards stay generous. */
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .day-card { min-height: 196px; }
  .resched-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  /* Single stacked column on phones — no tiny cards, no horizontal scroll. */
  .week-grid { grid-template-columns: 1fr; gap: 14px; }
  .day-card { min-height: 0; }
  .week-nav { margin-bottom: 22px; }
  .week-stats { margin-bottom: 22px; }
  .week-grid { margin-bottom: 24px; }
  .day-card-head { padding: 16px; }
  .day-card-body { padding: 16px; }
  .day-card-foot { padding: 0 16px 16px; }
  /* Large touch targets on phones. */
  .day-card-foot .btn, .resched-form .btn, .week-nav .btn { min-height: 48px; }
}
