/* Palestra — iOS-native look: system font with tabular numbers, inset grouped
   lists, translucent bars, light/dark from the system. */

:root {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #F7F7FA;
  --elevated: #FFFFFF;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --text: #0A0A0C;
  --text-2: rgba(60, 60, 67, 0.64);
  --text-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.16);
  --accent: #2563EB;
  --accent-press: #1D4FC4;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(37, 99, 235, 0.11);
  --green: #16A34A;
  --green-soft: rgba(22, 163, 74, 0.13);
  --yellow: #B98900;
  --yellow-soft: rgba(234, 179, 8, 0.18);
  --orange: #E3670C;
  --orange-soft: rgba(249, 115, 22, 0.15);
  --red: #DC2626;
  --red-soft: rgba(220, 38, 38, 0.12);
  --gold: #C98A00;
  --bar-bg: rgba(249, 249, 251, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.18);
  --tile-l: 93%;
  --tile-s: 70%;
  --tile-ink-l: 36%;
  --radius: 14px;
  --gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(54px + var(--safe-bottom));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1C1C1E;
    --surface-2: #232326;
    --elevated: #2C2C2E;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.36);
    --text: #F5F5F7;
    --text-2: rgba(235, 235, 245, 0.62);
    --text-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --accent: #4C8DFF;
    --accent-press: #3B7BEE;
    --accent-soft: rgba(76, 141, 255, 0.18);
    --green: #34D06A;
    --green-soft: rgba(52, 208, 106, 0.17);
    --yellow: #F5C518;
    --yellow-soft: rgba(245, 197, 24, 0.17);
    --orange: #FF9A3D;
    --orange-soft: rgba(255, 154, 61, 0.18);
    --red: #FF5C5C;
    --red-soft: rgba(255, 92, 92, 0.17);
    --gold: #FFC53D;
    --bar-bg: rgba(22, 22, 24, 0.78);
    --shadow: none;
    --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.6);
    --tile-l: 22%;
    --tile-s: 38%;
    --tile-ink-l: 78%;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:disabled { cursor: default; }
input, textarea { -webkit-user-select: text; user-select: text; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ic { display: inline-flex; flex: none; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.capitalize::first-letter { text-transform: uppercase; }

/* ---------- layout ---------- */

#view { min-height: 100dvh; }
.view {
  padding: 0 var(--gutter) calc(var(--tabbar-h) + 32px);
  max-width: 680px;
  margin: 0 auto;
  animation: view-in 0.22s ease-out;
}
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.splash { min-height: 100dvh; }

/* nav bar: transparent until the large title scrolls away */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 calc(-1 * var(--gutter));
  padding: var(--safe-top) 8px 0;
  background: transparent;
  border-bottom: 0.5px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.nav.scrolled, .nav.solid {
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--sep);
}
.nav-bar { height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.nav-left { justify-self: start; display: flex; }
.nav-right { justify-self: end; display: flex; gap: 4px; }
.nav-title {
  font-weight: 600;
  font-size: 17px;
  max-width: 56vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.18s;
}
.nav.scrolled .nav-title, .nav.solid .nav-title { opacity: 1; }
.nav-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px;
  color: var(--accent);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.nav-btn:active { opacity: 0.45; }
.nav-btn.strong { font-weight: 600; }
.nav-btn.back { padding-left: 0; gap: 0; }
.nav-btn.back .ic { margin-right: -2px; }
.nav-spacer { width: 60px; }
.large-title {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 2px 0 10px;
  overflow-wrap: anywhere;
}
.lead { margin: -4px 0 16px; font-size: 15px; }
.hint { color: var(--text-2); font-size: 14px; margin: 0 4px 12px; }

/* tab bar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: var(--tabbar-h);
  padding: 4px 6px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
@media (prefers-color-scheme: dark) { .tabbar a { color: rgba(235, 235, 245, 0.42); } }
.tabbar a.on { color: var(--accent); }
.tabbar a:active svg { transform: scale(0.9); }
.tabbar svg { transition: transform 0.12s; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.975); }
.btn:disabled { opacity: 0.4; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 52px; font-size: 17px; border-radius: 14px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 999px; gap: 5px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:active:not(:disabled) { background: var(--accent-press); }
.btn.secondary { background: var(--fill); color: var(--text); }
.btn.tinted { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-text { color: var(--red); background: var(--surface); margin-top: 24px; }
.icon-btn {
  width: 44px;
  height: 44px;
  margin: -6px -10px -6px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border-radius: 50%;
}
.icon-btn:active { background: var(--fill); }
.link-btn { color: var(--accent); font-size: 15px; min-height: 36px; padding: 0 4px; }

/* ---------- grouped lists ---------- */

.section-label {
  display: block;
  margin: 26px 16px 7px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 26px 12px 4px 16px; }
.section-head .section-label { margin: 0 0 3px; }
.group {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.group.compact { margin-bottom: 12px; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  text-align: left;
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: 0.5px solid var(--sep);
}
button.row:active, .row.link:active { background: var(--fill); }
.row small { display: block; color: var(--text-2); font-size: 13px; margin-top: 1px; }
.row-value { color: var(--text-2); }
.row-value.placeholder { color: var(--text-3); }
.row.link > .ic:last-child { color: var(--text-3); margin-right: -4px; }
.row.option.on { color: var(--accent); }
.row.option.on small { color: var(--text-2); }
.row.action { gap: 14px; }
.row.action .ic { color: var(--accent); }
.row.action.danger, .row.action.danger .ic { color: var(--red); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 15px; }
.card-title { font-weight: 600; font-size: 17px; }
.card.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 16px; }
.card.cta p { margin: 0; }

.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin: 12px 0;
  border-radius: 12px;
  background: var(--yellow-soft);
  font-size: 14px;
}

/* ---------- empty states ---------- */

.empty { text-align: center; padding: 48px 24px 24px; display: flex; flex-direction: column; align-items: center; }
.card .empty { padding: 12px 8px; }
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.card .empty-icon { width: 48px; height: 48px; border-radius: 15px; }
.empty h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.card .empty h2 { font-size: 17px; }
.empty p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; max-width: 30ch; }
.card .empty p { margin-bottom: 0; }

/* ---------- search & chips ---------- */

.filter-bar { padding: 2px 0 8px; background: var(--bg); }
.filter-bar.sticky {
  position: sticky;
  top: calc(var(--safe-top) + 48px);
  z-index: 10;
  margin: 0 calc(-1 * var(--gutter));
  padding: 2px var(--gutter) 8px;
}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--text-2);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 17px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.search input::placeholder { color: var(--text-2); }
.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text-3);
  color: var(--surface);
}
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--sep);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
.chip .ic { color: var(--text-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on .ic { color: inherit; }
.chip.small { height: 32px; font-size: 14px; padding: 0 12px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.list-caption { font-size: 13px; color: var(--text-2); margin: 10px 4px 8px; }
.list-empty { padding: 32px 16px; text-align: center; color: var(--text-2); }

/* ---------- exercise list ---------- */

.ex-tile {
  --hue: 230;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: hsl(var(--hue) var(--tile-s) var(--tile-l));
  color: hsl(var(--hue) 55% var(--tile-ink-l));
}
.ex-tile.small { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.ex-tile.large { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.ex-list { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ex-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 9px 14px 9px 12px;
  text-align: left;
}
.ex-row + .ex-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; border-top: 0.5px solid var(--sep); }
.ex-row:active { background: var(--fill); }
.ex-row > .ic { color: var(--text-3); }
.ex-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-row-name { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ex-row-sub { font-size: 14px; color: var(--text-2); margin-top: 1px; }
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.check-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.12s, border-color 0.12s;
}
.check-dot.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ex-row.on { background: var(--accent-soft); }

.ex-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 4px; }
.ex-hero-text { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.tag.strong { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- forms ---------- */

.form-view .nav { margin-bottom: 12px; }
.form .section-label:first-child { margin-top: 8px; }
.row.field { gap: 12px; }
.row.field > span { width: 84px; flex: none; color: var(--text); }
.field-input { flex: 1; min-width: 0; border: 0; background: none; font-size: 17px; padding: 4px 0; }
.field-input::placeholder, .title-input::placeholder, .note-input::placeholder { color: var(--text-3); }
.form-error {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 4px 0;
  color: var(--red);
  font-size: 15px;
}
.title-input {
  width: 100%;
  border: 0;
  background: none;
  font-size: 28px;
  font-weight: 700;
  padding: 6px 2px 10px;
}

/* ---------- routines ---------- */

.routine-list { display: flex; flex-direction: column; gap: 12px; }
.routine-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.routine-card-head { display: flex; align-items: center; gap: 10px; }
.routine-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.routine-name { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.routine-meta { font-size: 14px; color: var(--text-2); margin-top: 1px; }
.routine-exercises {
  margin: 10px 0 14px;
  font-size: 14px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.start-btn { min-height: 44px; }
.add-routine { margin-top: 16px; }
.reorder-mode .routine-card { padding-bottom: 14px; }

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  margin: -8px 0 -8px -10px;
  color: var(--text-3);
  touch-action: none;
  cursor: grab;
}
[data-reorder] { transition: transform 0.18s ease; }
[data-reorder].dragging {
  transition: none;
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow-lift);
  background: var(--elevated);
  border-radius: 14px;
}
.reordering { user-select: none; -webkit-user-select: none; }
.reorder-row .drag-handle { margin: -8px -12px -8px 0; }

/* routine detail */
.plan-row { align-items: flex-start; padding: 12px 14px 12px 12px; }
.plan-row > .ic:last-child { color: var(--text-3); align-self: center; }
.plan-text { display: flex; flex-direction: column; gap: 4px; }
.plan-name { font-weight: 500; }
.plan-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.plan-note { font-size: 14px; color: var(--text-2); font-style: italic; }
.rest-pill, .rpe-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--text-2);
}
.rpe-pill { background: var(--fill); }

/* RPE intensity colours */
.rpe-easy { --rpe: var(--green); --rpe-soft: var(--green-soft); }
.rpe-mid { --rpe: var(--yellow); --rpe-soft: var(--yellow-soft); }
.rpe-hard { --rpe: var(--orange); --rpe-soft: var(--orange-soft); }
.rpe-max { --rpe: var(--red); --rpe-soft: var(--red-soft); }
.rpe-pill[class*="rpe-"], .cell-value[class*="rpe-"] { color: var(--rpe); }
.rpe-pill[class*="rpe-"] { background: var(--rpe-soft); }

/* routine editor */
.plan-list { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.plan-card { background: var(--surface); border-radius: 18px; padding: 14px 16px 10px; box-shadow: var(--shadow); }
.plan-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.plan-card-head .plan-name { font-weight: 600; font-size: 17px; line-height: 1.25; }
.plan-card-head .plan-sub { font-size: 13px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-height: 70px;
  padding: 9px 12px 8px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: left;
}
@media (prefers-color-scheme: dark) { .plan-cell { background: var(--elevated); } }
.plan-cell.tap:active { background: var(--fill-2); }
.cell-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); }
.cell-value { font-size: 22px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.cell-value .ic { color: var(--text-2); }
.cell-static { font-size: 15px; color: var(--text-2); padding-bottom: 4px; }
.range { display: flex; align-items: center; gap: 6px; font-size: 20px; color: var(--text-3); }
.cell-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--fill);
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.cell-input:focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cell-input::placeholder { color: var(--text-3); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fill);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
}
.stepper button:disabled { color: var(--text-3); }
.stepper button:active:not(:disabled) { background: var(--fill-2); }
.stepper-val { font-size: 22px; font-weight: 600; min-width: 1.6em; text-align: center; }
.note-input {
  width: 100%;
  border: 0;
  background: none;
  resize: none;
  font-size: 15px;
  padding: 10px 2px 4px;
  margin-top: 4px;
  border-top: 0.5px solid var(--sep);
  color: var(--text-2);
  overflow: hidden;
}
.note-input:focus { color: var(--text); }
.plan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 16px;
  border: 1.5px dashed var(--fill-2);
  border-radius: 18px;
  color: var(--text-2);
}
.plan-empty p { margin: 0; font-size: 15px; }

/* ---------- home ---------- */

.week-card { margin-bottom: 14px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.week-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--fill);
}
.week-day.today .week-dot { box-shadow: inset 0 0 0 2px var(--accent); }
.week-day.done .week-dot { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.quick-row { padding: 10px 12px 10px 16px; }
.quick-text { display: flex; flex-direction: column; text-align: left; }
.quick-name { font-weight: 500; }
.quick-sub { font-size: 14px; color: var(--text-2); }
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--fill);
  color: var(--text-2);
}
.sync-badge.warn { background: var(--yellow-soft); color: var(--text); }

/* ---------- sheets ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-wrap.open { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.28s; }
.sheet-wrap.open .backdrop { opacity: 1; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 680px;
  margin: 0 auto;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding: 6px var(--gutter) calc(var(--safe-bottom) + 16px);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (prefers-color-scheme: dark) { .sheet { background: #1C1C1E; } .sheet .group, .sheet .card, .sheet .ex-list { background: var(--elevated); } }
.sheet-wrap.open .sheet { transform: none; }
.sheet.tall { max-height: 92dvh; }
.sheet.full { height: calc(100dvh - var(--safe-top) - 12px); max-height: none; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 8px; }
.sheet-title { font-size: 17px; font-weight: 600; text-align: center; margin: 6px 0 14px; }
.sheet-title small { display: block; font-size: 13px; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.sheet-title.small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.actions .group { margin-bottom: 10px; }
.confirm p { text-align: center; margin: -6px 8px 18px; font-size: 15px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choose .group.scroll { max-height: 70dvh; overflow-y: auto; }

.picker { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.picker-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: -4px -8px 4px; }
.picker-head .sheet-title { margin: 0; }
.picker-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 24px; }
.picker-body .filter-bar { position: sticky; top: -4px; z-index: 2; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; }
@media (prefers-color-scheme: dark) { .picker-body .filter-bar { background: #1C1C1E; } }
.picker-foot { padding: 10px 0 calc(var(--safe-bottom) + 10px); border-top: 0.5px solid var(--sep); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
.create-row { color: var(--accent); font-weight: 500; }
.create-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; }

/* RPE sheet */
.rpe-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rpe-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 14px 8px 8px;
  border-radius: 13px;
  background: var(--surface);
}
@media (prefers-color-scheme: dark) { .rpe-opt { background: var(--elevated); } }
.rpe-opt:active { transform: scale(0.985); }
.rpe-opt.on { box-shadow: inset 0 0 0 2px var(--rpe); }
.rpe-opt > .ic { color: var(--rpe); }
.rpe-val {
  width: 50px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  background: var(--rpe-soft);
  color: var(--rpe);
}
.rpe-text { flex: 1; display: flex; flex-direction: column; text-align: left; font-size: 14px; color: var(--text-2); }
.rpe-text b { font-size: 16px; font-weight: 600; color: var(--text); }

/* rest sheet */
.rest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.rest-opt { height: 50px; border-radius: 12px; background: var(--surface); font-size: 17px; font-weight: 600; text-align: center; }
@media (prefers-color-scheme: dark) { .rest-opt { background: var(--elevated); } }
.rest-opt.on { background: var(--accent); color: var(--accent-ink); }
.rest-opt:active { transform: scale(0.96); }

/* ---------- toast ---------- */

#toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + 12px);
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
#toast.top { bottom: auto; top: calc(var(--safe-top) + 10px); }
#toast.show { opacity: 1; transform: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 440px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(30, 30, 32, 0.94);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
@media (prefers-color-scheme: dark) { .toast { background: rgba(58, 58, 60, 0.96); } }
.toast.error { background: var(--red); }
.toast button { color: #8FB6FF; font-weight: 600; }

/* ---------- login ---------- */

.login {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  background: var(--bg);
  transition: opacity 0.25s;
}
.login.leaving { opacity: 0; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-logo { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3); }
.login h1 { font-size: 30px; margin: 18px 0 2px; }
.login-card > p.muted { margin: 0 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form .text {
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 0;
  background: var(--surface);
  font-size: 17px;
  box-shadow: var(--shadow);
}
.login-form .text:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.login-form .form-error { margin: 0 4px; justify-content: center; }
.login-note { display: flex; gap: 6px; justify-content: center; align-items: center; color: var(--text-2); font-size: 14px; margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- workout in progress ---------- */

body[data-tab="active"] .tabbar { display: none; }
body[data-tab="active"] .view { padding-bottom: calc(var(--safe-bottom) + 40px); }
body[data-tab="active"].resting .view { padding-bottom: calc(var(--safe-bottom) + 130px); }
.finish-btn { min-height: 34px; padding: 0 16px; }
.workout-view .nav { margin-bottom: 4px; }
.workout-head { padding: 6px 0 14px; }
.workout-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  overflow-wrap: anywhere;
}
.workout-name .ic { color: var(--text-3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); }
.stat-val { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.live .stat:first-child .stat-val { color: var(--accent); }

.ex-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ex-card { background: var(--surface); border-radius: 18px; padding: 12px 0 6px; box-shadow: var(--shadow); overflow: hidden; }
.ex-card-head { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 12px; margin-bottom: 8px; }
.ex-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.ex-card-name { font-weight: 600; font-size: 17px; color: var(--accent); line-height: 1.25; }
.ex-card-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ex-note { margin: 0 14px 6px; width: calc(100% - 28px); border-top: 0; padding-top: 2px; }

.set-table { --cols: 40px minmax(0, 1fr) 60px 48px 40px 44px; font-size: 16px; }
.set-table.t-time { --cols: 40px minmax(0, 1fr) 76px 40px 44px; }
.set-head, .set-row { display: grid; grid-template-columns: var(--cols); gap: 6px; align-items: center; padding: 0 10px 0 6px; }
.set-head span:first-child { text-align: center; }
.set-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); height: 26px; }
.set-head span:nth-child(n+3) { text-align: center; }
.set-head .ic { justify-content: center; width: 100%; }
.set-wrap { position: relative; overflow: hidden; }
.set-row {
  position: relative;
  min-height: 48px;
  background: var(--surface);
  touch-action: pan-y;
  transition: background 0.2s;
}
.set-row.done { background: var(--green-soft); }
@media (prefers-color-scheme: dark) { .set-row.done { background: #12301D; } }
.set-num { font-weight: 600; color: var(--text-2); text-align: center; }
.set-row.done .set-num { color: var(--green); }
.set-prev { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) { .set-prev { color: rgba(235, 235, 245, 0.38); } }
.set-input {
  width: 100%;
  height: 36px;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  background: var(--fill);
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  padding: 0 2px;
}
.set-input::placeholder { color: var(--text-3); font-weight: 500; }
@media (prefers-color-scheme: dark) { .set-input::placeholder { color: rgba(235, 235, 245, 0.34); } }
.set-input:focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.set-input.invalid { box-shadow: inset 0 0 0 1.5px var(--red); }
.set-row.done .set-input { background: transparent; }
.rpe-cell {
  height: 36px;
  border-radius: 9px;
  background: var(--fill);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}
.rpe-cell.placeholder { color: var(--text-3); font-weight: 500; }
.rpe-cell[class*="rpe-"]:not(.placeholder) { background: var(--rpe-soft); color: var(--rpe); }
.check-cell { position: relative; display: flex; justify-content: center; }
.check-btn {
  width: 40px;
  height: 36px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--text-3);
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.check-btn:active { transform: scale(0.92); }
.set-row.done .check-btn { background: var(--green); color: #fff; }
.pr-badge {
  position: absolute;
  top: -7px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 1px 4px 1px 3px;
  border-radius: 6px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@media (prefers-color-scheme: dark) { .pr-badge { color: #1A1300; } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.swipe-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 84px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}
.set-wrap:not(.swiped) .swipe-delete { visibility: hidden; }
.add-set {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 24px);
  margin: 8px 12px 6px;
  height: 40px;
  border-radius: 10px;
  background: var(--fill);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.add-set:active { background: var(--fill-2); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.danger-ink { color: var(--red); }
.sheet-input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  font-size: 17px;
}
@media (prefers-color-scheme: dark) { .sheet-input { background: var(--elevated); } }

/* rest timer bar */
.rest-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0 12px calc(var(--safe-bottom) + 10px);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s 0.3s;
}
.rest-bar.show { transform: none; visibility: visible; transition-delay: 0s; }
body:not([data-tab="active"]) .rest-bar { bottom: var(--tabbar-h); padding-bottom: 10px; }
body.has-live-bar:not([data-tab="active"]) .rest-bar { bottom: calc(var(--tabbar-h) + 52px); }
.rest-track { height: 3px; margin: 0 -12px 10px; background: var(--fill); overflow: hidden; }
.rest-fill { height: 100%; background: var(--accent); transform-origin: left; transition: transform 0.25s linear; }
.rest-row { display: grid; grid-template-columns: 64px 1fr 64px 72px; gap: 8px; align-items: center; max-width: 560px; margin: 0 auto; }
.rest-center { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rest-time { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
.rest-label { font-size: 12px; color: var(--text-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-btn { height: 46px; border-radius: 12px; background: var(--fill); font-size: 16px; font-weight: 600; text-align: center; }
.rest-btn:active { background: var(--fill-2); }
.rest-btn.skip { background: var(--accent); color: var(--accent-ink); }

/* "workout in progress" bar above the tab bar */
.live-bar {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--tabbar-h) + 6px);
  z-index: 35;
  display: none;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px 0 14px;
  max-width: 664px;
  margin: 0 auto;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
.live-bar.show { display: flex; }
body.has-live-bar .view { padding-bottom: calc(var(--tabbar-h) + 90px); }
.live-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; animation: pulse 1.6s ease-in-out infinite; }
.resume-card .live-dot { background: var(--green); }
@keyframes pulse { 50% { opacity: 0.35; } }
.resume-card { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px; text-align: left; box-shadow: inset 0 0 0 1.5px var(--green), var(--shadow); }
.resume-title { display: block; font-weight: 600; }
.resume-sub { display: block; font-size: 14px; color: var(--text-2); }

/* summary */
.summary-view { padding-top: calc(var(--safe-top) + 28px); }
.summary-hero { text-align: center; margin-bottom: 22px; }
.summary-hero h1 { font-size: 28px; margin: 14px 0 4px; }
.summary-hero p { margin: 0; }
.summary-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-stat { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column-reverse; gap: 2px; box-shadow: var(--shadow); }
.summary-stat .stat-val { font-size: 24px; }
.summary-stat.pr .stat-val { color: var(--gold); }
.pr-row { gap: 12px; }
.pr-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(233, 164, 0, 0.16); color: var(--gold); flex: none; }
.pr-ex { display: block; font-weight: 500; }
.pr-val { font-weight: 600; font-size: 15px; }
.summary-done { margin-top: 24px; }

/* ---------- history ---------- */

.section-count { font-size: 13px; color: var(--text-2); margin-bottom: 3px; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: transform 0.1s;
}
.history-card:active { transform: scale(0.985); }
.history-head { display: flex; align-items: flex-start; gap: 10px; }
.history-name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.history-date { font-size: 14px; color: var(--text-2); margin-top: 1px; }
.history-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 10px; }
.history-meta span { font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--fill); }
.history-lines { display: flex; flex-direction: column; gap: 4px; border-top: 0.5px solid var(--sep); padding-top: 10px; }
.history-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.history-ex { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.history-best { color: var(--text-2); flex: none; }
.history-more { font-size: 13px; color: var(--text-2); }
.pr-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(233, 164, 0, 0.16);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  flex: none;
}
.summary-grid.compact { gap: 8px; margin-bottom: 4px; }
.summary-grid.compact .summary-stat { padding: 10px 14px; }
.summary-grid.compact .stat-val { font-size: 20px; white-space: nowrap; }
.workout-note { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; color: var(--text-2); margin: 12px 0 0; }
.detail-card { background: var(--surface); border-radius: 18px; margin-top: 12px; box-shadow: var(--shadow); overflow: hidden; }
.detail-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px 8px; text-align: left; }
.detail-head > .ic:last-child { color: var(--text-3); }
.detail-name { font-weight: 600; color: var(--accent); }
.detail-note { margin: 0 14px 6px; font-size: 14px; font-style: italic; color: var(--text-2); }
.detail-sets { padding: 0 0 6px; }
.detail-set { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px 0 6px; }
.detail-set:nth-child(odd) { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .detail-set:nth-child(odd) { background: rgba(255, 255, 255, 0.03); } }
.detail-set .set-num { width: 32px; flex: none; }
.detail-set.undone { opacity: 0.45; }
.detail-val { font-weight: 600; font-size: 16px; }
.detail-actions { margin-top: 18px; }
.workout-view.past .workout-head { padding-top: 2px; }

/* ---------- charts ---------- */

.seg {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
}
.seg button {
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  padding: 0 6px;
  transition: background 0.15s;
}
.seg button.on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
@media (prefers-color-scheme: dark) { .seg button.on { background: #636366; } }
.seg.small button { height: 28px; font-size: 13px; }
.chart-card { padding: 12px 12px 12px; }
.chart-card .card-head { padding: 2px 4px 0; margin-bottom: 4px; }
.chart-seg { margin-bottom: 4px; }
.chart-body { min-height: 190px; }
.chart-empty { height: 190px; display: grid; place-items: center; margin: 0; color: var(--text-2); font-size: 15px; }
.chart { position: relative; width: 100%; user-select: none; -webkit-user-select: none; }
.chart-svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--sep); stroke-width: 1; shape-rendering: crispEdges; }
.chart-base { stroke: var(--text-3); stroke-width: 1; shape-rendering: crispEdges; }
.chart-axis { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-label { fill: var(--text); font-size: 12.5px; font-weight: 600; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--accent); opacity: 0.1; }
.chart-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart-dot.small { stroke-width: 1.5; }
.chart-dot.hot { stroke-width: 2.5; }
.chart-cross { stroke: var(--text-3); stroke-width: 1; }
.chart-col { fill: var(--accent); opacity: 0.38; transition: opacity 0.15s; }
.chart-col.current, .chart-col.hot { opacity: 1; }
.chart-tip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--elevated);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  font-size: 12.5px;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .chart-tip { background: #3A3A3C; } }
.chart-tip-title { color: var(--text-2); }
.chart-tip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-caption { margin: 6px 4px 0; font-size: 12px; color: var(--text-2); }
.volume-card { margin-top: 14px; }

/* exercise page */
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.record-tile { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.record-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); }
.record-value { font-size: 22px; font-weight: 700; font-variant-numeric: proportional-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-sub { font-size: 13px; color: var(--text-2); }
.session-list { display: flex; flex-direction: column; gap: 10px; }
.session-card { display: block; width: 100%; text-align: left; background: var(--surface); border-radius: 16px; padding: 12px 0 6px; box-shadow: var(--shadow); }
.session-card:active { transform: scale(0.985); }
.session-head { display: flex; align-items: flex-start; gap: 10px; padding: 0 14px 6px; }
.session-date { display: block; font-weight: 600; }
.session-date::first-letter { text-transform: uppercase; }
.session-name { display: block; font-size: 14px; color: var(--text-2); }
.session-1rm { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 3px 8px; border-radius: 7px; background: var(--fill); flex: none; }
.session-set { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 14px 0 6px; font-weight: 500; }
.session-set:nth-child(odd) { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .session-set:nth-child(odd) { background: rgba(255, 255, 255, 0.03); } }
.session-set .set-num { width: 32px; flex: none; }
