:root {
  --sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --sky: var(--palette-c4e0ff, #c4e0ff);
  --sport-blue: var(--palette-1673e8, #1673e8);
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
}
.page-heading h1 {
  font-weight: 850;
  letter-spacing: -0.045em;
}
.eyebrow {
  color: var(--palette-2470c3, #2470c3);
  font-weight: 800;
}
.brand-symbol {
  font-family: inherit;
  font-weight: 900;
  font-style: italic;
}
.sidebar {
  background: var(--palette-102d50, #102d50);
}
.btn,
.panel,
.stat-card {
  border-radius: var(--ui-radius);
}
.btn-primary,
.btn-dark {
  background: var(--palette-1263c8, #1263c8);
  box-shadow: 0 3px 0 var(--palette-0b479626, #0b479626);
}
.btn-primary:hover:where(html:not([data-touch-input]) *),
.btn-dark:hover:where(html:not([data-touch-input]) *) {
  background: var(--palette-0d55b1, #0d55b1);
}
.stat-card {
  border-top: 3px solid var(--palette-246bd2, #246bd2);
}
.stat-card > strong {
  font-variant-numeric: tabular-nums;
}
.welcome-banner {
  background:
    repeating-linear-gradient(125deg, transparent 0 80px, #ffffff05 80px 82px),
    linear-gradient(110deg, var(--palette-0d294d, #0d294d), var(--palette-174c86, #174c86));
  color: white;
  border: 0;
}
.welcome-banner h2 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}
.welcome-banner h2 em {
  color: var(--palette-a4d1ff, #a4d1ff);
  font-style: italic;
}
.welcome-banner p,
.welcome-banner .text-link {
  color: #dcecff;
}
.welcome-banner .tag-outline {
  border-color: #ffffff45;
  color: white;
}
.welcome-banner .btn-dark {
  background: var(--palette-e1efff, #e1efff);
  color: #102d50;
}
.banner-art,
.art-star {
  color: var(--palette-abd2ff, #abd2ff);
}
.art-progress {
  background: #ffffff12;
  border-color: #ffffff22;
  color: #c9e4ff;
}
.next-step-panel h2,
.plan-card h2,
.session-summary h2,
.sidebar-note strong {
  font-weight: 800;
}
.plan-card-icon {
  background: var(--palette-e4efff, #e4efff);
  color: var(--palette-1263c8, #1263c8);
}
.login-story {
  background:
    repeating-linear-gradient(125deg, transparent 0 80px, #ffffff05 80px 82px),
    linear-gradient(130deg, var(--palette-0d294d, #0d294d), var(--palette-174c86, #174c86));
}
.login-story h1 {
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
}
.screen-controls,
.screen-dock {
  display: none;
}
.message-editor-back {
  display: none;
}
[data-screen-unit][hidden] {
  display: none !important;
}
.screen-short-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.screen-text-button {
  min-height: 44px;
}

@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  body.screen-app {
    height: var(--screen-height, 100dvh);
    overflow: hidden;
    overscroll-behavior-y: none;
  }
  .screen-app #app,
  .screen-app .app-shell {
    height: var(--screen-height, 100dvh);
    min-height: 0;
  }
  .screen-app .main-shell {
    height: var(--screen-height, 100dvh);
    min-height: 0;
    display: grid;
    grid-template-rows: calc(50px + env(safe-area-inset-top)) minmax(0, 1fr) calc(
        56px + env(safe-area-inset-bottom)
      );
  }
  .screen-app .topbar {
    position: static;
    height: auto;
    min-height: 50px;
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid #d5e0ee;
  }
  .screen-app .topbar .demo-indicator,
  .screen-app .breadcrumb > span {
    display: none;
  }
  .screen-app .breadcrumb {
    font-size: 0;
  }
  .screen-app .breadcrumb strong {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .screen-app .topbar .icon-btn {
    width: 44px;
    height: 44px;
  }
  .screen-app .page-footer {
    display: none;
  }
  .screen-deck {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 68px;
    gap: 10px;
    height: 100%;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 12px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  }
  .screen-deck.screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr) 68px;
  }
  .screen-deck > .page-heading {
    margin: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .screen-deck > .page-heading > div {
    min-width: 0;
  }
  .screen-deck > .page-heading h1 {
    font-size: clamp(21px, 5.6vw, 27px);
    line-height: 1.05;
    text-transform: uppercase;
  }
  .screen-deck > .page-heading p,
  .screen-deck > .page-heading .eyebrow {
    display: none;
  }
  .screen-deck > .page-heading .btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    max-width: 112px;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
    flex-shrink: 0;
  }
  .screen-back {
    font-size: 0;
    width: 28px;
    height: 44px;
    margin: 0 !important;
    flex-shrink: 0;
    display: grid;
    place-items: center;
  }
  .screen-back::after {
    content: '←';
    font-size: 24px;
  }
  .screen-deck > .profile-heading {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    gap: 8px;
    min-width: 0;
  }
  .screen-deck > .profile-heading > .avatar {
    display: none;
  }
  .screen-deck > .profile-heading > div:not(.profile-actions) {
    flex: 1;
    min-width: 0;
  }
  .screen-deck > .profile-heading .eyebrow {
    display: none;
  }
  .screen-deck > .profile-heading h1 {
    font-size: 23px;
    line-height: 1.1;
    text-transform: uppercase;
  }
  .screen-deck > .profile-heading p {
    font-size: 10px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .screen-deck > .profile-heading .profile-actions {
    margin: 0;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .screen-deck > .profile-heading .profile-actions .btn {
    font-size: 0;
    padding: 10px;
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
  .screen-deck > .profile-heading .profile-actions .icon {
    width: 19px;
    height: 19px;
  }
  .screen-stage {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
  }
  .screen-stage:focus {
    outline: none;
  }
  .screen-stage .screen-flat {
    display: contents !important;
  }
  .screen-stage > :not([hidden]) {
    margin-bottom: 10px;
  }
  .screen-stage .panel,
  .screen-stage .stat-card {
    box-shadow: 0 3px 12px var(--palette-153a6410, #153a6410);
  }
  .screen-stage .panel {
    margin-bottom: 0;
  }
  .screen-stage .panel-heading {
    padding: 12px 16px 10px;
  }
  .screen-stage .panel-heading h2 {
    font-size: 17px;
    font-weight: 800;
  }
  .screen-stage .panel-heading p {
    display: none;
  }
  .screen-stage .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
  }
  .screen-stage .stat-card {
    padding: 14px;
    min-height: 100px;
  }
  .screen-stage .stat-top > span:first-child {
    font-size: 11px;
    max-width: none;
  }
  .screen-stage .stat-card > strong {
    font-size: 32px;
    line-height: 1.15;
    margin-block: 8px;
  }
  .screen-stage .goal-stat > strong {
    font-size: 17px;
  }
  .screen-stage .stat-detail {
    font-size: 11px;
    line-height: 1.4;
  }
  .screen-stage .btn,
  .screen-stage .icon-btn,
  .screen-stage .text-link {
    min-height: 44px;
  }
  .screen-stage .btn {
    font-size: 13px;
    white-space: normal;
    line-height: 1.25;
    padding: 10px 12px;
  }
  .screen-stage .text-link {
    font-size: 13px;
  }
  .screen-stage input,
  .screen-stage select,
  .screen-stage textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .screen-stage textarea {
    resize: none;
    min-height: 76px;
    max-height: 125px;
  }
  .screen-stage label {
    font-size: 13px;
  }
  .screen-stage .fine-print {
    font-size: 12px;
    line-height: 1.45;
  }
  .screen-stage .welcome-banner {
    padding: 24px;
    min-height: 0;
    height: auto;
  }
  .screen-stage .welcome-banner h2 {
    font-size: 30px;
  }
  .screen-stage .banner-art {
    display: none;
  }
  .screen-stage .welcome-banner p {
    font-size: 14px;
    line-height: 1.5;
  }
  .screen-stage .next-step-panel {
    min-height: 0;
    padding: 22px;
  }
  .screen-stage .next-step-panel h2 {
    font-size: 27px;
  }
  .screen-stage .plan-card {
    padding: 18px;
  }
  .screen-stage .plan-card h2 {
    font-size: 25px;
    margin-top: 12px;
  }
  .screen-stage .plan-card > p {
    font-size: 14px;
    line-height: 1.5;
  }
  .screen-stage .plan-card-bottom {
    gap: 8px;
    flex-wrap: wrap;
  }
  .screen-stage .plan-day-list {
    margin-block: 12px;
  }
  .screen-stage .plan-day-list > div {
    padding-block: 10px;
  }
  .screen-stage .profile-plan {
    padding: 16px;
  }
  .screen-stage .profile-plan h3 {
    font-size: 23px;
    margin-block: 10px;
  }
  .screen-stage .profile-plan > p {
    font-size: 14px;
    line-height: 1.5;
  }
  .screen-stage .private-note-panel {
    padding: 18px;
  }
  .screen-stage .list-toolbar {
    padding: 12px;
    gap: 8px;
  }
  .screen-stage .table-scroll {
    overflow: visible;
  }
  .screen-stage .client-table,
  .screen-stage .client-table tbody {
    display: block;
    width: 100%;
  }
  .screen-stage .client-table thead {
    display: none;
  }
  .screen-stage .client-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 12px;
    border-top: 1px solid var(--line);
  }
  .screen-stage .client-table td {
    display: block !important;
    padding: 0 !important;
    border: 0;
    font-size: 12px;
  }
  .screen-stage .client-table td:first-child {
    grid-column: 1;
  }
  .screen-stage .client-table td:nth-child(2),
  .screen-stage .client-table td:nth-child(3) {
    grid-column: 1;
    padding-left: 42px !important;
    line-height: 1.7;
  }
  .screen-stage .client-table td:last-child {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }
  .screen-stage .client-identity strong {
    font-size: 15px;
  }
  .screen-stage .client-identity span > span {
    max-width: none;
    font-size: 12px;
    white-space: normal;
  }
  .screen-stage .client-table .icon-btn {
    width: 44px;
  }
  .screen-stage .plan-label {
    font-size: 11px;
  }
  .screen-stage .activity-list,
  .screen-stage .checkin-list {
    padding-inline: 16px;
  }
  .screen-stage .activity-item {
    padding-block: 8px;
  }
  .screen-stage .activity-item strong {
    font-size: 13px;
  }
  .screen-stage .activity-item p,
  .screen-stage .activity-item time {
    font-size: 11px;
  }
  .screen-stage .checkin-list article {
    padding-block: 12px;
  }
  .screen-stage .checkin-list p {
    font-size: 14px;
    line-height: 1.5;
  }
  .screen-stage .movement-card {
    padding: 0;
  }
  .screen-stage .movement-card h2 {
    font-size: 17px;
    font-weight: 800;
  }
  .screen-stage .training-library-controls {
    gap: 8px;
    margin-bottom: 0;
  }
  .screen-stage .training-library-controls label {
    font-size: 13px;
  }
  .screen-stage .training-library-filter {
    font-size: 13px;
  }
  .screen-stage .schedule-card,
  .screen-stage .client-schedule {
    margin: 0;
  }
  .screen-stage .account-form {
    padding: 0 16px 16px;
  }
  .screen-stage form > label {
    margin-bottom: 12px;
  }
  .screen-stage .session-list {
    padding: 0 16px 12px;
  }
  .screen-stage .session-list p {
    white-space: normal;
    font-size: 11px;
    line-height: 1.4;
  }
  .screen-stage .session-list article {
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .screen-stage .account-audit {
    padding-inline: 16px;
  }
  .screen-stage .exercise-progress-chart,
  .screen-stage .weight-chart,
  .screen-stage .week-chart {
    max-height: 190px;
  }
  .screen-stage .progress-selector {
    margin: 0;
  }
  .screen-stage .training-history-row {
    padding-block: 10px;
  }
  .screen-stage .training-session-progress {
    position: static;
    margin: 0 0 10px;
    padding: 10px 12px;
  }
  .screen-stage .training-workout-card > summary {
    padding: 12px 14px;
    min-height: 58px;
  }
  .screen-stage .workout-layout {
    display: block;
  }
  .screen-stage .workout-exercises {
    display: block;
  }
  .screen-stage .training-workout-body .set-grid {
    margin: 0;
  }
  .screen-stage .set-target-hint {
    font-size: 12px;
    line-height: 1.4;
    padding-block: 6px;
  }
  .screen-stage .session-summary {
    padding: 16px;
  }
  .screen-stage .session-summary h2 {
    font-size: 26px;
  }
  .screen-controls {
    display: flex;
    flex-direction: column;
    padding-top: 6px;
    gap: 4px;
    border-top: 1px solid var(--palette-d4deeb, #d4deeb);
  }
  .screen-tab-picker {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: center;
  }
  .screen-tab-picker > label {
    position: relative;
    min-width: 0;
  }
  .screen-tab-picker select {
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    padding-inline-end: 70px !important;
    font-size: 14px;
    font-weight: 750;
    background: #fff;
    border: 1px solid var(--palette-c6d6e8, #c6d6e8);
  }
  .screen-count {
    position: absolute;
    right: 40px;
    top: 15px;
    font-size: 10px;
    color: #60809e;
    pointer-events: none;
  }
  .screen-controls .icon-btn {
    height: 44px;
    width: 44px;
    background: #e5edf8;
    color: var(--navy);
    border: 1px solid var(--palette-d0ddee, #d0ddee);
  }
  .screen-previous .icon {
    transform: rotate(180deg);
  }
  .screen-swipe-hint {
    text-align: center;
    font-size: 9px;
    letter-spacing: 0.13em;
    font-weight: 700;
    color: #7390aa;
  }
  .screen-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--palette-102d50, #102d50);
    color: #fff;
    padding-bottom: env(safe-area-inset-bottom);
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  }
  .screen-dock a,
  .screen-dock button {
    min-width: 0;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: none;
    color: inherit;
    font-size: 10px;
    font-weight: 650;
  }
  .screen-dock .icon {
    width: 18px;
    height: 18px;
  }
  .screen-dock [aria-current] {
    color: white;
    background: #ffffff0b;
    border-top: 3px solid var(--palette-73b9ff, #73b9ff);
  }
  .screen-dialog {
    position: fixed;
    inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    width: auto;
    height: calc(var(--screen-height, 100dvh) - 16px);
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) 68px;
    gap: 12px;
  }
  .screen-dialog:not([open]) {
    display: none;
  }
  .screen-dialog .modal-header {
    margin: 0;
    min-height: 44px;
  }
  .screen-dialog .modal-header h2 {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 850;
  }
  .screen-dialog .modal-header .icon-btn {
    width: 44px;
    height: 44px;
  }
  .screen-dialog .modal-actions {
    margin-top: 12px;
  }
  .screen-dialog .modal-description {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
  }
  .screen-dialog .booking-form-grid,
  .screen-dialog .form-row {
    gap: 10px;
  }
  .screen-dialog .builder-target-details {
    margin-top: 0;
  }
  .screen-dialog .training-builder-card {
    padding: 12px;
  }
  .screen-dialog .builder-set-targets {
    gap: 8px;
  }
  .screen-dialog .reading-page p {
    font-size: 16px;
    line-height: 1.7;
  }
  .screen-stage .calendar-toolbar {
    padding: 10px;
    margin: 0;
  }
  .screen-stage .calendar-week-controls {
    gap: 4px;
    flex-wrap: wrap;
  }
  .screen-stage .calendar-week-controls > strong {
    flex: 1;
    font-size: 12px;
  }
  .screen-stage .calendar-week-controls .icon-btn {
    width: 32px;
    min-height: 32px;
  }
  .screen-stage .calendar-week-controls .btn {
    min-height: 32px;
    padding: 6px;
    font-size: 11px;
  }
  .screen-stage .calendar-view-toggle button {
    min-height: 32px;
    padding: 6px 10px;
  }
  .screen-stage .month-calendar {
    margin-top: 8px;
    margin-bottom: 0;
    height: calc(100% - var(--screen-calendar-toolbar, 110px) - 24px);
    display: grid;
    grid-template-rows: 24px minmax(0, 1fr);
  }
  .screen-stage .month-grid {
    /* Reserve six equal tracks even when this month only needs four or five. */
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: var(--month-grid-gap, 6px);
  }
  .screen-stage .month-cell {
    min-height: 0;
    padding: 3px;
    gap: 1px;
    overflow: hidden;
  }
  .screen-stage .month-date {
    width: 18px;
    height: 18px;
  }
  .screen-stage .month-cell-count {
    font-size: 8px;
    line-height: 1.1;
  }
  .screen-stage .week-timeline-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 8px;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: thin;
  }
  .screen-stage .week-column-headings {
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 4;
  }
  .screen-stage .week-day-heading {
    padding: 4px 0;
    gap: 0;
  }
  .screen-stage .week-day-heading small {
    display: none;
  }
  .screen-stage .week-hour-label {
    font-size: 8px;
  }
  .screen-stage .week-hour-label span {
    top: 2px;
  }
  .screen-stage .week-event strong {
    font-size: 8px;
  }
  .screen-stage .week-event {
    min-height: 0;
  }
  .screen-stage .week-time-columns {
    padding-bottom: 16px;
  }
  .screen-stage .messages-layout {
    display: block;
    height: calc(100% - 10px);
    margin-bottom: 10px;
  }
  .screen-stage .conversation-list {
    display: block;
    border: 0;
    max-height: none;
    overflow: visible;
  }
  .screen-stage .message-conversation {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
  }
  .screen-stage .message-header {
    padding: 10px;
    min-height: 56px;
  }
  .screen-stage .message-profile-link {
    min-height: 36px;
    padding: 6px;
    font-size: 11px;
  }
  .screen-stage .message-thread {
    min-height: 0;
    height: auto;
    padding: 12px;
  }
  .screen-stage .message-composer {
    padding: 8px 10px;
  }
  .screen-stage .message-composer textarea {
    min-height: 44px;
    height: 54px;
    margin-top: 4px;
  }
  .screen-stage .message-composer > label,
  .screen-stage .message-composer > div > span {
    display: none;
  }
  .screen-stage .message-composer > div {
    margin-top: 6px;
  }
  #toast {
    bottom: calc(126px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
  }
}
@media (max-width: 960px) and (max-height: 500px) {
  .screen-app .main-shell {
    grid-template-rows: 44px minmax(0, 1fr);
  }
  .screen-app .topbar {
    min-height: 44px;
  }
  .screen-app .screen-dock {
    display: none;
  }
  .screen-deck {
    padding-top: 6px;
    gap: 6px;
    grid-template-rows: minmax(0, 1fr) 52px;
  }
  .screen-deck.screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr) 52px;
  }
  .screen-deck > .page-heading h1,
  .screen-deck > .profile-heading h1 {
    font-size: 20px;
  }
  .screen-deck > .page-heading .btn {
    font-size: 0;
    max-width: 44px;
    min-width: 44px;
  }
  .screen-deck > .profile-heading p {
    font-size: 9px;
  }
  .screen-stage .stat-card {
    min-height: 0;
    padding: 10px;
  }
  .screen-stage .stat-card > strong {
    font-size: 27px;
    margin-block: 4px;
  }
  .screen-stage .goal-stat > strong {
    font-size: 16px;
  }
  .screen-swipe-hint {
    display: none;
  }
  .screen-dialog {
    grid-template-rows: auto minmax(0, 1fr) 52px;
    gap: 8px;
    padding: 10px;
  }
  .screen-stage .panel-heading {
    display: none;
  }
  .screen-stage .welcome-banner,
  .screen-stage .next-step-panel {
    padding: 12px;
  }
  .screen-stage .welcome-banner h2,
  .screen-stage .next-step-panel h2 {
    font-size: 24px;
    margin-block: 8px;
  }
  .screen-stage .profile-plan {
    padding: 10px;
  }
  .screen-stage .profile-plan h3 {
    font-size: 19px;
    margin-block: 6px;
  }
  .screen-stage .plan-card-icon {
    width: 24px;
    height: 24px;
  }
  .screen-stage .weight-chart,
  .screen-stage .week-chart,
  .screen-stage .exercise-progress-chart {
    height: 100px;
    max-height: 100px;
    margin-block: 6px;
  }
  .screen-stage .progress-extra > summary {
    display: none;
  }
  .screen-stage .progress-extra > div {
    padding: 8px;
  }
  .screen-stage .exercise-progress-body {
    padding: 8px;
  }
  .screen-stage .training-workout-card > summary {
    display: none;
  }
  .screen-stage .training-workout-body {
    padding: 8px;
  }
  .screen-stage .account-form {
    padding: 10px;
  }
}

@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  body.screen-access {
    height: var(--screen-height, 100dvh);
    overflow: hidden;
  }
  .screen-access #app,
  .screen-access .login-layout,
  .screen-access .access-layout {
    height: var(--screen-height, 100dvh);
    min-height: 0;
    padding: 0;
    display: block;
  }
  .screen-access .login-story {
    display: none;
  }
  .screen-access .login-form-area {
    padding: 0;
    height: 100%;
    display: block;
  }
  .screen-access .login-card,
  .screen-access .access-card {
    width: 100%;
    max-width: none;
    height: var(--screen-height, 100dvh);
    border: 0;
    border-radius: 0;
    padding: 20px 16px max(12px, env(safe-area-inset-bottom));
    margin: 0;
    box-shadow: none;
  }
  .screen-access .screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr) 68px;
  }
  .screen-access h1,
  .screen-access h2 {
    text-transform: uppercase;
    font-size: clamp(22px, 6vw, 30px);
    margin: 0;
    line-height: 1.1;
  }
  .screen-access .screen-stage > .brand {
    margin-bottom: 16px;
  }
  .screen-access .screen-stage .demo-access {
    margin: 0;
  }
  .screen-stage .exercise-progress-body {
    padding: 0 16px 16px;
  }
  .screen-stage .progress-extra > summary {
    padding: 12px 16px;
  }
  .screen-stage .progress-extra > div {
    padding: 12px 16px;
  }
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-stage .training-workout-card > summary {
    padding: 8px 12px;
    min-height: 50px;
  }
  .screen-stage .training-workout-card > summary h2 {
    font-size: 18px;
    line-height: 1.2;
  }
  .screen-stage .training-workout-card > summary p {
    font-size: 11px;
  }
  .screen-stage .training-workout-body .set-grid-heading {
    padding-block: 4px;
  }
}
@media (max-width: 960px) and (max-height: 500px) {
  .screen-deck:has(#workout-form) > .page-heading {
    display: none;
  }
  .screen-deck:has(#workout-form) {
    grid-template-rows: minmax(0, 1fr) 52px;
  }
  .screen-stage .training-workout-card > summary,
  .screen-stage .session-summary > h2,
  .screen-stage .session-summary > .eyebrow {
    display: none;
  }
  .screen-stage .training-session-progress {
    padding: 4px 10px;
    margin-bottom: 6px;
  }
  .screen-stage .session-summary {
    padding: 10px;
  }
  .screen-stage .session-summary textarea {
    height: 76px;
  }
  .screen-stage .exercise-progress-body,
  .screen-stage .progress-extra > div {
    padding: 8px;
  }
}
.workout-reference-actions {
  display: none;
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-stage .workout-reference-actions {
    display: flex;
    gap: 2px;
    margin-left: auto;
  }
  .screen-stage .workout-reference-actions button {
    width: 44px;
    height: 44px;
  }
  .screen-stage .exercise-done-count,
  .screen-stage .training-workout-body > .exercise-instructions,
  .screen-stage .training-workout-body > .last-results,
  .screen-stage .training-workout-body > .first-result-hint {
    display: none;
  }
  .screen-stage .training-workout-card > summary p {
    display: none;
  }
  .screen-stage .training-workout-card > summary .workout-number {
    display: none;
  }
  .screen-stage .training-workout-card > summary > div {
    min-width: 0;
  }
  .screen-stage .set-target-hint > div {
    gap: 8px;
  }
}
@media (max-width: 760px) and (max-height: 650px) {
  .screen-stage .session-summary > h2,
  .screen-stage .session-summary > .eyebrow {
    display: none;
  }
  .screen-stage .training-workout-body {
    padding: 0 10px 10px;
  }
}
@media (max-width: 960px) and (max-height: 500px) {
  .screen-stage .training-workout-card > summary {
    display: flex;
    padding: 0 6px;
  }
  .screen-stage .training-workout-card > summary h2 {
    font-size: 16px;
  }
}
@media (max-width: 960px) and (max-height: 500px) {
  .screen-app:has(#workout-form) .topbar .breadcrumb {
    visibility: hidden;
  }
  .screen-stage .training-session-progress {
    position: fixed;
    top: 8px;
    left: 64px;
    right: 96px;
    z-index: 5;
    margin: 0;
  }
  .screen-stage .training-workout-body {
    padding-bottom: 0;
  }
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-dialog .builder-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
  .screen-dialog .builder-tabs button {
    min-height: 44px;
  }
  .screen-dialog .builder-set-targets fieldset > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .screen-dialog .builder-basic-targets {
    margin-block: 10px;
  }
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-stage p,
  .screen-stage h2,
  .screen-stage h3,
  .screen-stage label,
  .screen-stage strong {
    overflow-wrap: break-word;
    word-break: normal;
  }
}
.profile-heading h1,
.screen-access h1,
.screen-access h2 {
  font-weight: 850;
}

/* Performance direction: hard edges, electric blue and high-contrast athletic headings. */
:root {
  --navy: #0a1527;
  --sport-blue: var(--palette-075bff, #075bff);
  --sky: var(--palette-c3d8ff, #c3d8ff);
  --line: #d9dee8;
}
body {
  background: #edf0f4;
}
.sidebar {
  background: var(--palette-080f1d, #080f1d);
  border-right: 3px solid var(--palette-075bff, #075bff);
}
.brand {
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -1.2px;
}
.brand-symbol {
  border-radius: 2px;
  background: var(--palette-075bff, #075bff);
  color: white;
  transform: skew(-8deg);
}
/* Shared shapes match Home; individual calendar cells keep their grid geometry. */
:root {
  --card-radius: var(--ui-radius);
  --field-radius: var(--ui-radius);
  --stat-radius: var(--ui-radius);
}
.panel,
.plan-card,
.training-builder-card,
.training-workout-card {
  border-radius: var(--card-radius);
}
.stat-card {
  border-radius: var(--stat-radius);
}
input:not([type='checkbox']):not([type='radio']):not([type='range']),
select,
textarea {
  border-radius: var(--field-radius);
}
dialog {
  border-radius: var(--card-radius);
}
.btn {
  font-weight: 800;
  border-radius: var(--ui-radius);
}
.btn-primary,
.btn-dark {
  background: var(--primary-action-fill);
  border: 1px solid var(--primary-action-border);
  box-shadow:
    0 3px 8px var(--palette-075bff22, #075bff22),
    inset 0 1px 0 var(--primary-action-highlight, #ffffff26);
}
.btn-primary:hover:where(html:not([data-touch-input]) *),
.btn-dark:hover:where(html:not([data-touch-input]) *) {
  background: var(--primary-action-hover);
}
.btn-secondary {
  background: #f9fbff;
  border-color: var(--palette-c6d5e7, #c6d5e7);
  box-shadow: 0 2px 4px var(--palette-19365208, #19365208);
}
.page-heading,
.profile-heading {
  background: repeating-linear-gradient(120deg, transparent 0 70px, #ffffff04 70px 88px), #0a1527;
  color: #fff;
  border-left: 5px solid var(--palette-075bff, #075bff);
  padding: 24px;
  position: relative;
}
.page-heading h1,
.profile-heading h1,
.welcome-banner h2,
.login-story h1 {
  font-family: 'Arial Black', 'Segoe UI', sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.055em;
}
.page-heading h1 {
  line-height: 1.08;
}
.page-heading p,
.profile-heading p {
  color: #b7c6db;
}
.page-heading .eyebrow,
.profile-heading .eyebrow {
  color: var(--palette-6d9dff, #6d9dff);
  letter-spacing: 2px;
}
.page-heading .btn-secondary,
.profile-heading .btn-secondary {
  background: var(--palette-17243a, #17243a);
  color: #fff;
  border-color: #465570;
}
.page-heading .btn-secondary:hover:where(html:not([data-touch-input]) *),
.profile-heading .btn-secondary:hover:where(html:not([data-touch-input]) *) {
  background: var(--palette-263951, #263951);
}
.profile-heading > .avatar {
  border-radius: 3px;
  background: var(--palette-075bff, #075bff);
  color: #fff;
}
.stat-card {
  background: var(--palette-101e34, #101e34);
  color: #fff;
  border: 0;
  border-top: 3px solid var(--palette-075bff, #075bff);
  box-shadow: none;
}
.stat-top > span:first-child,
.stat-detail,
.stat-card .stat-detail {
  color: #b5c6df;
}
.stat-card > strong {
  color: #fff;
  font-style: italic;
  font-weight: 900;
}
.stat-card .stat-icon {
  background: var(--palette-203553, #203553);
  color: var(--palette-8bb6ff, #8bb6ff);
  border-radius: 2px;
}
.panel-heading h2,
.plan-card h2,
.movement-card h2,
.profile-plan h3,
.modal-header h2 {
  font-weight: 850;
  letter-spacing: -0.035em;
}
.welcome-banner,
.login-story {
  background: linear-gradient(
    125deg,
    #0a1527 55%,
    var(--palette-003cb1, #003cb1) 55%,
    var(--palette-075bff, #075bff) 78%,
    var(--palette-004ad7, #004ad7) 78%
  );
  border-radius: var(--ui-radius);
}
.welcome-banner h2 em {
  color: var(--palette-6a9dff, #6a9dff);
}
.welcome-banner .tag-outline {
  border-radius: 2px;
}
.welcome-banner .btn-dark {
  background: var(--palette-075bff, #075bff);
  color: white;
}
.nav-link.active {
  background: var(--palette-075bff, #075bff);
  color: #fff;
  border-radius: var(--ui-radius);
}
.screen-dock {
  background: var(--palette-102238, #080f1d);
}

@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-app .topbar {
    background: var(--palette-080f1d, #0a1527);
    color: #fff;
    border-bottom: 2px solid var(--palette-075bff, #075bff);
  }
  .screen-app .topbar .icon-btn {
    color: var(--palette-cad8ee, #cad8ee);
  }
  .screen-app .topbar-avatar {
    background: var(--palette-075bff, #075bff);
    color: #fff;
    border-radius: 3px;
  }
  .screen-document {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    height: 100%;
    padding: 14px max(14px, env(safe-area-inset-right)) 22px max(14px, env(safe-area-inset-left));
    margin: 0;
    max-width: none;
    overscroll-behavior: contain;
  }
  .screen-document-content {
    height: auto;
    overflow: visible;
  }
  .screen-document-content > :not([hidden]) {
    margin-bottom: 10px;
  }
  .screen-stage {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .screen-fixed-panel {
    overflow: hidden;
  }
  .screen-fixed-panel.screen-calendar-scroll {
    overflow-y: auto;
  }
  .screen-stage .month-calendar {
    min-height: calc(
      24px + 6 * var(--month-min-tile-height, 75px) + 5 * var(--month-grid-gap, 6px)
    );
  }
  .screen-controls[hidden] {
    display: none !important;
  }
  .screen-deck.screen-single {
    grid-template-rows: minmax(0, 1fr);
  }
  .screen-deck.screen-single.screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .screen-document-content .panel-heading {
    display: flex;
  }
  .screen-stage .panel-heading h2 {
    font-size: 18px;
  }
  .screen-stage .progress-extra > summary {
    display: flex;
  }
  .screen-stage .stat-card {
    box-shadow: none;
  }
  .screen-stage .stat-card > strong {
    font-size: 34px;
  }
  .screen-stage .goal-stat > strong {
    font-size: 17px;
  }
  .screen-stage .stat-detail {
    font-size: 11px;
    line-height: 1.5;
  }
  .screen-deck > .page-heading,
  .screen-document-content > .page-heading {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .screen-deck > .page-heading h1,
  .screen-document-content > .page-heading h1 {
    font-size: 28px;
    line-height: 1.07;
  }
  .screen-deck > .page-heading .eyebrow,
  .screen-document-content > .page-heading .eyebrow {
    display: block;
    font-size: 9px;
    margin-bottom: 6px;
  }
  .screen-deck > .page-heading p,
  .screen-document-content > .page-heading p {
    display: none;
  }
  .screen-deck > .page-heading > .btn,
  .screen-document-content > .page-heading > .btn {
    align-self: flex-start;
    max-width: none;
    font-size: 13px;
    padding: 10px 12px;
  }
  .screen-document-content > .back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 8px;
  }
  .screen-document-content > .profile-heading {
    display: flex;
    flex-wrap: wrap;
    padding: 18px 16px;
    gap: 10px;
  }
  .screen-document-content > .profile-heading > .avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }
  .screen-document-content > .profile-heading > div:not(.profile-actions) {
    flex: 1;
    min-width: 0;
  }
  .screen-document-content > .profile-heading h1 {
    font-size: 28px;
    line-height: 1.1;
    margin-top: 4px;
  }
  .screen-document-content > .profile-heading .eyebrow {
    font-size: 9px;
  }
  .screen-document-content > .profile-heading p {
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  .screen-document-content > .profile-heading .profile-actions {
    margin: 8px 0 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .screen-document-content > .profile-heading .profile-actions .btn {
    width: 100%;
    min-height: 44px;
    font-size: 12px;
  }
  .screen-stage .training-session-progress {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    z-index: 1;
    background: #0a1527;
    color: white;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 3px;
  }
  .screen-deck:has(#workout-form) > .page-heading {
    display: flex;
  }
  .screen-deck:has(#workout-form).screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr) 68px;
  }
  .screen-app:has(#workout-form) .topbar .breadcrumb {
    visibility: visible;
  }
  .screen-stage .training-workout-card > summary {
    display: flex;
    padding: 12px;
  }
  .screen-stage .session-summary > h2 {
    display: block;
    font-size: 25px;
  }
  .screen-stage .session-summary > .eyebrow {
    display: block;
  }
  .screen-stage .training-workout-body {
    padding: 0 12px 12px;
  }
  .screen-stage .conversation-row,
  .screen-stage .conversation {
    width: 100%;
    flex: none;
  }
  .screen-stage .conversation-list {
    padding: 10px;
  }
  .screen-stage .calendar-filters {
    padding-top: 4px;
  }
  .screen-stage .calendar-filters > label {
    flex-basis: 180px;
    min-width: min(100%, 180px);
  }
  .screen-stage .calendar-week-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    gap: 4px;
  }
  .screen-stage .calendar-week-controls > strong {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
  }
  .screen-stage .calendar-week-controls > :first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .screen-stage .calendar-week-controls > :nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }
  .screen-stage .calendar-week-controls > :last-child {
    grid-column: 4;
    grid-row: 1;
  }
  .screen-stage .calendar-range-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 4px;
    min-width: 0;
  }
  .screen-stage .calendar-week-controls .calendar-view-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
  .screen-stage .calendar-week-controls .icon-btn,
  .screen-stage .calendar-week-controls .btn,
  .screen-stage .calendar-view-toggle button {
    min-height: 44px;
  }
  .screen-stage .calendar-week-controls .icon-btn {
    width: 44px;
  }
  .screen-stage .calendar-week-controls .calendar-view-toggle button {
    min-width: 0;
    width: 100%;
    padding: 8px 6px;
    white-space: nowrap;
  }
  .screen-dock {
    background: var(--palette-102238, #080f1d);
  }
  .screen-dock [aria-current] {
    color: #fff;
    background: var(--palette-243f60, #243f60);
    border-top: 3px solid var(--palette-7799bf, #7799bf);
  }
  .screen-controls .icon-btn {
    border-radius: var(--ui-radius);
    background: #0a1527;
    border-color: #0a1527;
    color: #fff;
  }
  .screen-tab-picker select {
    border-radius: var(--ui-radius);
  }
  body.screen-access {
    height: auto;
    overflow: auto;
  }
  .screen-access #app,
  .screen-access .login-layout,
  .screen-access .access-layout {
    height: auto;
    min-height: var(--screen-height, 100dvh);
    padding: 0;
  }
  .screen-access .login-form-area {
    height: auto;
    padding: 20px 16px;
  }
  .screen-access .login-card,
  .screen-access .access-card {
    height: auto;
    min-height: var(--screen-height, 100dvh);
    padding: 24px 16px;
  }
  .screen-access h1,
  .screen-access h2 {
    margin-block: 16px;
  }
  .screen-form-dialog {
    position: fixed;
    inset: 8px;
    width: auto;
    max-width: none;
    height: auto;
    max-height: calc(var(--screen-height, 100dvh) - 16px);
    margin: auto 0;
    padding: 18px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  dialog.modal-wide.screen-form-dialog {
    width: auto;
  }
  .screen-form-dialog .modal-header {
    position: sticky;
    top: -18px;
    background: white;
    z-index: 2;
    padding-block: 8px;
    border-bottom: 3px solid var(--palette-075bff, #075bff);
  }
  .screen-form-dialog .modal-header h2 {
    font-size: 24px;
  }
  .screen-form-dialog input:not([type='checkbox']):not([type='radio']),
  .screen-form-dialog select,
  .screen-form-dialog textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .screen-form-dialog .icon-btn,
  .screen-form-dialog .text-link {
    min-width: 44px;
    min-height: 44px;
  }
  .screen-form-dialog .builder-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
  .screen-form-dialog .builder-tabs button {
    min-height: 44px;
  }
  .screen-form-dialog .builder-set-targets fieldset > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .screen-form-dialog .availability-period {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 44px;
  }
  .screen-form-dialog .modal-actions {
    flex-wrap: wrap;
  }
  .screen-form-dialog .modal-actions .btn {
    min-height: 44px;
  }
  #toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 960px) and (max-height: 500px) {
  .screen-deck > .page-heading {
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
  }
  .screen-deck > .page-heading h1 {
    font-size: 22px;
  }
  .screen-deck > .page-heading .eyebrow {
    display: none;
  }
  .screen-deck:has(#workout-form).screen-with-heading {
    grid-template-rows: auto minmax(0, 1fr) 52px;
  }
  .screen-document-content .weight-chart,
  .screen-document-content .week-chart,
  .screen-document-content .exercise-progress-chart {
    height: 190px;
    max-height: 190px;
  }
}

/* Keep completion visible across the exercise name and its position counter. */
.screen-tab-picker > .workout-item-complete select {
  box-shadow: inset 0 -3px 0 currentColor;
  font-weight: 800;
}
.screen-tab-picker > .workout-item-complete .screen-count {
  font-weight: 800;
}
