:root {
  --bg: #0c0e12;
  --bg-elevated: #12161c;
  --surface: #171c24;
  --surface-2: #1e2530;
  --border: #2b3442;
  --border-soft: #232b38;
  --text: #eef1f5;
  --muted: #8b95a8;
  --accent: #5eead4;
  --accent-2: #2dd4bf;
  --accent-dim: rgba(94, 234, 212, 0.14);
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "DM Sans", system-ui, sans-serif;
  --tab-h: 3.9rem;
  --dock-h: 4.5rem;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1040px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #15202f 0%, var(--bg) 55%);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  padding-top: env(safe-area-inset-top, 0px);
}

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.65rem;
  flex: 1;
  justify-content: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.25rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent-2);
}

.panel {
  padding: 2.75rem 0 1.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.panel:last-of-type {
  border-bottom: none;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.panel-desc {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero {
  padding-top: 2.25rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.lede {
  margin: 0 0 1.35rem;
  color: var(--muted);
  max-width: 54ch;
  font-size: 1.02rem;
}

.meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.macro-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.macro-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.macro-card strong,
.stat-card__value {
  display: block;
  font-size: 1.45rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.macro-card span,
.stat-card__label {
  font-size: 0.78rem;
  color: var(--muted);
}

.stat-card__hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-card--accent {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    var(--surface)
  );
}

.data-table td.num {
  font-family: var(--mono);
  font-size: 0.86rem;
}

.delta-up {
  color: #34d399;
}
.delta-down {
  color: #f87171;
}
.delta-flat {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.card--flat {
  box-shadow: none;
}

.sport-measures {
  margin-bottom: 1.25rem;
}

.sport-weeks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sport-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.sport-week h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.sport-block {
  margin-top: 1rem;
}

.sport-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.sport-notes {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.sport-week .data-table {
  font-size: 0.88rem;
}

.card--wide {
  grid-column: 1 / -1;
}

.stats-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 720px) {
  .stats-layout {
    grid-template-columns: 1fr;
  }
  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}

.bar-row {
  display: grid;
  grid-template-columns: 3rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
}

.bar-row__label,
.bar-row__val {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.bar-row__val {
  text-align: right;
  color: var(--accent);
}

.bar-row__track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.bar-row__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 99px;
}

.activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 120px;
  padding-top: 0.5rem;
  overflow-x: auto;
}

.activity-col {
  flex: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 110px;
}

.activity-col__bar {
  width: 100%;
  margin-top: auto;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
  border-radius: 6px 6px 2px 2px;
  min-height: 6px;
}

.activity-col__lbl {
  font-size: 0.62rem;
  color: var(--muted);
}

.spark__label {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.spark__svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.data-table thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody th {
  font-weight: 500;
}

.data-table td {
  font-variant-numeric: tabular-nums;
}

.prose {
  font-size: 0.95rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose a {
  color: var(--accent);
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.fold {
  margin-top: 1rem;
  color: var(--muted);
}

.fold summary {
  cursor: pointer;
  padding: 0.35rem 0;
}

.notes-stack > article {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.notes-stack h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.95rem;
}

.journal-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 700px) {
  .journal-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.journal-tools {
  width: min(100%, 340px);
}

.journal-filters {
  display: flex;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
}

.journal-filters select {
  flex: 1;
  font: inherit;
  font-size: 16px;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

#journal-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.session {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.session--user {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: linear-gradient(135deg, var(--accent-dim), var(--surface) 40%);
}

.session summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.session summary::-webkit-details-marker {
  display: none;
}

.session__path {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
}

.session__body {
  padding: 0 0.9rem 0.85rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.88rem;
}

.badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.lift-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lift-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #042f2e;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.btn-ghost,
.btn-xs {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.25rem;
}

.btn-ghost:hover,
.btn-xs:hover {
  color: var(--danger);
}

.session-del {
  display: block;
  margin: 0 0.9rem 0.6rem;
}

.note-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.chip {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}

.chip.is-active {
  color: #042f2e;
  background: var(--accent);
  border-color: var(--accent);
}

.note-form {
  margin-bottom: 1rem;
}

.note-form__row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.75rem;
}

.notes-list {
  display: grid;
  gap: 0.75rem;
}

.note-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.note-card__head .btn-ghost {
  margin-left: auto;
}

.note-card__body {
  margin: 0;
  white-space: normal;
  color: var(--text);
}

@media (max-width: 640px) {
  .note-form__row {
    grid-template-columns: 1fr;
  }
}

.now-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.now-review {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.now-review__head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.now-review__head p,
.now-verdict p,
.now-question p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.now-verdicts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.now-verdict {
  padding: 0.9rem 1rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.now-verdict h3 {
  margin: 0;
  font-size: 1rem;
}

.now-verdict--keep {
  border-top: 3px solid #34d399;
}

.now-verdict--wait {
  border-top: 3px solid #fbbf24;
}

.now-verdict--test {
  border-top: 3px solid var(--accent);
}

.now-verdict ul,
.now-review ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.now-verdict li + li,
.now-review li + li {
  margin-top: 0.4rem;
}

.now-question {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.now-question p {
  color: var(--text);
  font-size: 1.05rem;
}

.now-checks {
  list-style: none;
  padding-left: 0;
}

.now-checks li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.now-checks span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.now-log {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.now-log h4 {
  margin: 0;
  font-size: 0.95rem;
}

.now-log p,
.now-review .card > p {
  margin: 0.35rem 0 0;
}

.now-review .card > p + p {
  margin-top: 0.65rem;
}

.now-disclaimer {
  margin: 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.now-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.now-fact {
  padding: 0.85rem 0 0.9rem;
  border-top: 2px solid var(--accent);
}

.now-fact strong,
.now-fact span {
  display: block;
}

.now-fact strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.now-fact span {
  color: var(--accent);
  font-size: 0.82rem;
}

.now-fact p,
.now-exercise p,
.now-light p,
.now-limits p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.now-columns {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1rem;
}

.now-limits {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.now-limits ul,
.now-evidence,
.now-layout ol,
.now-layout ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.now-limits li + li,
.now-evidence li + li,
.now-layout ol li + li {
  margin-top: 0.4rem;
}

.now-session__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.now-session__head h3 {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
}

.now-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.now-switch__btn {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  color: var(--muted);
  background: transparent;
}

.now-switch__btn.is-active {
  color: #042f2e;
  background: var(--accent);
  font-weight: 700;
}

.now-weeks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1rem 0;
}

.now-weeks p {
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.now-weeks strong {
  display: inline-block;
  min-width: 2.4rem;
  color: var(--accent);
}

.now-exercises {
  display: flex;
  flex-direction: column;
}

.now-exercise {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-soft);
}

.now-exercise h3 {
  margin: 0;
  font-size: 1rem;
}

.now-exercise__index {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.now-exercise__dose {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.25rem;
}

.now-exercise__dose span {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.now-exercise__dose span:last-child {
  color: var(--accent);
}

.now-run {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.now-timer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-dim);
}

.now-timer[hidden] {
  display: none;
}

.now-timer__clock {
  margin: 0;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.now-timer p {
  margin: 0;
}

.now-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.now-set {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  min-width: 7.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.now-set__n {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.now-set__load {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.now-set__reps {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.now-set.is-next {
  border-color: var(--accent);
}

.now-set.is-done {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-elevated));
  color: var(--muted);
}

.now-set.is-done .now-set__load {
  text-decoration: line-through;
}

.now-set:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .now-timer {
    grid-template-columns: 1fr auto;
  }

  .now-timer p:not(.now-timer__clock) {
    grid-column: 1 / -1;
  }
}

.now-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.45rem 0 0;
}

.now-links a {
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.now-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.now-links span {
  color: var(--muted);
  font-size: 0.72rem;
}

.now-lights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.now-light {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.now-light strong {
  display: block;
}

.now-light--go {
  border-top: 3px solid #34d399;
}

.now-light--slow {
  border-top: 3px solid #fbbf24;
}

.now-light--stop {
  border-top: 3px solid var(--danger);
}

.now-switch__btn:focus-visible,
.nav a:focus-visible,
.nav-mobile a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .now-facts,
  .now-columns,
  .now-lights,
  .now-verdicts {
    grid-template-columns: 1fr;
  }

  .now-checks li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .now-switch {
    width: 100%;
  }
}

body.has-mobile-nav {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-nav:has(#now:not([hidden]) .floor-dock) {
  padding-bottom: calc(var(--tab-h) + var(--dock-h) + env(safe-area-inset-bottom, 0px));
}

.nav-mobile {
  display: block;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-soft);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.archive-nav {
  position: sticky;
  top: 3.35rem;
  z-index: 20;
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.85rem 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border-soft);
}

.archive-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
}

.archive-nav a:hover,
.archive-nav a.is-active {
  color: var(--accent);
}

.now-note {
  margin: 0.85rem 0 0;
  max-width: 68ch;
}

.now-block + .now-block {
  margin-top: 1.25rem;
}

.now-block__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-top: 0.35rem;
}

.now-block__head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.now-block__head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-mobile__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: 0 auto;
}

body.has-private .nav-mobile__inner {
  grid-template-columns: repeat(5, 1fr);
}

body.has-private .nav-mobile a {
  font-size: 0.72rem;
}

.save-status {
  margin: 0;
  flex: 1;
  font-size: 0.82rem;
  color: var(--muted);
}

.save-status.is-error {
  color: #e15b64;
}

.nav-mobile a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin: 0.32rem 0.18rem;
  padding: 0.15rem 0.1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.nav-mobile a.is-active {
  color: var(--accent);
}

.nav-mobile__fab {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent) !important;
}

.panel--floor {
  padding-top: 0.85rem;
}

#now.panel {
  padding-top: 1.15rem;
  scroll-margin-top: 3.4rem;
}

#now .panel-head {
  margin-bottom: 0.75rem;
}

.floor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(100%, 32rem);
  margin-inline: auto;
}

.floor-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
}

.floor-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  max-width: 16rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.floor-switch__btn {
  min-height: 3.15rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.floor-switch__btn.is-active {
  background: var(--accent);
  color: #042f2e;
}

.floor-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.floor-count span {
  color: var(--text);
  font-size: 1.85rem;
}

.floor-session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.floor-clock {
  margin: 0 0 0 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.floor-clock.is-paused {
  color: var(--muted);
}

.floor-session__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.floor-session__actions .btn {
  min-height: 2.75rem;
  touch-action: manipulation;
}

.floor-session__note {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.floor-focus,
.floor-ban,
.plate-role,
.plate-cue,
.floor-rules p,
.sheet-note {
  margin: 0;
  color: var(--muted);
}

.floor-ban {
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip,
.check-row,
.plate-set,
.queue-row,
.floor-reset,
#btn-skip-rest {
  font: inherit;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.chip strong {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.chip.is-done,
.check-row.is-done,
.queue-row.is-done {
  background: var(--accent-dim);
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.4rem;
  padding: 0.55rem 0.8rem;
  text-align: left;
  border: 1px solid color-mix(in srgb, #fbbf24 55%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, #fbbf24 8%, var(--surface));
}

.check-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.check-row strong {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.plate {
  scroll-margin-top: 4.5rem;
}

.plate h2 {
  margin: 0.15rem 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.plate-hero {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  margin: 0.35rem 0 0.15rem;
}

.plate-kg {
  font-family: var(--mono);
  font-size: clamp(4.4rem, 20vw, 7rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.plate-kg--word {
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.plate-hero__side {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.35rem;
  color: var(--muted);
}

.plate-hero__reps {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.7rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.plate-sets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr));
  gap: 0.5rem;
}

.plate-set {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-height: 5.4rem;
  padding: 0.55rem 0.7rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.plate-set__hit {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  padding: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.plate-set__n,
.plate-set__weight,
.plate-set__meta {
  position: relative;
  z-index: 1;
}

.plate-set__n,
.plate-set__meta {
  pointer-events: none;
}

.plate-set__n {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.plate-set__num {
  font-family: var(--mono);
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plate-set__weight {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: var(--mono);
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: text;
  appearance: textfield;
}

.plate-set__weight::-webkit-outer-spin-button,
.plate-set__weight::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.plate-set__weight::placeholder {
  color: inherit;
  opacity: 1;
}

.plate-set__weight--word {
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.15;
}

.plate-set__num--word {
  font-size: 1.05rem;
  line-height: 1.15;
}

.plate-set__meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.plate-set.is-next {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.plate-set.is-done {
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elevated));
}

.plate-set:focus-visible,
.plate-set__hit:focus-visible,
.plate-set__weight:focus-visible,
.chip:focus-visible,
.check-row:focus-visible,
.queue-row:focus-visible,
.floor-switch__btn:focus-visible,
.floor-session__actions .btn:focus-visible,
.floor-reset:focus-visible,
#btn-skip-rest:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plate-links summary,
.floor-rules summary,
.sheet-more summary {
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.queue {
  display: flex;
  flex-direction: column;
}

.queue-row {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  grid-template-areas:
    "n name count"
    "n dose count";
  column-gap: 0.65rem;
  align-items: center;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.4rem 0;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--border-soft);
  background: transparent;
}

.queue-row__n { grid-area: n; color: var(--accent); font-weight: 700; }
.queue-row__name { grid-area: name; }
.queue-row__dose { grid-area: dose; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.queue-row__count { grid-area: count; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }

.chip--rope {
  align-self: flex-start;
}

.floor-timer {
  position: fixed;
  z-index: 40;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 0.45rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem 0.9rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: #083833;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.floor-timer[hidden] {
  display: none;
}

.floor-timer__clock {
  margin: 0;
  font-family: var(--mono);
  font-size: 2.8rem;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.floor-timer p {
  margin: 0;
}

#now-timer-note {
  font-size: 0.92rem;
  line-height: 1.25;
}

.chip--check {
  border-color: color-mix(in srgb, #fbbf24 65%, var(--border));
  background: color-mix(in srgb, #fbbf24 10%, var(--surface));
}

#btn-skip-rest {
  min-width: 5.6rem;
  min-height: 3.2rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #042f2e;
  font-weight: 700;
}

body.is-resting,
body.has-mobile-nav.is-resting {
  padding-bottom: calc(12.5rem + env(safe-area-inset-bottom, 0px));
}

.floor-rules {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.floor-lights {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.floor-light {
  margin: 0;
}

.floor-light strong {
  font-variant-numeric: tabular-nums;
}

.floor-light--go strong { color: #34d399; }
.floor-light--slow strong { color: #fbbf24; }
.floor-light--stop strong { color: var(--danger); }

.floor-weeks p {
  margin: 0.25rem 0 0;
}

.floor-reset {
  align-self: flex-start;
  min-height: 2.75rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sheet {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.sheet-head h2,
.sheet-title {
  margin: 0;
  letter-spacing: -0.03em;
}

.sheet-head h2 { font-size: 1.35rem; }
.sheet-title { font-size: 1.05rem; margin-top: 0.4rem; }

.sheet-head p,
.decisions,
.open-list,
.sheet-more__body p,
.sheet-more__body ul {
  margin: 0;
}

.decisions,
.open-list,
.sheet-more__body ul {
  padding-left: 1.1rem;
}

.decisions li + li,
.open-list li + li,
.sheet-more__body li + li,
.sheet-more__body p + p {
  margin-top: 0.45rem;
}

.sheet-ask {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.kg-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.kg-chart__lift h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.kg-chart__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  align-items: end;
}

.kg-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.kg-col__track {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 2.6rem;
  height: 7.2rem;
  background: var(--surface-2);
  border-radius: 6px 6px 2px 2px;
  overflow: hidden;
}

.kg-col__bar {
  width: 100%;
  background: var(--accent);
}

.kg-col__val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.kg-col__date {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.vol {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vol__row {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr) 1.4rem;
  gap: 0.5rem;
  align-items: center;
}

.vol__row span:last-child {
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.vol__track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.vol__fill {
  height: 100%;
  background: var(--accent);
}

.log-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.log-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.log-table th,
.log-table td {
  padding: 0.55rem 0.7rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.log-table thead th {
  color: var(--muted);
  font-weight: 500;
}

.log-table tbody th {
  position: sticky;
  left: 0;
  background: var(--bg);
  font-weight: 650;
}

.sheet-more__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.4rem;
}

@media (max-width: 768px) {
  .kg-chart {
    grid-template-columns: 1fr;
  }

  .check-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.lib-shell {
  display: flex;
  align-items: flex-start;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.lib-sidebar {
  width: 168px;
  flex: 0 0 168px;
  padding: 0.65rem 0.7rem 0.8rem 0.55rem;
  border-right: 1px solid var(--border-soft);
}

.lib-shell.is-detail .lib-sidebar {
  width: 196px;
  flex-basis: 196px;
}

.lib-main {
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.75rem;
}

.lib-model {
  margin-bottom: 0.7rem;
}

.lib-model summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
}

.lib-side-stack {
  display: flex;
  flex-direction: column;
  margin-top: 0.55rem;
}

.lib-side-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
}

.lib-side-btn + .lib-side-btn {
  border-top: none;
}

.lib-side-btn.is-active,
.lib-nav-item.is-active {
  color: var(--text);
  background: var(--accent-dim);
}

.lib-model-blurb {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.lib-layer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.55rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.lib-layer select,
#lib-search {
  width: 100%;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.lib-granularity {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.lib-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lib-nav-title {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
}

.lib-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  padding: 0.38rem 0.45rem;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lib-nav-item--sm {
  font-size: 0.76rem;
  line-height: 1.3;
}

.lib-nav-item.is-active {
  border-left-color: var(--accent);
}

.lib-query {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border-soft);
  background: var(--surface);
}

.lib-query strong {
  display: block;
  font-size: 0.88rem;
}

.lib-query span {
  color: var(--muted);
  font-size: 0.78rem;
}

.lib-pick {
  margin-bottom: 0.7rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.lib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lib-chip {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lib-chip.is-on {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.lib-pick-fold {
  margin: 0.75rem 0 0;
}

.lib-pick-fold summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--muted);
}

.lib-pick__sep {
  margin-top: 0.65rem;
}

.lib-boost {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
}

.lib-more {
  width: 100%;
  margin-top: 0.35rem;
}

.lib-more summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
}

.lib-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.7rem;
}

.lib-rows .lib-section-title {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.lib-section-title {
  margin: 0.45rem 0 0.15rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.lib-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.lib-toggle,
.lib-filters,
.lib-stage__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.lib-toggle .is-active {
  color: var(--accent);
  border-color: var(--accent-2);
}

.lib-body {
  width: 100%;
  height: 460px;
  margin: 0.75rem 0;
  border-radius: 12px;
  background: #10141b;
  overflow: hidden;
  touch-action: none;
}

.lib-body--hero {
  height: 420px;
  margin: 0;
}

.lib-body canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.lib-map__label {
  min-height: 1.2em;
  margin: 0.2rem 0 0.45rem;
  font-size: 0.85rem;
}

.lib-pains {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--muted);
}

.lib-pains li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
}

.lib-stage img,
.lib-stage video {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: #10141b;
  border-radius: 6px;
}

.lib-media-filters,
.lib-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.lib-media-filter,
.lib-lang__btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.lib-media-filter.is-active,
.lib-lang__btn.is-active {
  background: var(--accent-dim);
  color: var(--accent-2);
  border-color: transparent;
}

.lib-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.lib-filters input,
.lib-filters select {
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
}

.lib-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.lib-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.lib-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #10141b;
  overflow: hidden;
}

.lib-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-card__media--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.lib-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.65rem;
  min-width: 0;
}

.lib-card__title {
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-card__gear,
.lib-card__muscles {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-card__badge {
  align-self: flex-start;
  margin: 0 0.65rem 0.65rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lib-card__empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  color: var(--muted);
  font-size: 0.78rem;
}

.lib-stage img,
.lib-stage video {
  max-height: 460px;
  object-fit: contain;
}

.lib-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lib-tags span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-dim);
  font-size: 0.78rem;
}

.lib-steps h3 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
}

.lib-steps h3 span,
.lib-credit {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.lib-credit a {
  color: var(--accent);
}

@media (max-width: 768px) {
  .lib-layout,
  .lib-shell {
    display: flex;
    flex-direction: column;
  }
  .lib-sidebar,
  .lib-shell.is-detail .lib-sidebar {
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .lib-main {
    display: flex;
    flex-direction: column;
  }
  [data-lib-query] { order: 1; }
  #lib-search { order: 2; }
  .lib-rows { order: 3; }
  .lib-pick-fold { order: 4; }
  .lib-body.lib-body--hero {
    order: 5;
    height: 240px;
    margin-top: 1rem;
  }
  .lib-credit { order: 6; }
  .lib-nav {
    max-height: 8.75rem;
    overflow: auto;
  }
}

.sched-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sched-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.92rem;
  cursor: pointer;
}

.sched-toggle input {
  margin-top: 0.2rem;
}

.sched-meta {
  margin-bottom: 1rem;
}

.sched-meta__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 720px) {
  .sched-meta__row {
    grid-template-columns: 1fr;
  }
}

.sched-meta label,
.sched-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.sched-input {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
}

.sched-input--grow {
  flex: 1;
  min-width: 0;
}

.sched-input--role {
  max-width: 8.5rem;
}

.sched-input--sm {
  max-width: 5rem;
}

.sched-input--xs {
  max-width: 4.5rem;
}

.sched-days__tabs {
  margin-bottom: 0.75rem;
}

.sched-day__head {
  display: grid;
  grid-template-columns: auto 1fr 1.4fr auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .sched-day__head {
    grid-template-columns: 1fr 1fr;
  }
  .sched-day__rm {
    grid-column: 1 / -1;
  }
}

.sched-exercises {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.sched-ex__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.sched-ex__n {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 1.5rem;
}

.sched-sets {
  margin: 0.5rem 0;
}

.sched-sets__title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.sched-set {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.sched-set__n {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  width: 1.2rem;
}

.sched-set__del {
  padding-inline: 0.35rem;
  min-width: 2rem;
}

.sched-strip {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.85rem;
  margin-bottom: 0.5rem;
  scrollbar-width: thin;
}

.sched-strip__item {
  flex: 0 0 auto;
  width: 7.25rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.4rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sched-strip__item:hover {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.sched-strip__media {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 0.35rem;
}

.sched-strip__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sched-strip__ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--muted);
}

.sched-strip__n {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.sched-strip__name {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
  margin-top: 0.15rem;
  max-height: 2.5em;
  overflow: hidden;
}

.sched-strip__dose {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.sched-exercises--visual {
  gap: 1rem;
}

.sched-ex__layout {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 640px) {
  .sched-ex__layout {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.65rem;
  }
}

.sched-ex__thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.sched-ex__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sched-ex__thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted);
}

.sched-ex__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
}

.sched-pill {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--muted);
}

.sched-pill--accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-soft));
  background: var(--accent-dim);
}

.sched-pill--muted {
  font-size: 0.74rem;
}

.sched-ex__details {
  margin-top: 0.35rem;
}

.sched-ex__details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  user-select: none;
}

.sched-ex--highlight {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.sched-field--inline {
  max-width: 10rem;
}

.sched-fold-hint {
  margin: 0 0 0.75rem;
}

.sched-picker {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.sched-picker.is-open {
  display: flex;
}

.sched-picker__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.sched-picker__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 52rem);
  max-height: min(85vh, 720px);
  overflow: auto;
  padding: 1rem;
}

.sched-picker__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.sched-picker__search {
  margin-bottom: 0.85rem;
}

.sched-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.65rem;
}

.sched-pick {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sched-pick:hover {
  border-color: var(--accent-2);
}

.sched-pick__media {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  display: block;
}

.sched-pick__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sched-pick__empty {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 0.72rem;
  color: var(--muted);
}

.sched-pick__title {
  font-size: 0.76rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

.sched-day__caption {
  margin: 0 0 0.25rem;
}

.floor-title {
  margin: 0.2rem 0 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.floor-focus,
.floor-day {
  margin: 0;
  color: var(--muted);
}

.floor-day {
  font-weight: 700;
  color: var(--text);
  font-size: 1.15rem;
}

.ready-list,
.done-list {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ready-row,
.done-list li,
.set-line {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 3rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.ready-row__dose,
.done-list li {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.done-list li {
  display: block;
}

.done-list strong {
  color: var(--text);
}

.set-line {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.set-line.is-next {
  border-color: var(--accent);
}

.set-line.is-done {
  opacity: 0.55;
}

.set-lines {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.steppers {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.8rem 0;
}

.stepper {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) 4.6rem;
  align-items: center;
  gap: 0.4rem;
}

.stepper button,
.floor-start,
.floor-done {
  min-height: 3.5rem;
  touch-action: manipulation;
}

.stepper button {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}

.stepper__figure {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
}

.stepper__unit,
.stepper__times {
  padding-bottom: 0.55rem;
  color: var(--muted);
  font-weight: 650;
  line-height: 1;
}

.stepper__unit {
  font-size: 1rem;
}

.stepper__times {
  font-family: var(--mono);
  font-size: 1.35rem;
  color: var(--accent);
}

.stepper__value {
  font-family: var(--mono);
  font-weight: 500;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.stepper--weight .stepper__value {
  font-size: clamp(3rem, 16vw, 5.4rem);
}

.stepper--reps .stepper__value {
  font-size: clamp(2rem, 10vw, 3.2rem);
  color: var(--accent);
}

.floor-start,
.floor-done {
  width: 100%;
  margin-top: 0;
  min-height: 3.35rem;
  border-radius: 14px;
  font-size: 1.12rem;
  background: var(--accent);
  box-shadow: none;
}

.floor-dock {
  position: fixed;
  z-index: 45;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 32rem);
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  margin: 0;
  box-sizing: border-box;
  padding: 0.45rem max(1rem, env(safe-area-inset-right, 0px)) 0.55rem max(1rem, env(safe-area-inset-left, 0px));
  background: var(--bg);
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}

body.is-resting .floor-dock {
  visibility: hidden;
  pointer-events: none;
}

.plate-last {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.plate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.plate-head__text {
  min-width: 0;
}

.plate-technique {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.more-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
}

.more-list a,
.more-list button,
.more-back a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.5rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.more-back {
  margin: 0.5rem 0 0;
}

.nav-mobile a.is-active {
  color: var(--text);
  font-weight: 700;
  background: var(--accent-dim);
}

#btn-pause-session {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.ready-list,
.done-list {
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.ready-row,
.done-list li {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
}

.ready-row:last-child,
.done-list li:last-child {
  border-bottom: 0;
}

.plate-head h2 {
  font-size: 1.7rem;
  line-height: 1.12;
}

.plate-cue {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.queue-row {
  min-height: 3.6rem;
}

@media (max-width: 720px) {
  .top {
    display: none;
  }

  body {
    padding-top: env(safe-area-inset-top, 0px);
  }

  body.has-mobile-nav {
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 0.25rem);
  }

  body.has-mobile-nav.is-resting {
    padding-bottom: calc(var(--tab-h) + 7.5rem + env(safe-area-inset-bottom, 0px));
  }

  .floor-count {
    font-size: 1rem;
  }

  .floor-count span {
    font-size: 1.25rem;
  }

  .panel {
    padding: 0.85rem 0 1.1rem;
  }

  #now.panel {
    padding-top: 0.7rem;
    scroll-margin-top: 0;
  }

  h1,
  .floor-title {
    font-size: 1.65rem;
  }

  .floor-switch {
    max-width: none;
    width: 100%;
    padding: 3px;
    border-radius: 14px;
    background: #141922;
  }

  .floor-switch__btn {
    min-height: 2.85rem;
    border-radius: 11px;
    font-size: 1.15rem;
  }

  .set-lines {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.15rem;
  }

  .set-line {
    grid-template-columns: 1fr;
    justify-items: start;
    align-content: center;
    gap: 0.12rem;
    min-height: 4.35rem;
    padding: 0.5rem 0.7rem;
    border-radius: 14px;
  }

  .set-line__dose {
    font-weight: 650;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .stepper {
    grid-template-columns: 4.5rem minmax(0, 1fr) 4.5rem;
  }

  .stepper--weight .stepper__value {
    font-size: clamp(3.4rem, 18vw, 4.8rem);
  }
}

body.is-locked .top,
body.is-locked main,
body.is-locked .nav-mobile {
  display: none;
}

.auth-gate {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

body.is-locked .auth-gate {
  display: flex;
}

.auth-gate__card {
  width: min(100%, 26rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-gate__card h1 {
  margin: 0;
}

.auth-gate__card p {
  margin: 0;
  color: var(--muted);
}

.auth-gate__error {
  min-height: 1.2em;
  color: var(--danger);
}

