:root,
html[data-theme="soft-turquoise"] {
  --bg: rgb(231, 240, 240);
  --bg-elevated: #ffffff;
  --bg-soft: rgb(240, 245, 243);
  --text: rgb(12, 38, 41);
  --muted: #768f8d;
  --border: rgb(177, 204, 202);
  --accent: rgb(204, 229, 227);
  --accent-dark: rgb(177, 204, 202);
  --accent-soft: rgb(204, 229, 227);
  --accent-coral: #e88e61;
  --selected: rgb(12, 38, 41);
  --danger: #e88e61;
  --danger-hover: #d67a4d;
  --link: rgb(107, 189, 200);
  --shadow: 0 8px 20px rgba(12, 38, 41, 0.13);
  --page-bg: linear-gradient(160deg, rgb(240, 245, 243) 0%, rgb(231, 240, 240) 100%);
  --topbar-bg: #ffffff;
  --nav-bg: rgb(12, 38, 41);
  --nav-fg: rgba(255, 255, 255, 0.72);
  --nav-active-bg: rgb(80, 164, 175);
  --nav-active-fg: #ffffff;
  --nav-shadow: 0 16px 32px rgba(17, 20, 19, 0.22);
  --btn-primary-bg: rgb(80, 164, 175);
  --btn-primary-fg: #ffffff;
  --btn-primary-hover-bg: rgb(64, 142, 152);
  --btn-ghost-hover-bg: rgb(240, 245, 243);
  --radius: 14px;
  --radius-sm: 10px;
  --form-gap: 0.7rem;
  --form-actions-gap: 1.35rem;
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --max: 900px;
  --page-max: 900px;
  --nav-height: 72px;
  --touch-min: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html[data-theme="summer-ocean-breeze"] {
  --bg: #e8f4f1;
  --bg-elevated: #ffffff;
  --bg-soft: #f1faee;
  --text: rgb(12, 38, 41);
  --muted: #457b9d;
  --border: #a8dadc;
  --accent: #a8dadc;
  --accent-dark: #457b9d;
  --accent-soft: #d7f0f1;
  --accent-coral: #e88e61;
  --selected: #1d3557;
  --danger: #e88e61;
  --danger-hover: #d67a4d;
  --link: rgb(107, 189, 200);
  --shadow: 0 8px 20px rgba(12, 38, 41, 0.13);
  --page-bg: linear-gradient(160deg, #f1faee 0%, #dceef0 55%, #cfe6ea 100%);
  --topbar-bg: #f1faee;
  --nav-bg: #1d3557;
  --nav-fg: rgba(241, 250, 238, 0.78);
  --nav-active-bg: rgb(80, 164, 175);
  --nav-active-fg: #ffffff;
  --nav-shadow: 0 16px 32px rgba(29, 53, 87, 0.28);
  --btn-primary-bg: rgb(80, 164, 175);
  --btn-primary-fg: #ffffff;
  --btn-primary-hover-bg: rgb(64, 142, 152);
  --btn-ghost-hover-bg: #e3f3f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  background-color: #e7f0f0;
  font-size: 100%; /* 16px baseline */
}

/* Slightly larger type on phones - rem-based UI scales with this. */
@media (max-width: 640px) {
  html {
    font-size: 106.25%; /* ~17px */
  }
}

@media (max-width: 400px) {
  html {
    font-size: 108.5%; /* ~17.4px on very small phones */
  }
}

/* Full-viewport app background (not on start page). Lives on html so short
   pages don't leave a flat strip under a content-height body. */
html:not(:has(body.start-page)) {
  background-color: #eef7f8;
  background-image: url("/images/app-background.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  line-height: 1.5;
  width: 100%;
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  min-height: 100dvh;
  min-height: 100svh;
}

body.start-page {
  max-width: none;
  background: #d4efe9;
  min-height: 100dvh;
  min-height: 100svh;
}

html:has(body.start-page) {
  background: #d4efe9;
}

a {
  color: var(--link);
  text-decoration: none;
}

a.btn,
.btn {
  /* buttons keep their own colors */
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--touch-min);
  padding: calc(0.65rem + var(--safe-top)) calc(1.1rem + var(--safe-right)) 0.65rem calc(1.1rem + var(--safe-left));
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar-bg);
  border-bottom: none;
  box-shadow: var(--shadow);
}

.topbar--dev {
  overflow: hidden;
}

.brand,
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand {
  position: relative;
  font-size: 1.15rem;
  text-decoration: none;
}

.dev-ribbon {
  position: absolute;
  top: 0.58rem;
  left: -1.9rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.25rem;
  height: 1.2rem;
  padding: 0 0 0 0.85em;
  background: var(--danger);
  color: #fff;
  font-family: var(--font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-45deg);
  transform-origin: center;
  box-shadow: 0 1px 4px rgba(12, 38, 41, 0.16);
  pointer-events: none;
  user-select: none;
}

.main-content {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 1.25rem calc(1.1rem + var(--safe-right)) calc(var(--nav-height) + var(--safe-bottom) + 1.5rem) calc(1.1rem + var(--safe-left));
}

.marketing-shell .main-content {
  padding-bottom: 2rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.profile-header__meta {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
  border: 1px solid color-mix(in srgb, var(--btn-primary-bg) 22%, white);
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}

.profile-avatar:has(.profile-avatar__image) {
  border: none;
  box-shadow: var(--shadow);
}

.profile-avatar--lg {
  width: 5.5rem;
  height: 5.5rem;
  font-size: 1.55rem;
}

.profile-avatar--md {
  width: 4rem;
  height: 4rem;
  font-size: 1.15rem;
}

.profile-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__initials {
  line-height: 1;
  letter-spacing: 0.02em;
}

.profile-settings-preview {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-settings-preview__fields {
  flex: 1;
  min-width: 0;
}

.profile-image-remove {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-image-remove .form-check {
  min-height: 0;
}

.exercise-image-preview {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  background: #fff;
  padding: 0;
  border: none;
  cursor: zoom-in;
}

.exercise-image-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.file-field {
  position: relative;
  display: block;
  cursor: pointer;
}

.file-field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-field__face {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  height: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0 0.8rem;
  box-sizing: border-box;
  border: 1px solid rgb(177, 204, 202);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.file-field:hover .file-field__face,
.file-field:focus-within .file-field__face {
  border-color: rgb(103, 184, 177);
  background: rgb(248, 252, 251);
}

.file-field:focus-within .file-field__face {
  outline: 2px solid rgb(204, 229, 227);
}

.file-field__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
}

.file-field__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.file-field.has-file .file-field__text {
  color: var(--text);
  font-weight: 400;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
  padding: 1rem 0 2rem;
}

.hero__content {
  max-width: 28rem;
  margin-inline: auto;
  text-align: center;
}

.hero__icon {
  font-size: 4.7rem;
  color: rgb(17, 20, 19);
  margin: 0 0 1.15rem;
  line-height: 1;
}

.brand-mark {
  font-size: clamp(2rem, 8vw, 3rem);
  margin-bottom: 0.75rem;
}

.hero__title {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.hero__lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero__actions .btn {
  width: min(100%, 18.5rem);
  font-size: 1.18rem;
  min-height: 3.1rem;
  padding: 0.85rem 1.5rem;
}

body.start-page {
  max-width: none;
  background: #d4efe9;
}

.start-page .topbar {
  display: none;
}

.start-page .main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
}

.hero--start {
  --start-tone: #d4efe9;
  --start-fade-height: clamp(3.5rem, 12vw, 6.5rem);
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 0;
  margin: 0;
  background-color: var(--start-tone);
  overflow-x: clip;
}

.hero--start .hero__media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  width: 100%;
  pointer-events: none;
}

.hero--start .hero__media-img {
  display: block;
  width: 100%;
  height: auto;
}

.hero--start .hero__media-fade {
  height: var(--start-fade-height);
  margin-top: calc(var(--start-fade-height) * -1);
  background: linear-gradient(
    to bottom,
    rgba(212, 239, 233, 0) 0%,
    rgba(212, 239, 233, 0.55) 45%,
    var(--start-tone) 100%
  );
}

.hero--start .hero__content {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 2.7rem);
  margin: 0;
  text-align: center;
  padding: calc(1.35rem + 10px + env(safe-area-inset-top, 0px)) 0 1rem;
  padding-left: calc(1.35rem + 10px + env(safe-area-inset-left, 0px));
  padding-right: 1.35rem;
}

.hero--start .hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  font-size: clamp(2.35rem, 9vw, 3.4rem);
}

.hero--start .brand-mark {
  color: var(--text);
  margin: 0 0 0.18em;
  font-size: 1em;
}

.hero--start .brand-mark--stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
}

.hero--start .hero__lead {
  margin: 0;
  width: 100%;
  color: color-mix(in srgb, var(--text) 58%, white);
  font-family: var(--font);
  font-size: 0.4em;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
}

.hero__actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  padding: 1.5rem 1.25rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    to top,
    var(--start-tone, #d4efe9) 0%,
    var(--start-tone, #d4efe9) 58%,
    rgba(212, 239, 233, 0.72) 82%,
    transparent 100%
  );
}

.hero__actions--sticky .btn {
  width: min(100%, 20rem);
}

.panel {
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 0.9rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.panel--empty-message {
  padding: 1.15rem 1.2rem;
  text-align: center;
}

.panel--empty-message > p {
  margin: 0;
}

.panel--empty-message > .actions-row {
  justify-content: center;
  margin-top: 0.85rem;
}

.panel--empty-message > .btn,
.panel--empty-message > a.btn {
  margin-top: 0.85rem;
}

.panel-empty-inline {
  margin: 0.85rem 0 0;
  text-align: center;
}

.panel--accent {
  background: linear-gradient(160deg, #ffffff 0%, var(--accent-soft) 120%);
}

.panel--hero {
  background: var(--text);
  border-color: transparent;
  color: #f4f7f6;
  box-shadow: var(--shadow);
}

.panel--muted {
  opacity: 0.72;
  background: var(--bg-soft);
  box-shadow: none;
}

.panel--hero .panel__title,
.panel--hero .panel__title--hero,
.panel--hero p,
.panel--hero strong {
  color: #f4f7f6;
}

.panel--hero .panel__title--hero,
.panel--hero .panel__title {
  font-size: 1.15rem;
}

.panel--hero .muted {
  color: rgba(244, 247, 246, 0.72);
}

.panel--hero .btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
  gap: 0.7rem;
}

.panel--hero .btn-primary:hover {
  background: var(--btn-primary-hover-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-hover-bg);
}

.panel--hero .btn-primary .fa-arrow-right {
  font-size: 0.95em;
}

.panel--hero .btn-ghost,
.panel--hero .btn-secondary {
  border-color: rgba(244, 247, 246, 0.35);
  color: #f4f7f6;
  background: transparent;
}

.panel--hero .btn-ghost:hover,
.panel--hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
  font-weight: 600;
}

.hero-progress__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgb(204, 229, 227);
  color: rgb(17, 20, 19);
  font-size: 0.85rem;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  min-width: 11rem;
}

.segmented__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--touch-min) - 6px);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.segmented__btn.is-active {
  background: var(--selected);
  color: #fff;
}

.tab-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem;
  box-shadow: var(--shadow);
}

.btn-group,
.seg-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.btn-group > .btn,
.seg-control > .btn {
  flex: 1 1 0;
  min-width: 0;
}

.tab-switch__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--touch-min);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem 0.25rem;
}

.tab-switch__item.is-active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.form-help {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

.generate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.generate-actions .btn {
  flex: 1 1 8rem;
}

.generate-image-actions {
  display: flex;
  justify-content: flex-start;
}

.generate-image-actions .btn {
  width: auto;
  flex: 0 0 auto;
}

.form-row--stack-mobile {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.list-item__count {
  justify-self: center;
}

.list-item__trail {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.list-item__trail .badge-meta {
  margin-left: 0;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.bulk-bar--sticky {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.75rem + var(--safe-bottom) + var(--nav-height) + 0.55rem);
  z-index: 40;
  width: auto;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  padding: 0;
  min-height: 0;
  pointer-events: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
}

body.hide-bottom-nav .bulk-bar--sticky,
body.marketing-shell .bulk-bar--sticky {
  bottom: calc(0.75rem + var(--safe-bottom));
}

.bulk-bar--sticky:has(.bulk-action-btn:not([hidden])),
.bulk-bar--sticky:has(.bulk-delete-btn:not([hidden])) {
  padding: 0;
  pointer-events: none;
}

.bulk-bar--sticky .bulk-action-btn,
.bulk-bar--sticky .bulk-delete-btn {
  width: auto;
  min-height: 3rem;
  pointer-events: auto;
  box-shadow: var(--nav-shadow);
}

.bulk-delete-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.execute-card:focus-within,
.execute-card.is-focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel--tight {
  margin-top: 1.5rem;
}

.panel__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.panel__title-icon {
  margin-right: 0.45rem;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: -0.05em;
}

.panel__head {
  position: relative;
  display: block;
  margin-bottom: 0.5rem;
  padding-right: 0;
  min-height: 0;
}

.today-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--text) 12%, transparent) 18%,
    color-mix(in srgb, var(--text) 12%, transparent) 82%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 1px;
}

.today-empty-copy {
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  font-size: 0.9rem;
}

.today-empty-add {
  flex-shrink: 0;
}

.panel__head .panel__title {
  margin-bottom: 0;
}

.panel__icon {
  position: absolute;
  top: -3px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text);
  background: rgba(17, 20, 19, 0.06);
  pointer-events: none;
}

.panel--hero .panel__icon {
  color: #f4f7f6;
  background: rgba(244, 247, 246, 0.14);
}

.panel--hero .panel__head {
  margin-bottom: 0.5rem;
}

.hero-workout-name {
  margin: 0 0 0.65rem;
  font-size: calc(1.2rem + 2px);
  font-weight: 700;
  color: var(--btn-primary-bg) !important;
}

.panel--hero .hero-workout-name {
  margin: 0;
  line-height: 1.15;
}

.panel--hero .hero-workout-name + .bw-goal-line {
  margin-top: 0.15rem;
}

.panel--hero .goal-badges {
  margin-bottom: 0.75rem;
}

.panel--hero .actions-row {
  margin-top: 0.85rem;
  justify-content: flex-end;
}

.today-workout-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.65rem;
}

.today-workout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-top: none;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 18%,
    rgba(255, 255, 255, 0.18) 82%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 1px;
}

.today-workout:last-child {
  padding-bottom: 0.15rem;
}

.today-workout__main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.today-workout__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.panel--hero .today-workout__name {
  color: var(--btn-primary-bg);
}

.today-workout__meta {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.today-workout__action {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 5.75rem;
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  white-space: nowrap;
}

.panel--hero .today-workout__action.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.panel--hero .today-workout__action.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: #fff;
}

.today-panel-actions {
  justify-content: flex-end;
}

.bw-current {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-top: 0.65rem;
  margin-bottom: 0;
  padding-top: 0.7rem;
  padding-bottom: 0.15rem;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--text) 12%, transparent) 18%,
    color-mix(in srgb, var(--text) 12%, transparent) 82%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 1px;
}

.bw-current__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
}

.bw-current__weight-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 8.2vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.bw-current__weight {
  display: inline-block;
}

.bw-current__action {
  flex-shrink: 0;
  align-self: center;
  margin-top: 0.35rem;
}

.bw-current .badge-meta {
  margin-left: 0;
  margin-bottom: 0;
}

.bw-current__unit {
  font-size: 0.52em;
  font-weight: inherit;
  letter-spacing: inherit;
}

.bw-goal-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--text) 12%, transparent) 18%,
    color-mix(in srgb, var(--text) 12%, transparent) 82%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 1px;
}

.bw-goal-summary__info {
  flex: 1;
  min-width: 0;
}

.bw-goal-summary__weight {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}

.bw-goal-summary__value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bw-goal-summary__unit {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-left: 0.2em;
}

.bw-goal-summary__date {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.bw-goal-summary__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.bw-goal-summary__remaining {
  margin-left: 0;
  margin-bottom: 0;
  font-size: 0.84rem;
  padding: 0.28rem 0.65rem;
}

.bw-goal-summary__days {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: right;
}

.bw-actions {
  justify-content: flex-end;
}

.bw-actions--no-goal {
  margin-top: 1.15rem;
}

.bw-goal-line {
  margin: 0 0 0.45rem;
}

.bw-goal-line__label {
  font-weight: 700;
  color: var(--text);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.7rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat__label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.stat__value--fit {
  font-size: clamp(1rem, 3.8vw, 1.4rem);
  white-space: nowrap;
}

.summary-time {
  text-align: center;
  padding: 1.25rem 1.2rem 1.15rem;
}

.summary-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.summary-header__title-row h1 {
  margin: 0;
  min-width: 0;
}

.summary-date {
  margin: 0;
  flex: 0 0 auto;
}

.summary-time .stat__label {
  margin-bottom: 0.35rem;
}

.summary-time__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.summary-time__avg {
  margin: 0.55rem 0 0;
}

.summary-time__avg-count {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.duration-unit {
  font-family: var(--font);
  font-size: 0.55em;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.duration-unit--inline {
  font-size: 0.85em;
}

.stat__unit {
  font-family: var(--font);
  font-size: 0.55em;
  font-weight: 400;
  color: var(--muted);
}

.stats-row--summary {
  grid-template-columns: 1fr 1fr 1.35fr;
}

.stats-row--summary .stat__value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
  white-space: nowrap;
  font-size: clamp(1.15rem, 4.2vw, 1.4rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: var(--touch-min);
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-sm {
  min-height: 2.15rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
}

.btn-lg {
  min-height: calc(var(--touch-min) + 0.35rem);
  padding: 0.85rem 1.55rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-bg);
  color: var(--btn-primary-fg);
}

.btn-outline {
  background: transparent;
  color: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
}

.btn-outline:hover {
  background: color-mix(in srgb, var(--btn-primary-bg) 12%, white);
  color: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-bg);
}

.btn-secondary,
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--btn-primary-bg);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--btn-ghost-hover-bg);
  color: var(--text);
  border-color: var(--btn-primary-bg);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--danger-hover);
  color: #fff;
}

.btn-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.form-stack {
  display: grid;
  gap: var(--form-gap);
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 0.95rem;
  box-shadow: var(--shadow);
}

.settings-stack {
  display: grid;
  gap: var(--form-gap);
}

.settings-stack > .btn-primary[type="submit"] {
  margin-top: 0;
}

.settings-stack .panel,
.settings-stack .form-stack > .panel {
  margin-bottom: 0;
}

.form-stack--nested,
.panel .form-stack,
.form-stack:has(> .panel) {
  box-shadow: none;
  background: transparent;
  padding: 0.85rem 0 0;
  border-radius: 0;
}

.form-stack:has(> .panel) {
  padding: 0;
  gap: var(--form-gap);
}

/* Formulärfält i panel (t.ex. inställningar) får samma avstånd som form-stack */
.panel:has(> .form-group),
.panel:has(> .form-check) {
  display: grid;
  gap: var(--form-gap);
  align-content: start;
}

.form-group {
  display: grid;
  gap: 0.35rem;
}

.form-group label,
.form-check-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-control {
  width: 100%;
  border: 1px solid rgb(177, 204, 202);
  border-radius: var(--radius-sm);
  min-height: var(--touch-min);
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1rem; /* avoid iOS zoom on focus */
  background: #fff;
  color: var(--text);
}

.input-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
}

.input-with-unit__label {
  font-weight: 600;
  color: var(--muted);
  min-width: 1.5rem;
}

.weight-stepper {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  padding-top: 0.55rem;
}

.weight-stepper:not(:has(.weight-stepper__badge)) {
  padding-top: 0.15rem;
}

.weight-stepper__field {
  position: relative;
  flex: 0 1 6.25rem;
  min-width: 5rem;
}

.weight-stepper__input {
  padding-right: 2.15rem;
  font-size: 0.95rem;
}

.weight-stepper__unit {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.weight-stepper__controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.weight-stepper__pair {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
  overflow: visible;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
}

.weight-stepper__pair--primary {
  border-color: color-mix(in srgb, var(--btn-primary-bg) 22%, white);
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
}

.weight-stepper__badge {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  pointer-events: none;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--text);
  color: var(--text);
}

.weight-stepper__btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.weight-stepper__btn:first-of-type {
  border-radius: 999px 0 0 999px;
}

.weight-stepper__btn:last-of-type {
  border-radius: 0 999px 999px 0;
}

.weight-stepper__pair--primary .weight-stepper__btn {
  color: var(--text);
}

.weight-stepper__pair--primary .weight-stepper__btn:hover {
  background: color-mix(in srgb, var(--btn-primary-bg) 22%, white);
}

.weight-stepper__pair--ghost .weight-stepper__btn {
  color: var(--text);
}

.weight-stepper__pair--ghost .weight-stepper__btn:hover {
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
}

.weight-stepper__controls--round {
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.weight-stepper__btn--round {
  flex: 0 0 auto;
  width: var(--touch-min);
  min-width: var(--touch-min);
  height: var(--touch-min);
  border-radius: 999px;
  border: 1px solid rgb(177, 204, 202);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.weight-stepper__btn--round:first-of-type,
.weight-stepper__btn--round:last-of-type {
  border-radius: 999px;
}

.weight-stepper__btn--round:hover {
  background: rgb(240, 245, 243);
}

.weight-stepper__btn .fas {
  display: block;
  width: 1em;
  height: 1em;
  font-size: 0.8rem;
  line-height: 1;
  text-align: center;
}

.weight-add-actions {
  justify-content: flex-end;
}

.weight-add-actions > .btn-primary {
  min-width: 9rem;
}

/* Extra avstånd före spararad/knapp — samma överallt */
.form-stack > .actions-row,
.panel:has(> .form-group) > .actions-row,
.panel:has(> .form-check) > .actions-row,
.form-stack > button.btn:only-of-type,
.panel:has(> .form-group) > button.btn:only-of-type,
.panel:has(> .form-check) > button.btn:only-of-type {
  margin-top: calc(var(--form-actions-gap) - var(--form-gap));
}

/* Ensamma sparaknappar — bredare för enklare tryck */
.actions-row:has(> .btn:only-child) > .btn,
.form-stack:has(> button.btn:only-of-type) > button.btn:only-of-type,
.panel:has(> button.btn:only-of-type) > button.btn:only-of-type {
  min-width: 9rem;
}

select.form-control {
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111413' d='M1.4 1.4 6 6l4.6-4.6L12 2.8 6 8.8 0 2.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.75rem;
}

.form-control:focus {
  outline: 2px solid rgb(204, 229, 227);
  border-color: rgb(177, 204, 202);
}

.form-control.input-validation-error,
select.form-control.input-validation-error,
textarea.form-control.input-validation-error {
  border-color: var(--danger);
}

.form-control.input-validation-error:focus,
select.form-control.input-validation-error:focus,
textarea.form-control.input-validation-error:focus {
  border-color: var(--danger);
  outline-color: color-mix(in srgb, var(--danger) 40%, white);
}

.weight-stepper:has(.input-validation-error) .weight-stepper__input {
  border-color: var(--danger);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--touch-min);
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid rgb(177, 204, 202);
  border-radius: 0.35rem;
  background: #fff;
  cursor: pointer;
}

.form-check-input:checked {
  border-color: var(--btn-primary-bg);
  background-color: var(--btn-primary-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.6 11.3 12.5 4.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem;
}

.form-check-input:focus {
  outline: 2px solid rgb(204, 229, 227);
  outline-offset: 1px;
  border-color: rgb(177, 204, 202);
}

.form-check-input:checked:focus {
  border-color: var(--btn-primary-bg);
}

.exercise-flag-checks {
  display: grid;
  gap: 0.2rem;
}

.form-check--compact {
  min-height: 0;
  gap: 0.45rem;
}

.form-check--compact .form-check-label {
  font-weight: 400;
  line-height: 1.35;
}

.form-check--compact .form-check-label strong {
  font-weight: 700;
}

.text-danger {
  color: var(--danger);
  font-size: 0.85rem;
}

.validation-summary-valid {
  display: none !important;
}

.validation-summary-errors,
.alert-danger {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 14%, white);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, white);
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.validation-summary-errors::before,
.alert-danger::before {
  content: "";
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.5c-.4 0-.75.22-.95.57L1.2 20.05A1.1 1.1 0 0 0 2.15 21.7h19.7a1.1 1.1 0 0 0 .95-1.65L12.95 3.07A1.1 1.1 0 0 0 12 2.5Zm0 6.2c.55 0 1 .45 1 1v4.6c0 .55-.45 1-1 1s-1-.45-1-1V9.7c0-.55.45-1 1-1Zm0 9.1a1.15 1.15 0 1 1 0-2.3 1.15 1.15 0 0 1 0 2.3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.5c-.4 0-.75.22-.95.57L1.2 20.05A1.1 1.1 0 0 0 2.15 21.7h19.7a1.1 1.1 0 0 0 .95-1.65L12.95 3.07A1.1 1.1 0 0 0 12 2.5Zm0 6.2c.55 0 1 .45 1 1v4.6c0 .55-.45 1-1 1s-1-.45-1-1V9.7c0-.55.45-1 1-1Zm0 9.1a1.15 1.15 0 1 1 0-2.3 1.15 1.15 0 0 1 0 2.3Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.validation-summary-errors > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.validation-summary-errors li {
  list-style: none;
  margin: 0;
  padding: 0.05rem 0;
}

.validation-summary-errors li + li {
  margin-top: 0.25rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.weekday-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.weekday-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.weekday-check input {
  accent-color: var(--accent);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.danger-zone {
  margin: 1.5rem 0 0.5rem;
}

.bank-row {
  margin-bottom: 0.55rem;
}

.check-fancy {
  position: relative;
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  cursor: pointer;
}

.check-fancy input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.check-fancy__box {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.check-fancy input:checked + .check-fancy__box {
  background: var(--danger);
  border-color: var(--danger);
}

.check-fancy input:checked + .check-fancy__box::after {
  content: "";
  width: 0.35rem;
  height: 0.65rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.check-fancy--sm {
  width: 1.05rem;
  height: 1.05rem;
}

.check-fancy--sm .check-fancy__box {
  width: 1.05rem;
  height: 1.05rem;
}

.bulk-action-btn[hidden],
.bulk-delete-btn[hidden] {
  display: none !important;
}

.text-link {
  font-weight: 600;
  color: var(--link);
}

.alert {
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--accent-soft);
  color: #1a3d38;
  border: none;
}

/* .alert-danger styled with .validation-summary-errors above */

.auth-card {
  width: min(100%, 420px);
  margin: 0 auto;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.05rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.auth-card .muted {
  margin-bottom: 1.25rem;
}

.auth-card .auth-card__copy {
  margin: 0 0 1.15rem;
}

.auth-card .auth-card__email {
  color: var(--text);
  font-weight: 600;
}

.auth-card .auth-card__copy + .auth-card__copy {
  margin-top: -0.55rem;
}

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
}

/* Fill remaining space under the topbar; center the title+card as one block.
   If it doesn't fit, auto margins collapse and content starts under the topbar. */
.auth-page .main-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding-top: 1.25rem;
  padding-bottom: calc(1.25rem + var(--safe-bottom));
  min-height: 0;
}

/* Identity pages also set hide-bottom-nav — don't reserve bottom-nav space. */
.auth-page.hide-bottom-nav .main-content {
  padding-top: 1.25rem;
  padding-bottom: calc(1.25rem + var(--safe-bottom));
}

.auth-page__inner {
  width: min(100%, 420px);
  margin-top: auto;
  margin-bottom: auto;
  margin-left: auto;
  margin-right: auto;
  flex: 0 0 auto;
}

.auth-page__title {
  margin: 0 0 1.85rem;
  text-align: center;
  font-size: clamp(2.35rem, 8vw, 2.9rem);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-page__title:has(+ .auth-page__lead) {
  margin-bottom: 0.65rem;
}

.auth-page__lead {
  margin: 0 0 1.55rem;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.45;
}

.auth-card__form {
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
  margin: 0;
}

.auth-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-card__row .form-check {
  min-height: 0;
  margin: 0;
}

.auth-card__forgot {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.95rem;
}

.auth-card > .btn {
  width: 100%;
}

.auth-card__footer {
  margin: 0.15rem 0 0;
  text-align: center;
}

.auth-links,
.logout-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.75rem + var(--safe-bottom));
  width: min(calc(100% - 1.5rem), 420px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  background: var(--nav-bg);
  border: none;
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  z-index: 30;
}

/* Soft fade under the bottom nav — light blur only */
.app-shell:not(.hide-bottom-nav)::after {
  content: "";
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--page-max));
  bottom: 0;
  height: calc(0.75rem + var(--safe-bottom) + var(--nav-height) + 10px);
  z-index: 25;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--btn-primary-bg) 4%, transparent) 0%,
    color-mix(in srgb, var(--btn-primary-bg) 1.5%, transparent) 55%,
    transparent 100%
  );
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.08) 10px,
    rgba(0, 0, 0, 0.28) calc(10px + 0.85rem),
    #000 calc(10px + 2.1rem),
    #000 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.08) 10px,
    rgba(0, 0, 0, 0.28) calc(10px + 0.85rem),
    #000 calc(10px + 2.1rem),
    #000 100%
  );
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 48px;
  border-radius: 999px;
  color: var(--nav-fg);
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.bottom-nav__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.bottom-nav__item.is-active {
  width: 3rem;
  height: 3rem;
  min-height: 3rem;
  border-radius: 50%;
  justify-self: center;
  align-self: center;
  color: var(--nav-active-fg);
  background: var(--nav-active-bg);
}

.bottom-nav__item[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.page-header--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.section-label {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.25rem 0 0.55rem;
  color: rgb(17, 20, 19);
}

.section-label--with-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.section-label--with-badge .exercise-meta-badge,
.panel__title.section-label--with-badge .exercise-meta-badge,
.exercise-group__header .exercise-meta-badge {
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: normal;
}

.exercise-group__count {
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--muted);
}

.exercise-subgroup-switch {
  width: 100%;
  margin: 0 0 1rem;
}

.import-preview {
  margin-bottom: 1.25rem;
}

.import-preview__options {
  display: grid;
  gap: 0.65rem;
  margin: 0.85rem 0 0.35rem;
}

.import-preview__options .check-fancy {
  gap: 0.55rem;
  align-items: center;
}

.import-preview__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.import-preview__list li {
  padding: 0.45rem 0.55rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--shadow);
}

.list-item.list-item--select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  align-items: center;
}

.list-item.list-item--select-count {
  grid-template-columns: auto minmax(0, 1fr) 2.1rem 4.35rem;
}

.list-item.list-item--select-count .category-reorder {
  width: 100%;
  justify-content: flex-end;
  justify-self: end;
}

.list-item--link {
  color: inherit;
}

.list-item--link:hover {
  border-color: var(--accent);
}

.list-item--stack {
  display: grid;
  gap: 0.65rem;
}

.chevron {
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.small {
  font-size: 0.85rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.form-row--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-form {
  display: grid;
  gap: 0.65rem;
}

.cal-page-title {
  font-size: clamp(1.45rem, 5vw, 1.85rem);
  margin-bottom: 0.25rem;
}

.cal-toolbar {
  margin-bottom: 0.85rem;
}

.view-picker,
.cal-view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  background: var(--nav-bg);
  border: none;
  border-radius: 999px;
  padding: 0.35rem;
}

.view-picker.exercise-subgroup-switch,
.cal-view-switch.exercise-subgroup-switch {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.view-picker.exercise-subgroup-switch .view-picker__option,
.cal-view-switch.exercise-subgroup-switch .cal-view-switch__option {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.view-picker--four {
  grid-template-columns: repeat(4, 1fr);
}

.view-picker--four .view-picker__option,
.view-picker--four .cal-view-switch__option {
  font-size: 0.72rem;
  padding: 0 0.25rem;
}

.view-picker--three {
  grid-template-columns: repeat(3, 1fr);
}

.view-picker--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.bodyweight-tabs,
.settings-tabs {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  gap: 0.35rem;
  padding: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cal-toolbar .settings-tabs {
  margin-bottom: 0;
}

.bodyweight-tabs::-webkit-scrollbar,
.settings-tabs::-webkit-scrollbar {
  display: none;
}

.bodyweight-tabs .view-picker__option,
.bodyweight-tabs .cal-view-switch__option,
.settings-tabs .view-picker__option,
.settings-tabs .cal-view-switch__option {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0.85rem;
  white-space: nowrap;
}

.bw-history-list {
  display: grid;
  gap: 0;
}

.bw-history-row {
  display: grid;
  grid-template-columns: auto 5.75rem auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(177, 204, 202, 0.4);
}

.bw-history-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bw-history-row:first-child {
  padding-top: 0;
}

.bw-history-row__weight {
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
}

.bw-history-row__delta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 1.35rem;
  margin-left: -0.45rem;
}

.bw-history-delta {
  margin-left: 0;
  min-width: 0;
  padding: 0.18rem 0.32rem;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
}

.bw-history-row__date {
  margin: 0;
  white-space: nowrap;
  justify-self: end;
}

.bw-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0;
}

.bw-trend-head .panel__title {
  margin: 0;
  min-width: 0;
}

.bw-trend-period {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0.3rem;
  box-sizing: border-box;
  background: var(--nav-bg);
  border-radius: 999px;
}

.bw-trend-period__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  color: var(--nav-fg);
  background: transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bw-trend-period__btn.is-active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.bw-trend-empty {
  margin: 1rem 0 0.15rem;
  text-align: center;
}

.bw-trend-list {
  display: grid;
  grid-template-columns: var(--bw-trend-label-width, max-content) minmax(0, 1fr);
  column-gap: 0.35rem;
  row-gap: 0;
  margin-top: 1rem;
}

[data-bw-trend-panel][hidden] {
  display: none !important;
}

.bw-trend-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(177, 204, 202, 0.45);
}

.bw-trend-row:first-child {
  padding-top: 0.35rem;
}

.bw-trend-row:last-child {
  border-bottom: none;
  padding-bottom: 0.1rem;
}

.bw-trend-row__label {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}

.bw-trend-row__plot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.bw-trend-row__bar {
  flex: 0 1 auto;
  min-width: 0.65rem;
  max-width: calc(100% - 4.75rem);
  height: 0.85rem;
  border-radius: 6px;
  background: var(--btn-primary-bg);
}

.bw-trend-row__weight {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}

.bw-trend-row--goal .bw-trend-row__label {
  font-weight: 700;
  color: var(--danger);
}

.bw-trend-row--goal .bw-trend-row__bar {
  background: var(--danger);
}

.bw-trend-row--goal .bw-trend-row__weight {
  color: var(--danger);
}

.bw-history-paging {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.bulk-select-form > .panel {
  margin-bottom: 0;
}

.bulk-select-form > .bulk-bar--sticky:not(:has(.bulk-action-btn:not([hidden]))) {
  margin: 0;
  padding: 0;
  min-height: 0;
}

.bw-history-paging__side--prev {
  justify-self: start;
}

.bw-history-paging__side--next {
  justify-self: end;
}

.bw-history-paging__meta {
  justify-self: center;
  text-align: center;
  margin: 0;
}

.view-picker__option,
.cal-view-switch__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nav-fg);
  cursor: pointer;
  touch-action: manipulation;
  background: transparent;
  border: none;
  padding: 0 0.35rem;
}

.view-picker__option input,
.cal-view-switch__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.view-picker__option.is-active,
.cal-view-switch__option.is-active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn.btn-sm.cal-nav__arrow {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn.btn-sm.cal-nav__arrow .fal {
  margin: 0;
  display: block;
  line-height: 1;
  width: 1em;
  height: 1em;
  text-align: center;
}

.cal-nav__today {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  min-width: 5.5rem;
}

.cal-nav__today-spacer {
  min-width: 5.5rem;
  visibility: hidden;
  pointer-events: none;
}

.cal-month__headers,
.cal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.cal-month__dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0;
}

.cal-month__dow:nth-child(6),
.cal-month__dow:nth-child(7) {
  color: var(--danger);
}

.cal-month__cell {
  min-height: 48px;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(12, 38, 41, 0.06);
}

.cal-month__cell.is-past {
  opacity: 1;
  background: color-mix(in srgb, var(--bg-elevated) 78%, transparent);
  color: color-mix(in srgb, var(--text) 32%, white);
  box-shadow: 0 1px 4px rgba(12, 38, 41, 0.05);
}

.cal-month__cell.is-past .cal-month__daynum {
  color: color-mix(in srgb, var(--text) 30%, white);
  font-weight: 600;
}

.cal-month__cell.is-outside {
  opacity: 0.78;
  color: color-mix(in srgb, var(--muted) 55%, white);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.cal-month__cell.is-outside .cal-month__daynum {
  color: color-mix(in srgb, var(--muted) 50%, white);
}

.cal-month__cell.is-outside.is-past {
  opacity: 0.72;
  background: color-mix(in srgb, var(--bg-elevated) 58%, transparent);
  color: color-mix(in srgb, var(--muted) 50%, white);
}

.cal-month__cell.is-outside.is-past .cal-month__daynum {
  color: color-mix(in srgb, var(--muted) 48%, white);
}

.cal-month__cell.is-today {
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(12, 38, 41, 0.08);
  opacity: 1;
  color: #fff;
  background: var(--btn-primary-bg);
}

.cal-month__cell.is-today .cal-month__daynum {
  color: #fff;
  font-weight: 700;
}

.cal-month__cell.is-today .cal-month__dot {
  background: #fff;
  box-shadow: none;
}

.cal-month__cell.is-today .cal-month__dot--program {
  background: color-mix(in srgb, #fff 55%, var(--btn-primary-bg));
  box-shadow: inset 0 0 0 1.5px #fff;
}

.cal-month__cell.is-today .cal-month__dot--standalone {
  background: #fff;
}

.cal-month__daynum {
  font-size: 0.78rem;
  font-weight: 700;
}

.cal-month__dots {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.18rem;
  margin-top: auto;
  margin-bottom: 0.1rem;
  justify-content: center;
  align-content: center;
}

.cal-month__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  display: block;
}

.cal-month__dot--program {
  background: color-mix(in srgb, var(--btn-primary-bg) 28%, white);
  box-shadow: inset 0 0 0 1.5px var(--btn-primary-bg);
}

.cal-month__dot--standalone {
  background: var(--btn-primary-bg);
}

.cal-chip {
  display: block;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
  line-height: 1.25;
}

.cal-chip strong {
  color: var(--text);
  font-weight: 600;
}

.cal-chip--compact {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.2rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
}

.cal-badge {
  display: inline-block;
  margin-left: 0.15rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.cal-week {
  display: grid;
  gap: 0.65rem;
}

.cal-week__day {
  background: var(--bg-elevated);
  border: 2px solid #fff;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  box-shadow: 0 2px 8px rgba(12, 38, 41, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}

.cal-week__day.is-past {
  background: color-mix(in srgb, var(--bg-elevated) 78%, transparent);
  box-shadow: 0 1px 4px rgba(12, 38, 41, 0.05);
  color: color-mix(in srgb, var(--text) 32%, white);
}

.cal-week__day.is-today {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: #fff;
}

.cal-week__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.cal-week__title {
  min-width: 0;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
}

.cal-week__day.is-past .cal-week__title {
  color: color-mix(in srgb, var(--text) 30%, white);
}

.cal-week__day.is-weekend .cal-week__title {
  color: var(--danger);
}

.cal-week__day.is-past.is-weekend .cal-week__title {
  color: var(--danger);
}

.cal-week__day.is-today .cal-week__title {
  color: #fff;
}

.cal-week__add {
  display: inline-flex;
  flex-shrink: 0;
}

.cal-week__add .btn {
  min-width: 0;
  min-height: 1.85rem;
  height: 1.85rem;
  padding: 0 0.65rem;
  font-size: 0.72rem;
  gap: 0.25rem;
}

.cal-week__add .btn .fal {
  margin-right: 0;
  font-size: 0.7rem;
}

.cal-week__day.is-today .cal-week__add .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.88);
}

.cal-week__day.is-today .cal-week__add .btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: #fff;
}

.cal-week__workouts {
  display: grid;
  gap: 0.4rem;
}

.cal-week__workout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
  border: 1px solid color-mix(in srgb, var(--btn-primary-bg) 22%, white);
  border-radius: var(--radius-sm);
}

.cal-week__workout-link {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
}

.cal-week__workout-link:hover {
  color: var(--text);
}

.badge-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(17, 20, 19, 0.06);
  color: var(--muted);
  margin-left: 0.35rem;
}

.section-title-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.section-title-suggestion {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: rgba(17, 20, 19, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.section-title-suggestion:hover,
.section-title-suggestion:focus-visible {
  background: color-mix(in srgb, var(--btn-primary-bg) 16%, white);
  color: var(--btn-primary-bg);
  outline: none;
}

.badge-meta--danger {
  background: color-mix(in srgb, var(--danger) 14%, white);
  color: var(--danger);
}

.badge-meta--on-dark {
  background: color-mix(in srgb, var(--btn-primary-bg) 38%, transparent);
  color: #f2fbfb;
  border: none;
  margin-left: 0;
  padding: 0.3rem 0.65rem;
}

.list-item__title {
  font-weight: 400;
}

.list-item__main-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.list-item__main-link .list-item__title {
  font-weight: 600;
}

.list-item__chevron-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
  padding: 0.15rem;
}

.list-item--compact {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.35rem;
}

.list-item--compact .muted.small {
  font-size: 0.78rem;
}

.list-item[hidden],
.exercise-row[hidden] {
  display: none;
}

.list-filter {
  margin: 0 0 1rem;
}

.list-filter--search {
  position: relative;
  display: flex;
  align-items: center;
}

.list-filter--collapsible {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  transform: translateY(-0.45rem);
  transition:
    grid-template-rows 0.28s ease,
    opacity 0.22s ease,
    transform 0.28s ease,
    margin 0.28s ease;
  pointer-events: none;
}

.list-filter--collapsible.is-open {
  grid-template-rows: 1fr;
  margin: 0 0 1rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.list-filter--collapsible[hidden] {
  display: grid !important;
}

.list-filter__collapse {
  overflow: hidden;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.list-filter__icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.list-filter__input {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.65rem 0.95rem 0.65rem 2.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
}

.list-filter__input::placeholder {
  color: var(--muted);
}

.list-filter__input:focus {
  outline: 2px solid rgb(204, 229, 227);
  border-color: rgb(177, 204, 202);
  box-shadow: none;
}

.list-filter__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  cursor: pointer;
  background-color: rgb(17, 20, 19);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.17 7.1 4.3A1 1 0 0 0 5.7 5.7L10.59 10.6 5.7 15.5a1 1 0 1 0 1.4 1.4L12 12l4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.17 7.1 4.3A1 1 0 0 0 5.7 5.7L10.59 10.6 5.7 15.5a1 1 0 1 0 1.4 1.4L12 12l4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.exercise-group {
    scroll-margin-top: 5.5rem;
  margin-bottom: 1.25rem;
}

.exercise-group[hidden] {
  display: none;
}

.exercise-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
}

.exercise-group__header .section-label {
  margin: 0;
  font-size: 1.05rem;
}

.exercise-group:first-child .exercise-group__header {
  margin-top: 0;
}

.exercise-group__panel {
  padding: 0.35rem 0.9rem;
  margin-bottom: 0;
}

.exercise-group__list {
  display: grid;
  gap: 0;
}

.exercise-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(177, 204, 202, 0.4);
  color: inherit;
}

/* Last *visible* row after filter — not just last DOM child */
.exercise-row:not([hidden]):not(:has(~ .exercise-row:not([hidden]))) {
  border-bottom: none;
}

.exercise-row__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.exercise-row__link--static {
  cursor: default;
}

.exercise-row__trail {
  flex-shrink: 0;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 400;
}

.exercise-row__thumb {
  width: 2rem;
  height: 2rem;
  border-radius: 0.3rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  padding: 0;
  border: none;
  cursor: zoom-in;
}

.exercise-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.exercise-row__text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  flex: 1 1 auto;
}

.exercise-row__name {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.25;
}

.exercise-row--hidden .exercise-row__name,
.list-item--hidden .list-item__title {
  color: color-mix(in srgb, var(--muted) 72%, white);
}

.exercise-row--hidden .exercise-row__thumb img {
  opacity: 0.55;
  filter: brightness(1.18) saturate(0.55);
}

.exercise-row__meta {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
}

.exercise-meta-badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.18rem;
  margin-top: 0.22rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  container-type: inline-size;
  container-name: exercise-meta;
}

.exercise-meta-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exercise-meta-badge--tracking {
  background: rgba(177, 204, 202, 0.35);
  border-color: rgba(118, 143, 141, 0.35);
  color: rgb(45, 78, 74);
}

.exercise-meta-badge--muscle {
  background: rgba(240, 129, 106, 0.14);
  border-color: rgba(240, 129, 106, 0.38);
  color: rgb(148, 62, 42);
}

.exercise-meta-badge--movement {
  background: rgba(17, 20, 19, 0.06);
  border-color: rgba(17, 20, 19, 0.14);
  color: rgb(55, 62, 60);
}

.exercise-flag-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.02rem;
  flex: 0 0 auto;
  margin-left: 0.06rem;
}

.exercise-flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  font-size: 0.68rem;
  line-height: 1;
}

.exercise-flag-icon--po {
  color: rgb(176, 58, 48);
}

.exercise-flag-icon--deload {
  color: rgb(45, 122, 132);
}

@container exercise-meta (max-width: 15.5rem) {
  .exercise-meta-badge {
    font-size: 0.6rem;
    padding: 0.12rem 0.32rem;
  }

  .exercise-flag-icon {
    width: 0.78rem;
    height: 0.78rem;
    font-size: 0.62rem;
  }
}

@container exercise-meta (max-width: 12rem) {
  .exercise-meta-badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.26rem;
  }

  .exercise-flag-icons {
    gap: 0;
    margin-left: 0.02rem;
  }

  .exercise-flag-icon {
    width: 0.72rem;
    height: 0.72rem;
    font-size: 0.58rem;
  }
}

.exercise-row__chevron {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

/* Sticky page-header actions (admin + selected app pages). */
.page-header--sticky-actions,
body.admin-area .page-header.page-header--row {
  display: contents;
}

.page-header--sticky-actions .page-header__main,
body.admin-area .page-header__main {
  margin-bottom: 0.65rem;
}

.page-header__actions--sticky,
body.admin-area .page-header__actions {
  position: sticky;
  top: calc(var(--safe-top) + 3.4rem + 12px);
  z-index: 16;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 0 1.25rem;
  background: transparent;
  box-shadow: none;
}

.page-header__actions--sticky.is-stuck .btn-ghost,
body.admin-area .page-header__actions.is-stuck .btn-ghost {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.page-header__actions--sticky.is-stuck .btn-ghost:hover,
body.admin-area .page-header__actions.is-stuck .btn-ghost:hover {
  background: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-bg);
  color: var(--btn-primary-fg);
}

/* Admin home only: coral entry cards so the hub feels distinct */
body.admin-area .entry-grid--admin-hub .entry-card--nav {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, white);
  border: 1px solid color-mix(in srgb, var(--danger) 24%, white);
  box-shadow: none;
}

body.admin-area .entry-grid--admin-hub .entry-card--nav:hover {
  background: color-mix(in srgb, var(--danger) 16%, white);
  border-color: color-mix(in srgb, var(--danger) 34%, white);
}

body.admin-area .entry-grid--admin-hub .entry-card--nav .entry-card__icon,
body.admin-area .entry-grid--admin-hub .entry-card--nav .entry-card__chevron,
body.admin-area .entry-grid--admin-hub .entry-card--nav strong {
  color: var(--danger);
}

body.admin-area .entry-grid--admin-hub .entry-card--nav .count-badge {
  background: color-mix(in srgb, var(--danger) 18%, white);
  color: var(--danger);
}

.admin-device-info {
  margin: 1rem 0 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sticky-actions-sentinel,
.admin-actions-sentinel {
  height: 1px;
  width: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
  visibility: hidden;
}

.page-subheader {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.55rem 0 1rem;
}

.category-reorder {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.category-reorder .btn,
.btn-icon-sm {
  min-width: 2rem;
  min-height: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
}

.category-reorder .btn .fal,
.category-reorder .btn .fas,
.btn-icon-sm .fal,
.btn-icon-sm .fas {
  margin: 0;
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.btn-icon-sm .fa-times {
  font-size: 1.05rem;
}

.btn-icon-xs {
  min-width: 1.55rem;
  min-height: 1.55rem;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  line-height: 1;
}

.btn-icon-xs .fal,
.btn-icon-xs .fas {
  margin: 0;
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.wrong-day .form-stack--nested {
  margin-top: 0.85rem;
}

@media (min-width: 768px) {
  .main-content {
    padding-top: 1.75rem;
  }

  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 2rem), 420px);
    border-radius: 999px;
  }

  .stats-row {
    gap: 1rem;
  }

  .form-row--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cal-month__cell {
    min-height: 56px;
  }
}

/* Workout execution */
.hide-bottom-nav .main-content {
  padding-top: 1.15rem;
  padding-bottom: calc(5.5rem + var(--safe-bottom));
  padding-left: calc(1.1rem + var(--safe-left));
  padding-right: calc(1.1rem + var(--safe-right));
}

.progress-meter {
  display: grid;
  gap: 0.55rem;
  margin: 0.45rem 0 0.95rem;
}

.progress-meter__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.progress-meter__of {
  font-weight: 500;
  opacity: 0.78;
  font-size: 0.92em;
}

.progress-meter--on-dark .progress-meter__of {
  opacity: 0.72;
}

/* Capsule progress bars inspired by fitness UI: dark track + mint fill */
.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #2c3130;
  border: none;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: none;
}

.progress-bar__fill {
  height: 100%;
  background: rgb(204, 229, 227);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.progress-meter--padded {
  padding: 0.3rem;
  background: #2c3130;
  border-radius: 999px;
}

.progress-meter--padded .progress-bar {
  margin: 0;
  position: relative;
  overflow: visible;
  min-height: 12px;
}

/* Hero bar: must beat .progress-meter--padded dark background. */
.progress-meter--padded.progress-meter--on-hero {
  background: #e8eeec;
}

.progress-meter--padded.progress-meter--on-hero .progress-bar {
  background: #e8eeec;
}

.progress-meter--on-hero .progress-bar__fill {
  background: var(--btn-primary-bg);
}

.progress-meter--on-hero .progress-pct:not(.progress-pct--inside) {
  color: rgb(17, 20, 19);
}

.progress-meter--on-hero .progress-pct--inside,
.progress-meter--on-hero.progress-meter--high .progress-pct--inside {
  color: #f4f7f6;
}

.progress-pct {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0.35rem, -50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #f4f7f6;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

/* Sit just to the right of the filled mint segment (still on the dark track). */
.progress-pct:not(.progress-pct--inside) {
  color: #f4f7f6;
}

/* When little room remains, place the number inside the fill. */
.progress-pct--inside {
  transform: translate(calc(-100% - 0.35rem), -50%);
  color: rgb(17, 20, 19);
}

.goal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}

.goal-badges .badge-meta {
  margin-left: 0;
}

.progress-bar--light {
  background: #e4e8e7;
}

.progress-bar--light .progress-bar__fill {
  background: rgb(17, 20, 19);
}

.panel--start {
  background: var(--text);
  color: #f4f7f6;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.1rem;
}

.panel--start .btn-primary {
  width: 100%;
  background: rgb(35, 180, 169);
  color: rgb(17, 20, 19);
  border: none;
}

.panel--start .btn-primary:hover {
  background: rgb(72, 205, 194);
  color: rgb(17, 20, 19);
}

.badge-pass {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.badge-pass--program {
  background: color-mix(in srgb, var(--btn-primary-bg) 28%, white);
  color: var(--text);
}

.badge-pass--standalone {
  background: color-mix(in srgb, var(--btn-primary-bg) 12%, white);
  color: var(--muted);
}

.cal-month__cell {
  cursor: pointer;
}

.cal-month__cell a.cal-month__day-hit {
  display: block;
  color: inherit;
  text-decoration: none;
  min-height: inherit;
}

.execute-focus-card__image-btn {
  display: block;
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.execute-focus-card__media {
  display: flex;
  justify-content: center;
  margin: 0.55rem 0 0.35rem;
}

.execute-focus-card__image {
  --execute-image-size: 6.25rem; /* 100px default; JS may grow to fill viewport */
  width: var(--execute-image-size);
  height: var(--execute-image-size);
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 0;
  display: block;
  pointer-events: none;
  box-shadow: var(--shadow);
}

.pass-picker-list .list-item {
  align-items: flex-start;
}

.danger-action {
  margin-top: 1.25rem;
}

.execute-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.execute-plan {
  margin-bottom: 0.65rem;
}

.btn-complete {
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

.export-actions .btn {
  flex: 1 1 auto;
}

/* Dashboard / Execute mobile polish */
.panel--accent .actions-row .btn-primary {
  flex: 1 1 12rem;
}

.execute-card .form-control {
  min-height: var(--touch-min);
}

.execute-complete-form .btn-complete,
.execute-set-form .btn {
  width: 100%;
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge--done {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.execute-card--done {
  opacity: 0.78;
  background: linear-gradient(160deg, #ffffff 0%, var(--accent-soft) 160%);
}

.set-log-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.summary-exercise-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.summary-exercise-list__item {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
}

.summary-exercise-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.summary-exercise-list__name {
  font-weight: 600;
  min-width: 0;
  line-height: 1.3;
}

.summary-exercise-list__item .badge-meta {
  margin-left: 0;
  flex: 0 0 auto;
}

.summary-exercise-list__item .set-log-list {
  margin-top: 0.55rem;
}

.set-log-list--grid {
  display: grid;
  grid-template-columns: repeat(var(--set-cols, 3), max-content);
  column-gap: 1rem;
  row-gap: 0.2rem;
  width: fit-content;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}

.set-log-list__entry {
  display: contents;
}

.summary-exercise__details[hidden] {
  display: none !important;
}

.execute-set-form {
  margin-top: 0.5rem;
}

.execute-complete-form {
  margin-top: 0.25rem;
}

.segmented {
  border: none;
  box-shadow: var(--shadow);
}

.segmented--full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-width: 0;
}

.segmented--tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  margin-bottom: 0.85rem;
}

.segmented--tabs .segmented__btn {
  font-size: 0.78rem;
  padding: 0.35rem 0.25rem;
}

.tab-help {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}

.entry-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.5rem;
}

.entry-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.entry-card {
  display: grid;
  gap: 0.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  color: inherit;
}

.entry-card--nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.entry-card__icon {
  width: 1.35rem;
  text-align: center;
  color: var(--muted);
  flex-shrink: 0;
}

.entry-card__body {
  display: grid;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.entry-card__chevron {
  color: var(--muted);
  flex-shrink: 0;
}

.entry-card__trail {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  flex-shrink: 0;
  margin-left: auto;
}

.entry-card__trail .entry-card__chevron {
  margin: 0;
}

.entry-card--primary {
  background: linear-gradient(160deg, #ffffff 0%, var(--accent-soft) 130%);
}

.entry-grid--compact .entry-card {
  padding: 0.85rem 0.7rem;
  text-align: center;
}

.help-hierarchy__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.help-hierarchy__list .help-hierarchy__list {
  margin-top: 0.65rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--accent-soft);
}

.help-hierarchy__list strong {
  display: block;
  font-size: 1.05rem;
}

.help-bullets {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}

.help-flow {
  font-weight: 600;
  color: var(--accent-dark);
}

.execute-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem 0.75rem;
  align-items: start;
}

.execute-shell > :not(.execute-top__actions):not(.execute-progress):not(.execute-actions-sentinel) {
  grid-column: 1 / -1;
}

.execute-top {
  display: contents;
}

.execute-actions-sentinel {
  grid-column: 1;
  grid-row: 1;
  height: 1px;
  width: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  visibility: hidden;
}

.execute-top__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--safe-top) + 3.25rem);
  z-index: 16;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  background: transparent;
  box-shadow: none;
}

.execute-top__actions.is-stuck .btn-ghost {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.execute-top__actions.is-stuck .btn-ghost:hover {
  background: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-bg);
  color: var(--btn-primary-fg);
}

.execute-back-form {
  margin: 0;
}

.execute-top__actions .btn-icon-sm {
  min-width: 2.15rem;
  min-height: 2.15rem;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  gap: 0;
  font-size: 0.95rem;
  line-height: 1;
}

.execute-top__actions .btn-icon-sm .fal {
  display: block;
  margin: 0;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.execute-progress {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.app-toast-shell {
  --app-toast-band: 3.4rem;
  /*
    Space above the bar ≈ safe-top + band/2.
    Shell height = that space + bar + same space below + a bit extra downward.
  */
  --app-toast-above: calc(var(--safe-top) + (var(--app-toast-band) / 2));
  --app-toast-veil-extra: 26px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--app-toast-above) * 2 + var(--app-toast-band) + var(--app-toast-veil-extra));
  z-index: 50;
  pointer-events: none;
}

.app-toast-shell__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--text) 38%, transparent) 0%,
    transparent 100%
  );
  z-index: 0;
}

.app-toast {
  position: absolute;
  left: 50%;
  /*
    Topbar content band is ~3.4rem (same as sticky action offset).
    Toast height matches that band: half overlaps the topbar, half hangs below.
  */
  top: var(--app-toast-above);
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(calc(100% - 2rem), 22rem);
  height: var(--app-toast-band);
  min-height: var(--app-toast-band);
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  background: var(--btn-primary-bg);
  border: none;
  color: var(--btn-primary-fg);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
  pointer-events: none;
}

.app-toast::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, black 14%, var(--btn-primary-bg));
  transform: scaleX(0);
  transform-origin: left center;
  animation: app-toast-wipe 4s linear forwards;
  z-index: 0;
}

.app-toast__icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--btn-primary-fg);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
}

.app-toast__icon .fas,
.app-toast__icon .fal {
  display: block;
  line-height: 1;
}

.app-toast__text {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 2.1rem;
  color: var(--btn-primary-fg);
  text-align: center;
}

.app-toast-shell.is-leaving {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.app-toast-shell.is-leaving .app-toast {
  transform: translateX(-50%) translateY(-0.35rem);
  transition: transform 0.25s ease;
}

@keyframes app-toast-wipe {
  to {
    transform: scaleX(1);
  }
}

.execute-progress__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.2;
}

.execute-progress__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.execute-progress__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  transition: background 0.15s ease, transform 0.15s ease, width 0.15s ease, height 0.15s ease;
}

.execute-progress__dot--done {
  background: var(--btn-primary-bg);
}

.execute-progress__dot--current {
  width: 0.85rem;
  height: 0.85rem;
  background: var(--btn-primary-bg);
}

.execute-progress__dot--todo {
  background: transparent;
  border: 1.5px solid var(--btn-primary-bg);
  box-sizing: border-box;
}

.execute-focus-card {
  display: flex;
  flex-direction: column;
  --execute-card-pad: calc(0.95rem + 3px);
  padding: var(--execute-card-pad) 1.25rem var(--execute-card-pad);
}

.execute-focus-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

.execute-focus-card__kicker {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.execute-add-set {
  margin: 0;
  flex: 0 0 auto;
}

.execute-add-set .btn {
  white-space: nowrap;
}

.execute-set-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.execute-set-actions .btn.is-active {
  background: color-mix(in srgb, var(--btn-primary-bg) 14%, white);
  border-color: var(--btn-primary-bg);
}

.execute-focus-card__title {
  font-size: clamp(1.1rem, 5vw, 1.75rem);
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  line-height: 1.2;
}

.execute-focus-card__title--spaced {
  margin-top: 1.1rem;
}

.execute-focus-card__rx {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.execute-actuals {
  margin-top: auto;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.execute-focus-actions {
  margin-top: 0.75rem;
}

.execute-set-list {
  display: grid;
  gap: 0.85rem;
  margin: 0.35rem 0 0;
  padding-top: 0.2rem;
  padding-right: 0.35rem;
}

.execute-set-row {
  position: relative;
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
  border: 1px solid color-mix(in srgb, var(--btn-primary-bg) 22%, white);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: center;
}

.execute-set-list.is-editing-sets .execute-set-row {
  padding-right: 2.35rem;
}

.execute-set-row__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--btn-primary-bg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 0;
}

.execute-set-row__delete {
  position: absolute;
  top: calc(-0.55rem + 2px);
  right: -0.4rem;
  margin: 0;
  z-index: 5;
  display: none;
}

.execute-set-list.is-editing-sets .execute-set-row__delete {
  display: block;
}

.execute-set-row__delete .btn-icon-sm {
  padding: 0;
  gap: 0;
  line-height: 1;
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.execute-set-row__delete .btn-icon-sm .fal {
  display: block;
  margin: 0;
  line-height: 1;
  width: 1em;
  height: 1em;
  font-size: 1.05rem;
  text-align: center;
}

.execute-set-row > .stepper-value-btn {
  width: 100%;
  max-width: none;
}

.execute-set-row > .stepper-value-btn:only-of-type {
  grid-column: 3;
}

.stepper {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  width: 100%;
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 0.28rem 0.3rem;
  min-width: 0;
}

.stepper .btn-icon-sm {
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  min-height: 1.65rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
}

.stepper__value {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.stepper__num {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 0;
}

.stepper__value small {
  font-family: var(--font);
  font-weight: 500;
  color: var(--muted);
  font-size: 0.68rem;
  margin-left: auto;
  flex-shrink: 0;
}

.stepper-value-btn {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: stretch;
  gap: 0;
  margin: 0;
  min-height: 2.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: inherit;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.stepper-value-btn:hover,
.stepper-value-btn:focus-visible {
  border-color: var(--border);
  background: #fff;
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--btn-primary-bg) 35%, white);
  outline-offset: 1px;
}

.value-picker-modal[hidden] {
  display: none !important;
}

.value-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.value-picker-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 19, 0.45);
}

.value-picker-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem calc(1rem + var(--safe-bottom));
}

.value-picker-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.value-picker-modal__title {
  margin: 0;
  font-size: 1.2rem;
}

.value-picker-modal__close {
  border: none;
  background: transparent;
  color: var(--text);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.value-picker-modal__form {
  display: grid;
  gap: 0;
}

.value-picker-modal__field-group {
  margin: 0;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid rgb(220, 232, 230);
}

.value-picker-modal__stepper {
  padding-top: 0;
  width: 100%;
  align-items: stretch;
}

.value-picker-modal__stepper .weight-stepper__field {
  min-width: 0;
}

.value-picker-modal__stepper--simple .weight-stepper__field {
  flex: 1 1 auto;
}

.value-picker-modal__stepper--paired .weight-stepper__field {
  flex: 0 0 5.85rem;
  max-width: 5.85rem;
}

.value-picker-modal__stepper--paired.value-picker-modal__stepper--duration .weight-stepper__field {
  flex: 0 0 7.75rem;
  max-width: 8.25rem;
}

.value-picker-modal__stepper--paired .weight-stepper__controls {
  flex: 1 1 auto;
  min-width: 0;
  align-items: stretch;
}

.value-picker-modal__stepper .weight-stepper__input {
  font-size: clamp(1.85rem, 9vw, 2.55rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  padding: 0.55rem 2.4rem;
  min-height: 3.35rem;
  height: 3.35rem;
  line-height: 1.1;
}

.value-picker-modal__stepper--paired .weight-stepper__input {
  font-size: 1.35rem;
  min-height: 2.85rem;
  height: 2.85rem;
  padding: 0.25rem 1.55rem 0.25rem 0.3rem;
}

.value-picker-modal__stepper--paired.value-picker-modal__stepper--duration .weight-stepper__input {
  font-size: 1.25rem;
  padding: 0.25rem 1.7rem 0.25rem 0.35rem;
}

.value-picker-modal__stepper .weight-stepper__unit {
  right: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.value-picker-modal__stepper--paired .weight-stepper__unit {
  right: 0.4rem;
  font-size: 0.72rem;
}

.value-picker-modal__stepper--paired .weight-stepper__badge {
  font-size: 0.62rem;
  padding: 0.1rem 0.42rem;
}

.value-picker-modal__stepper--paired .weight-stepper__pair {
  align-items: stretch;
}

.value-picker-modal__stepper--paired .weight-stepper__btn {
  height: auto;
  min-height: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.value-picker-modal__stepper .btn.weight-stepper__btn {
  min-height: 0;
}

.value-picker-modal__stepper--paired .weight-stepper__btn .fas {
  display: block;
  margin: 0;
  line-height: 1;
  width: 1em;
  height: 1em;
  font-size: 0.78rem;
  text-align: center;
}

.value-picker-modal__stepper [hidden] {
  display: none !important;
}

.value-picker-modal__stepper .weight-stepper__field:has(.weight-stepper__unit[hidden]) .weight-stepper__input {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.value-picker-modal__stepper--simple .weight-stepper__controls--round {
  flex: 0 0 auto;
  align-items: stretch;
  align-self: stretch;
}

.value-picker-modal__stepper--simple .weight-stepper__btn--round {
  width: 3.35rem;
  min-width: 3.35rem;
  height: auto;
  min-height: 3.35rem;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.value-picker-modal__stepper--simple .weight-stepper__btn--round .fas {
  font-size: 0.85rem;
}

.value-picker-modal__chips {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 1.25rem 0 1.35rem;
  border-bottom: 1px solid rgb(220, 232, 230);
  width: 100%;
}

.value-picker-modal__chips--reps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.value-picker-modal__chips--weight,
.value-picker-modal__chips--duration,
.value-picker-modal__chips--distance,
.value-picker-modal__chips--speed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-picker-chip {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
}

.value-picker-chip--round {
  aspect-ratio: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.95rem;
}

.value-picker-chip.is-current {
  background: rgb(17, 20, 19);
  border-color: rgb(17, 20, 19);
  color: #fff;
}

.value-picker-modal__form > .actions-row {
  margin-top: 1.25rem;
}

.execute-bottom-actions {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(0.75rem + var(--safe-bottom));
  width: min(calc(100% - 1.5rem), 420px);
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  background: var(--nav-bg);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  z-index: 30;
}

.execute-bottom-actions form {
  margin: 0;
  min-width: 0;
}

.execute-bottom-actions__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.35rem 0.4rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--nav-fg);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.execute-bottom-actions__item--primary {
  color: var(--btn-primary-fg);
  background: var(--btn-primary-bg);
  font-size: 1rem;
}

.execute-bottom-actions__item:hover {
  color: #fff;
}

.execute-bottom-actions__item--primary:hover {
  background: var(--btn-primary-hover-bg);
  color: var(--btn-primary-fg);
}

.btn-start-pass {
  width: 100%;
  min-height: 52px;
  font-size: 1.08rem;
  margin: 0 0 1rem;
}

.pass-exercise-card {
  align-items: flex-start;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-header__title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.page-header__title-row h1 {
  margin-bottom: 0;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: var(--muted);
  flex-shrink: 0;
}

.icon-link:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.chevron i {
  font-size: 0.95rem;
}

/* More bottom sheet */
.more-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.more-sheet.is-open {
  pointer-events: auto;
}

.more-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 19, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.more-sheet.is-open .more-sheet__backdrop {
  opacity: 1;
}

.more-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 90vh);
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -16px 40px rgba(17, 20, 19, 0.18);
  padding: 1rem 1.1rem calc(1.25rem + var(--safe-bottom));
  transform: translateY(105%);
  transition: transform 0.24s ease;
}

.more-sheet.is-open .more-sheet__panel {
  transform: translateY(0);
}

.more-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.more-sheet__heading {
  min-width: 0;
}

.more-sheet__title {
  font-size: 1.45rem;
  margin: 0;
}

.more-sheet__subtitle {
  margin: 0.2rem 0 0;
}

.more-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.35rem -0.35rem 0 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.more-sheet__close i {
  font-size: 1.45rem;
  line-height: 1;
}

.more-sheet__nav {
  display: grid;
  gap: 0.55rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.more-sheet__nav--section {
  margin-bottom: 0.75rem;
}

.more-sheet__nav--section[hidden] {
  display: none !important;
}

.more-sheet__nav > form {
  margin: 0;
}

button.more-sheet__link {
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.more-sheet__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.15rem;
  padding: 1rem 0.95rem;
  border-radius: var(--radius);
  color: inherit;
  font-weight: 600;
  background: color-mix(in srgb, var(--btn-primary-bg) 11%, white);
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--btn-primary-bg) 22%, white);
}

.more-sheet__link--plain {
  font-weight: 400;
}

.more-sheet__link--plain .count-badge {
  font-weight: 700;
}

.more-sheet__link:hover {
  background: color-mix(in srgb, var(--btn-primary-bg) 18%, white);
  border-color: color-mix(in srgb, var(--btn-primary-bg) 34%, white);
}

.more-sheet__label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.more-sheet__icon {
  width: 1.15rem;
  text-align: center;
  color: var(--btn-primary-bg);
  flex-shrink: 0;
}

.more-sheet__link i {
  color: var(--btn-primary-bg);
}

.more-sheet__link .more-sheet__icon {
  color: var(--btn-primary-bg);
}

.more-sheet__link--danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, white);
  border-color: color-mix(in srgb, var(--danger) 24%, white);
}

.more-sheet__link--danger:hover {
  background: color-mix(in srgb, var(--danger) 16%, white);
  border-color: color-mix(in srgb, var(--danger) 34%, white);
}

.more-sheet__link--danger .more-sheet__icon,
.more-sheet__link--danger i {
  color: var(--danger);
}

.more-sheet__trail {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  flex-shrink: 0;
}

.more-sheet__trail > i {
  color: color-mix(in srgb, var(--btn-primary-bg) 55%, var(--muted));
}

.more-sheet__link--danger .more-sheet__trail > i {
  color: color-mix(in srgb, var(--danger) 55%, var(--muted));
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--btn-primary-bg) 42%, white);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
}

.count-badge--danger {
  background: color-mix(in srgb, var(--danger) 14%, white);
  color: var(--danger);
}

.integration-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(17, 20, 19, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.integration-status--ready {
  background: rgba(46, 125, 90, 0.14);
  color: rgb(30, 90, 64);
}

.integration-status--warn {
  background: rgba(176, 120, 40, 0.16);
  color: rgb(120, 78, 18);
}

.integration-help {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.pass-picker-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pass-picker-sheet {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.pass-picker-scroll::before,
.pass-picker-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2.75rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pass-picker-scroll::before {
  top: 0;
  background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.pass-picker-scroll::after {
  bottom: 0;
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.pass-picker-scroll.has-more-above::before,
.pass-picker-scroll.has-more-below::after {
  opacity: 1;
}

.pass-picker-scroll__hint {
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.3rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: var(--nav-bg);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pass-picker-scroll__hint[hidden] {
  display: none !important;
}

.pass-picker-scroll__hint--top {
  top: 0.35rem;
}

.pass-picker-scroll__hint--bottom {
  bottom: 0.35rem;
}

.pass-picker-scroll__hint .fal {
  font-size: 0.7rem;
  line-height: 1;
}

body.more-sheet-open,
body.confirm-modal-open,
body.image-zoom-modal-open,
body.value-picker-modal-open,
body.progress-modal-open,
body.date-picker-sheet-open {
  overflow: hidden;
}

button.cal-month__cell {
  font: inherit;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.list-item--link .muted.small,
.list-item .muted.small {
  margin-top: 0.55rem;
}

.list-item--workout-meta {
  margin-top: 0.65rem;
}

.pass-edit-tabs {
  margin-bottom: 0.65rem;
}

.pass-overview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.list-item.pass-exercise-row.pass-section-row {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  box-shadow: none;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.pass-section-row .list-item__main-link,
.pass-section-row .list-item__chevron-link,
.pass-section-row .list-item__chevron-link .chevron,
.pass-section-row .pass-exercise-row__reorder .btn,
.pass-section-row .pass-exercise-row__reorder .btn i {
  color: var(--btn-primary-fg);
}

.pass-section-row .pass-exercise-row__reorder .btn {
  border-color: rgba(255, 255, 255, 0.65);
}

.pass-section-row .pass-exercise-row__reorder .btn:hover,
.pass-section-row .pass-exercise-row__reorder .btn:hover i,
.pass-section-row .list-item__chevron-link:hover,
.pass-section-row .list-item__chevron-link:hover .chevron {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.9);
}

.pass-section-row .check-fancy__box {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.pass-section-row .check-fancy input:checked + .check-fancy__box {
  background: #fff;
  border-color: #fff;
}

.pass-section-row .check-fancy input:checked + .check-fancy__box::after {
  border-color: var(--btn-primary-bg);
}

.pass-section-row .list-item__main-link {
  justify-content: flex-start;
}

.pass-section-row .list-item__title.pass-section-row__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
  text-align: left;
}

.pass-distribution-panel {
  margin-bottom: 0.85rem;
}

.pass-distribution-panel .panel__title {
  margin-bottom: 0.75rem;
}

.pass-distribution-list {
  margin: 0;
}

.list-item.pass-exercise-row {
  display: grid;
  grid-template-columns: auto 2rem minmax(0, 1fr) auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
}

.pass-exercise-row__thumb-slot {
  width: 2rem;
  height: 2rem;
  border-radius: 0.3rem;
  overflow: hidden;
  flex-shrink: 0;
  justify-self: center;
}

.pass-exercise-row__thumb-slot.exercise-row__thumb {
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.pass-exercise-row__reorder {
  display: grid;
  grid-template-columns: 1.55rem 1.55rem;
  gap: 0.2rem;
  align-items: center;
  justify-items: center;
}

.pass-exercise-row__reorder .btn {
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.pass-exercise-row__reorder .btn i {
  margin: 0;
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pass-exercise-row__reorder .btn:disabled {
  visibility: hidden;
  pointer-events: none;
}

.pass-exercise-row .list-item__main-link,
.pass-exercise-row .list-item__chevron-link {
  min-width: 0;
}

.pass-exercise-row .list-item__main-link {
  flex: unset;
  display: block;
  width: 100%;
  min-width: 0;
}

.pass-exercise-row__text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.pass-exercise-row .list-item__title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.pass-exercise-row__dose {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  line-height: 1.25;
}

.pass-exercise-row__dose--warning {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--danger);
  font-weight: 600;
}

.pass-exercise-row__dose--warning i {
  flex-shrink: 0;
  font-size: 0.85em;
}

.pass-edit-pane[hidden] {
  display: none !important;
}

.pass-add-layout {
  display: grid;
  gap: var(--form-gap);
}

.pass-add-pick {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.pass-add-pick__fields {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.pass-add-pick__image {
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.pass-add-pick__image[hidden] {
  display: none !important;
}

.pass-add-pick__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-pass-add-rest][hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .pass-add-pick {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

[data-tracking-field][hidden],
[data-tracking-dosing][hidden] {
  display: none !important;
}

.pass-exercise-card .actions-row {
  justify-content: space-between;
  width: 100%;
}

.pass-exercise-card .category-reorder {
  margin-left: auto;
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.95rem;
  background: var(--nav-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  color: var(--nav-fg);
}

.admin-stats__item {
  color: inherit;
}

.admin-stats__item--link {
  text-decoration: none;
  border-radius: 0.35rem;
  margin: -0.2rem -0.35rem;
  padding: 0.2rem 0.35rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-stats__item--link:hover,
.admin-stats__item--link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  outline: none;
}

.admin-stats__item strong {
  color: #f4f7f6;
  font-weight: 700;
  margin-right: 0.2rem;
}

html[data-theme="summer-ocean-breeze"] .admin-stats__item strong {
  color: #f1faee;
}

.admin-users {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-owned-list > .admin-user {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(177, 204, 202, 0.4);
}

.admin-owned-list > .admin-user:last-child {
  border-bottom: none;
}

.admin-user__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  cursor: pointer;
  list-style: none;
}

.admin-user__summary::-webkit-details-marker,
.admin-user__summary::marker {
  display: none;
  content: "";
}

.admin-user__identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.25;
}

.admin-user__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.admin-user__chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.18s ease;
}

.admin-user[open] .admin-user__chevron {
  transform: rotate(180deg);
}

.admin-user__details {
  padding: 0 0 0.65rem;
}

.admin-user__facts-wrap {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(177, 204, 202, 0.4);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.admin-user__facts {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 400;
}

.admin-user__facts th,
.admin-user__facts td {
  padding: 0.45rem 0.6rem;
  border-right: 1px solid rgba(177, 204, 202, 0.4);
  border-bottom: 1px solid rgba(177, 204, 202, 0.4);
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
  color: var(--text);
}

.admin-user__facts th:last-child,
.admin-user__facts td:last-child {
  border-right: none;
}

.admin-user__facts tr:last-child th,
.admin-user__facts tr:last-child td {
  border-bottom: none;
}

.admin-user__facts th {
  width: 32%;
  color: var(--muted);
  white-space: nowrap;
}

.admin-user__facts td {
  width: 68%;
}

.admin-user__fact-primary {
  display: block;
}

.admin-user__fact-secondary {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.92em;
}

.admin-user__facts .badge-meta {
  margin-left: 0;
}

.admin-user__delete-form {
  margin: 0.45rem 0 0;
}

.admin-user__delete-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--danger);
  cursor: pointer;
  text-decoration: none;
}

.admin-user__delete-link:hover {
  color: var(--danger-hover);
  text-decoration: underline;
}

.admin-list-search {
  width: 100%;
  margin-bottom: 0.75rem;
}

.admin-list-search .list-filter__collapse {
  display: flex;
  width: 100%;
}

.admin-list-search .list-filter__input {
  width: 100%;
}

.admin-owned-list {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}

.admin-owned-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(177, 204, 202, 0.4);
  font-size: 0.9rem;
  line-height: 1.25;
}

.admin-owned-row:last-child {
  border-bottom: none;
}

.admin-owned-row__title {
  font-weight: 600;
  color: var(--text);
}

.admin-owned-row__owner {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.confirm-modal[hidden] {
  display: none !important;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 19, 0.45);
}

.confirm-modal__panel {
  position: relative;
  width: min(100%, 22rem);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem 1.1rem;
  text-align: center;
}

.confirm-modal__message {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  color: var(--text);
}

.confirm-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.confirm-modal__actions--single {
  grid-template-columns: 1fr;
}

.bulk-edit-sheet__panel {
  max-height: calc(100dvh - var(--safe-top) - 4.25rem);
  max-height: calc(100svh - var(--safe-top) - 4.25rem);
  overflow: hidden;
  text-align: left;
}

.bulk-edit-sheet__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.bulk-edit-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.85rem;
  margin: 0;
  gap: var(--form-gap, 0.85rem);
}

.bulk-edit-sheet__body.form-stack,
.bulk-edit-sheet__body.form-stack--nested {
  padding: 0.15rem 0 0.85rem;
  box-shadow: none;
  background: transparent;
}

.bulk-edit-create-pass {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(17, 20, 19, 0.08);
  justify-items: center;
  text-align: center;
}

.bulk-edit-create-pass__note {
  margin: 0;
}

.bulk-edit-create-pass .btn {
  width: auto;
  min-width: 8.5rem;
}

.bulk-edit-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  flex-shrink: 0;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(17, 20, 19, 0.08);
  background: #fff;
}

.bulk-edit-sheet__actions .btn {
  width: 100%;
  min-width: 0;
}

.confirm-modal__actions .btn {
  width: 100%;
  min-width: 0;
}

.list-item__meta {
  margin-top: 0.12rem;
  text-align: left;
}

.list-item__main-link .list-item__meta {
  margin-top: 0.12rem;
}

.image-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.image-zoom-modal[hidden] {
  display: none !important;
}

.image-zoom-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 19, 0.72);
}

.image-zoom-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  max-height: min(90vh, 36rem);
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 2.25rem 0.75rem 0.75rem;
}

.image-zoom-modal__image {
  max-width: 100%;
  max-height: min(calc(90vh - 3.5rem), 32rem);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.image-zoom-modal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  z-index: 2;
  padding: 0.2rem;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.image-zoom-modal__close i {
  font-size: 1.15rem;
  line-height: 1;
}

.progress-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.progress-modal[hidden] {
  display: none !important;
}

.progress-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 19, 0.55);
}

.progress-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.25rem 1.2rem;
  text-align: center;
}

.progress-modal__spinner {
  width: 2.1rem;
  height: 2.1rem;
  margin: 0 auto 0.9rem;
  border: 2.5px solid rgba(17, 20, 19, 0.12);
  border-top-color: rgb(35, 180, 169);
  border-radius: 50%;
  animation: progress-spin 0.75s linear infinite;
}

.progress-modal.is-error .progress-modal__spinner {
  display: none;
}

@keyframes progress-spin {
  to { transform: rotate(360deg); }
}

.progress-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.progress-modal__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.progress-modal__error {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.75rem;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  background: color-mix(in srgb, var(--danger) 10%, white);
  color: var(--danger);
  border-radius: var(--radius-sm);
  max-height: 12rem;
  overflow: auto;
}

.progress-modal__actions {
  margin-top: 1rem;
}

.progress-modal__actions .btn {
  min-width: 7rem;
}

[data-pick-pass-sheet] .more-sheet__header {
  margin-bottom: 0;
}

[data-pick-pass-sheet] .more-sheet__panel {
  /* Grow with content; stop a bit below the topbar */
  max-height: calc(100dvh - var(--safe-top) - 4.25rem);
  max-height: calc(100svh - var(--safe-top) - 4.25rem);
  overflow: hidden;
}

[data-pick-pass-sheet] .pick-pass-section {
  margin-top: 0.85rem;
  flex-shrink: 0;
}

[data-pick-pass-sheet] .pick-pass-section:has(.pass-picker-scroll) {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-pick-pass-sheet] .pick-pass-section:has(.pass-picker-scroll) > .pick-pass-section__title {
  flex-shrink: 0;
}

[data-pick-pass-sheet] .pick-pass-section[hidden] {
  display: none;
}

.pick-pass-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.9rem;
}

.pick-pass-section__list:empty {
  display: none;
}

.pick-pass-section__empty {
  margin: 0;
}

.pick-pass-section__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 2.25rem 1rem;
}

.pick-pass-section__empty-state .pick-pass-section__empty {
  margin: 0;
}

.more-sheet__link--completed .more-sheet__label {
  font-weight: 400;
}

.more-sheet__link--day-pass {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.more-sheet__link--day-pass:hover {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: #fff;
}

.more-sheet__link--day-pass .more-sheet__icon,
.more-sheet__link--day-pass i {
  color: #fff;
}

.more-sheet__day-pass-action {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 8.75rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.95);
  color: var(--btn-primary-bg);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}

.more-sheet__day-pass-action:hover {
  background: #fff;
  color: var(--btn-primary-hover-bg);
}

.more-sheet__trail .badge-pass {
  margin-left: 0;
}

.btn .fal {
  margin-right: 0.35rem;
}

.btn-icon-sm .fal,
.btn-icon-sm .fas,
.category-reorder .btn .fal,
.category-reorder .btn .fas {
  margin: 0;
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.btn-icon-sm .fa-times {
  font-size: 1.05rem;
}



.theme-picker {
  display: grid;
  gap: 0.75rem;
}

.theme-option {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.theme-option:has(input:checked) {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent-dark), var(--shadow);
}

.theme-option__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.theme-option__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.theme-option__desc {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.theme-option__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.theme-option__swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 20, 19, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Auth-test floating dock (collapsed by default) */
.auth-test-dock {
  --auth-test-bg: color-mix(in srgb, var(--danger) 10%, white);
  --auth-test-bg-strong: color-mix(in srgb, var(--danger) 16%, white);
  --auth-test-border: color-mix(in srgb, var(--danger) 24%, white);
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: min(22rem, calc(100vw - 1.5rem));
  display: flex;
  flex-direction: column-reverse;
  gap: 0.45rem;
  pointer-events: none;
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
}

.auth-test-dock__toggle,
.auth-test-dock__body {
  pointer-events: auto;
}

.auth-test-dock__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--auth-test-border);
  border-radius: var(--radius-sm);
  background: var(--auth-test-bg);
  box-shadow: none;
  color: var(--danger);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.auth-test-dock__toggle:hover {
  background: var(--auth-test-bg-strong);
}

.auth-test-dock__toggle-main {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.auth-test-dock__toggle-main strong,
.auth-test-dock__toggle-step,
.auth-test-dock__toggle-action,
.auth-test-dock__text,
.auth-test-dock__creds,
.auth-test-dock__creds dt,
.auth-test-dock__creds dd,
.auth-test-dock__creds code,
.auth-test-dock__mail,
.auth-test-dock__mail em {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  line-height: inherit;
  color: inherit;
}

.auth-test-dock__toggle-main strong {
  font-weight: 700;
}

.auth-test-dock__toggle-step {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-test-dock__toggle-action {
  flex: 0 0 auto;
  font-weight: 700;
}

.auth-test-dock__body {
  max-height: min(70dvh, 28rem);
  overflow: auto;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--auth-test-border);
  border-radius: var(--radius-sm);
  background: var(--auth-test-bg);
  box-shadow: none;
  color: var(--text);
}

.auth-test-dock__text {
  margin: 0 0 0.55rem;
}

.auth-test-dock__creds {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}

.auth-test-dock__creds dt {
  margin: 0;
  font-weight: 700;
}

.auth-test-dock__creds dd {
  margin: 0;
}

.auth-test-dock__creds code,
.admin-auth-test-status code {
  font-family: inherit;
  font-size: inherit;
  word-break: break-all;
}

.auth-test-dock__mail {
  margin: 0 0 0.55rem;
}

.auth-test-dock__mail em {
  font-style: normal;
  font-weight: 600;
}

.auth-test-dock__actions,
.auth-test-dock__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.auth-test-dock__nav {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--auth-test-border);
}

/* Keep dock above bottom nav when logged in */
body.app-shell:not(.hide-bottom-nav) .auth-test-dock {
  bottom: calc(var(--nav-height) + 0.75rem + env(safe-area-inset-bottom, 0px));
}

/* Shared date picker (replaces native type=date UI) */
.date-picker {
  position: relative;
  display: block;
  width: 100%;
}

.date-picker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.date-picker__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.date-picker__trigger:focus {
  outline: 2px solid var(--accent-dark);
  outline-offset: 1px;
}

.date-picker__value {
  flex: 1;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.date-picker__value.is-placeholder {
  color: var(--muted);
}

.date-picker__icon {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}

.date-picker__trigger:hover .date-picker__icon {
  color: var(--text);
}

#date-picker-sheet {
  z-index: 55;
}

.date-picker-sheet__panel {
  max-height: min(92dvh, 36rem);
}

.date-picker-sheet__nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.85rem;
  flex-shrink: 0;
}

.date-picker-sheet__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  padding: 0;
  border: 1.5px solid var(--btn-primary-bg);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.date-picker-sheet__nav-btn:hover {
  background: color-mix(in srgb, var(--btn-primary-bg) 12%, white);
  color: var(--text);
  border-color: var(--btn-primary-hover-bg);
}

.date-picker-sheet__nav-btn i {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.date-picker-sheet__period {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.date-picker-sheet__select {
  width: auto;
  max-width: 100%;
  min-height: 2.5rem;
  margin: 0;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.15rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-align: center;
  text-align-last: center;
}

.date-picker-sheet__select--year {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  min-width: 3.75rem;
}

.date-picker-sheet__select:focus {
  outline: none;
}

.date-picker-sheet__select::-ms-expand {
  display: none;
}

.date-picker-sheet__weekdays,
.date-picker-sheet__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.date-picker-sheet__weekdays {
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}

.date-picker-sheet__weekdays span {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.15rem 0;
}

.date-picker-sheet__days {
  /* Always reserve 6 week-rows so nav + Idag stay fixed while months vary */
  --date-picker-day-size: 2.65rem;
  --date-picker-day-gap: 0.35rem;
  min-height: calc(
    (var(--date-picker-day-size) * 6) + (var(--date-picker-day-gap) * 5)
  );
  align-content: start;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.date-picker-sheet__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--date-picker-day-size, 2.65rem);
  height: var(--date-picker-day-size, 2.65rem);
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.date-picker-sheet__day:hover:not(:disabled):not(.is-selected) {
  background: var(--accent);
}

.date-picker-sheet__day.is-past:not(.is-selected):not(:disabled) {
  color: color-mix(in srgb, var(--muted) 72%, white);
  font-weight: 500;
}

.date-picker-sheet__day.is-outside:not(.is-selected) {
  background: transparent;
  color: color-mix(in srgb, var(--muted) 72%, white);
  font-weight: 500;
  opacity: 1;
}

.date-picker-sheet__day.is-outside:hover:not(:disabled):not(.is-selected) {
  background: color-mix(in srgb, var(--accent-soft) 45%, white);
}

.date-picker-sheet__day.is-today:not(.is-selected):not(:disabled) {
  box-shadow: inset 0 0 0 2px var(--btn-primary-bg);
  color: var(--text);
  font-weight: 700;
}

.date-picker-sheet__day.is-selected {
  background: var(--btn-primary-bg);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
  opacity: 1;
}

.date-picker-sheet__day.is-selected:hover {
  background: var(--btn-primary-hover-bg);
  color: #fff;
}

.date-picker-sheet__day:disabled {
  cursor: not-allowed;
  background: color-mix(in srgb, var(--danger) 16%, white);
  color: color-mix(in srgb, var(--danger) 72%, var(--text));
  font-weight: 500;
  opacity: 1;
  box-shadow: none;
}

.date-picker-sheet__day.is-outside:disabled,
.date-picker-sheet__day.is-outside:disabled:hover {
  background: transparent;
  color: color-mix(in srgb, var(--danger) 48%, white);
}

.date-picker-sheet__footer {
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.date-picker-sheet__today {
  width: 100%;
}

