:root {
  --sans:'Segoe UI',-apple-system,BlinkMacSystemFont,sans-serif;
  --serif: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --navy: #102d50; --sky: var(--palette-c4e0ff,#c4e0ff); --line: #dce5ef; --sport-blue: var(--palette-1673e8,#1673e8);
}
body { background: #f1f5fa; }
h1, h2, h3 { letter-spacing: -.035em; }
.page-heading h1 { font-weight: 850; letter-spacing: -.045em; }
.eyebrow { color: var(--palette-2470c3,#2470c3); font-weight: 800; }
.brand { font-weight: 850; letter-spacing: -.8px; }
.brand-symbol { font-family: inherit; font-weight: 900; font-style: italic; border-radius: 6px; }
.sidebar { background: var(--palette-102d50,#102d50); }
.btn, .panel, .stat-card { border-radius: 8px; }
.btn-primary, .btn-dark { background: var(--palette-1263c8,#1263c8); box-shadow: 0 3px 0 var(--palette-0b479626,#0b479626); }
.btn-primary:hover, .btn-dark:hover { background: var(--palette-0d55b1,#0d55b1); }
.stat-card { border-top: 3px solid var(--palette-246bd2,#246bd2); }
.stat-card > strong { font-weight: 800; 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: -.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; }
[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: .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: 12px; }
  .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: 18px; }
  .screen-stage .movement-card h2 { font-size: 23px; font-weight: 800; }
  .screen-stage .training-library-controls { gap: 8px; margin-bottom: 0; }
  .screen-stage .training-library-controls label { 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: .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 { grid-auto-rows: minmax(0,1fr); }
  .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 .month-session-preview, .screen-stage .month-session { display: none; }
  .screen-stage .week-timeline-scroll { overflow: hidden; margin-top: 8px; }
  .screen-stage .week-column-headings { height: 48px; }
  .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-event strong { font-size: 8px; }
  .screen-stage .week-event { min-height: 0; }
  .screen-stage .week-time-columns { padding-bottom: 8px; }
  .screen-stage .messages-layout { display: block; height: 100%; }
  .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: 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:10px; --field-radius:8px; --stat-radius:8px; }
.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:6px; }
.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 #ffffff26; }
.btn-primary:hover,.btn-dark:hover { 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:-.055em; }
.page-heading h1 { font-size:clamp(28px,3.3vw,42px); 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,.profile-heading .btn-secondary:hover { 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:-.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:3px; }
.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:3px; }
.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:16px; }
  .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:260px; }
  .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:3px; background:#0a1527; border-color:#0a1527; color:#fff; }
  .screen-tab-picker select { border-radius:3px; }
  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,.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; }
}

/* Compact workspaces: one main action, continuous lists and optional details. */
.page-heading { background:none; border:0; color:var(--navy); padding:0; margin-bottom:20px; }
.page-heading h1 { font-size:28px; margin:0; }
.page-heading .eyebrow { display:none; }
.page-heading p { color:#657184; margin-top:6px; }
.page-heading .btn-secondary { background:white; color:var(--navy); border-color:#b8c2d2; }
.workspace-home-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:20px; align-items:start; }
.workspace-home-grid > div { display:grid; gap:16px; min-width:0; }
.workspace-home-grid > div > :empty { display:none; }
.attention-strip { display:flex; gap:14px; align-items:center; padding:14px 16px; background:var(--palette-e2eaff,#e2eaff); border-left:3px solid var(--palette-075bff,#075bff); }
.attention-strip > div { flex:1; min-width:0; }
.attention-strip strong { font-size:13px; }
.attention-strip p { font-size:12px; margin-top:4px; color:#52627b; }
.compact-profile { padding:16px; gap:12px; margin-bottom:16px; }
.compact-profile > .avatar { width:44px; height:44px; font-size:15px; flex-shrink:0; }
.compact-profile > div:not(.profile-actions) { flex:1; min-width:0; }
.compact-profile h1 { font-size:24px; line-height:1.15; margin:0; }
.compact-profile p { color:#b7c6db; }
.compact-profile .profile-actions { flex:none; margin:0; gap:4px; flex-wrap:nowrap; }
.compact-profile .icon-btn,.compact-profile .action-menu > summary { color:white; background:var(--palette-20324d,#20324d); }
.back-link { display:inline-flex; align-items:center; min-height:44px; gap:6px; }
.back-link > .icon { transform:rotate(180deg); }
.section-tabs { display:flex; gap:4px; padding:4px; background:#e0e5ec; border-radius:10px; }
.client-workspace > .section-tabs { position:sticky; top:0; z-index:3; margin-bottom:16px; }
.section-tabs button { border:0; background:transparent; color:#566276; min-height:44px; padding:10px 20px; font:700 13px var(--sans); border-radius:6px; cursor:pointer; }
.section-tabs button[aria-selected="true"] { background:var(--palette-075bff,#075bff); color:white; }
.client-section { display:grid; gap:16px; outline:none; }
.client-section[hidden] { display:none!important; }
.client-section > .stats-grid { margin:0; }
.client-section > div:empty { display:none; }
.current-plan-link { display:flex; align-items:center; padding:16px; gap:12px; }
.current-plan-link > div { flex:1; min-width:0; display:grid; gap:5px; }
.current-plan-link small { color:#64748b; font-size:10px; letter-spacing:1px; }
.current-plan-link strong { font-size:17px; }
.current-plan-link span { color:#64748b; font-size:12px; }
.workspace-fold { display:block; padding:0; align-self:start; min-width:0; }
.workspace-fold > summary,.plan-workout > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:58px; padding:14px 16px; cursor:pointer; list-style:none; }
.workspace-fold > summary::-webkit-details-marker,.plan-workout > summary::-webkit-details-marker,.action-menu > summary::-webkit-details-marker { display:none; }
.workspace-fold > summary > span,.plan-workout > summary > span { min-width:0; display:grid; gap:5px; }
.workspace-fold > summary strong { font-size:15px; }
.workspace-fold > summary small,.plan-workout > summary small { color:#64748b; font-size:12px; overflow-wrap:anywhere; }
.workspace-fold > summary > .icon,.plan-workout > summary > .icon { flex-shrink:0; color:#657184; transition:transform .15s; }
.workspace-fold[open] > summary > .icon,.plan-workout[open] > summary > .icon { transform:rotate(90deg); }
.workspace-fold[open] > summary { border-bottom:1px solid var(--line); }
.fold-body { padding:16px; min-width:0; }
.fold-duplicate-heading { display:none!important; }
.fold-body > .panel { border:0; padding:0; box-shadow:none; }
.fold-body > .private-note-panel { margin:0; }
.fold-body .private-note-panel h2 { display:none; }
.fold-body .account-form { padding:0; }
.fold-body .account-session-list { padding:0; }
.client-details { display:grid; gap:14px; margin-bottom:18px; }
.client-details dt { color:#64748b; font-size:11px; margin-bottom:4px; }
.client-details dd { margin:0; font-size:14px; overflow-wrap:anywhere; }
.action-menu { position:relative; flex-shrink:0; }
.action-menu > summary { display:flex; align-items:center; justify-content:center; width:44px; height:44px; cursor:pointer; list-style:none; border-radius:3px; color:#52627b; }
.action-menu > summary:hover { background:#e9eef5; }
.compact-profile .action-menu > summary:hover,.compact-profile .action-menu[open] > summary { background:var(--palette-304866,#304866); color:white; }
.action-menu-items { position:absolute; z-index:8; right:0; top:calc(100% + 5px); width:210px; max-width:calc(100vw - 40px); padding:6px; background:white; border:1px solid var(--line); border-top:3px solid var(--palette-075bff,#075bff); box-shadow:0 8px 24px #0a152724; color:var(--navy); }
.action-menu-items .btn,.action-menu-items .text-link { width:100%; text-align:left; justify-content:flex-start; min-height:44px; margin:0; border:0; background:white; color:var(--navy); font-size:13px; padding:10px; }
.action-menu-items .btn:hover { background:var(--palette-edf2ff,#edf2ff); }
.action-menu-items .fine-print { display:block; padding:10px; }
.roster-controls { display:flex; gap:16px; align-items:center; justify-content:space-between; padding:16px; }
.roster-controls .search-field { flex:1; max-width:360px; }
.roster-filters { display:flex; gap:4px; }
.filter-chip { min-height:44px; padding:8px 12px; background:transparent; color:#64748b; border:0; font:700 12px var(--sans); cursor:pointer; border-radius:6px; }
#plan-form .builder-tabs .filter-chip { flex:1 1 100px; min-width:min(100%, 100px); padding:10px 12px; white-space:normal; word-break:normal; overflow-wrap:anywhere; }
#plan-form .builder-tabs [data-action="builder-add-day"] { white-space:nowrap; }
.week-settings label:has(#week-hours) { min-width:230px; }
@media (max-width:600px) {
  .week-settings label:has(#week-hours) { flex:1 1 100%; min-width:0; }
}
.filter-chip span { margin-left:4px; font-size:11px; }
.filter-chip[aria-pressed="true"] { background:var(--palette-e4edff,#e4edff); color:var(--palette-075bff,#075bff); }
.roster-count { padding:0 16px 12px; color:#64748b; font-size:11px; }
.next-workout-card { padding:20px; border-left:4px solid var(--palette-075bff,#075bff); }
.next-workout-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.next-workout-card h2 { font-size:24px; font-weight:850; margin:16px 0 8px; letter-spacing:-.04em; }
.next-workout-card p { font-size:13px; color:#64748b; }
.next-workout-card > .btn { margin-top:20px; min-height:48px; }
.client-home-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
.client-next-session { margin-block:18px; padding:18px; border-radius:10px; }
.client-next-session-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.client-next-session-heading h2 { font-size:16px; }
.client-session-link { display:flex; align-items:center; gap:12px; width:100%; padding:8px 0; border:0; border-radius:6px; background:transparent; text-align:left; color:var(--navy); }
.client-session-link > span:not(.client-session-icon) { flex:1; min-width:0; }
.client-session-link strong,.client-session-link small { display:block; overflow-wrap:anywhere; }
.client-session-link strong { font-size:15px; line-height:1.5; }
.client-session-link small { margin-top:5px; font-size:12px; line-height:1.5; color:#60728c; }
.client-session-link .session-zone { font-size:10px; }
.client-session-icon { display:flex; padding:10px; background:#e8f0fa; border-radius:8px; }
.client-home-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:8px 0 20px; }
.client-home-links .btn { width:100%; min-width:0; min-height:48px; padding:12px 10px; white-space:normal; text-align:center; }
.client-home-links > :last-child:nth-child(odd) { grid-column:1 / -1; }
.client-quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:20px; }
.client-quick-actions .btn { padding:10px 8px; font-size:12px; min-height:44px; }
.client-calendar-slot.client-slot-open { background:rgba(63,132,211,.16); color:var(--palette-235486,#235486); cursor:pointer; }
.client-calendar-slot.client-slot-open > span { opacity:1; }
.client-calendar-slot.client-slot-open:hover { background:rgba(63,132,211,.28); }
.client-calendar-slot:focus-visible { outline:2px solid var(--palette-235486,#235486); outline-offset:-3px; }
.calendar-available-times { padding-top:18px; margin-top:18px; border-top:1px solid var(--line); }
.calendar-available-times h3 { margin:0 0 8px; }
.calendar-open-times { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0; }
.calendar-open-times .btn { min-height:44px; padding:10px 6px; }
.plan-card { padding:20px; overflow:visible; }
.plan-card h2,.profile-plan h2 { font-family:var(--sans); font-size:22px; font-weight:850; letter-spacing:-.04em; margin:14px 0 8px; }
.plan-card > p { min-height:0; margin:0 0 16px; line-height:1.6; }
.plan-card-bottom { min-height:44px; font-size:12px; margin-bottom:8px; }
.plan-workouts { margin-top:12px; border-top:1px solid var(--line); }
.plan-workout { border-bottom:1px solid var(--line); }
.plan-workout > summary { padding-inline:0; }
.plan-workout > summary strong { font-size:14px; }
.plan-workout-body { padding-bottom:16px; }
.plan-workout-body ul { list-style:none; padding:0; margin:0 0 14px; }
.plan-workout-body li { display:flex; justify-content:space-between; gap:12px; padding:8px 0; font-size:12px; }
.plan-workout-body li small { color:#64748b; white-space:nowrap; }
.next-workout-inline { display:grid; gap:12px; font-size:12px; }
.account-grid { grid-template-columns:1fr; max-width:850px; }
.account-grid > .account-panel:has(#profile-form) { grid-row:1; }
.btn,.icon-btn { min-height:44px; }
.icon-btn { min-width:44px; }

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-deck > .page-heading,.screen-document-content > .page-heading { padding:0; flex-direction:row; align-items:center; gap:10px; }
  .screen-deck > .page-heading h1,.screen-document-content > .page-heading h1 { font-size:23px; }
  .screen-deck > .page-heading .eyebrow,.screen-document-content > .page-heading .eyebrow { display:none; }
  .screen-deck > .page-heading > .btn,.screen-document-content > .page-heading > .btn { align-self:center; flex-shrink:0; min-height:44px; font-size:12px; }
  .screen-document-content > .profile-heading.compact-profile { flex-wrap:nowrap; padding:14px 12px; gap:8px; }
  .screen-document-content > .profile-heading.compact-profile h1 { font-size:20px; margin:0; }
  .screen-document-content > .profile-heading.compact-profile .profile-actions { margin:0; width:auto; display:flex; gap:2px; }
  .compact-profile p { font-size:10px; line-height:1.4; }
  .workspace-home-grid { grid-template-columns:1fr; gap:16px; }
  .section-tabs button { flex:1; padding:8px; font-size:12px; }
  .screen-document-content { overflow:visible; }
  .screen-stage .stat-card { padding:12px; min-height:94px; }
  .screen-stage .stat-card > strong { font-size:29px; margin-block:6px; }
  .screen-stage .goal-stat > strong { font-size:16px; }
  .screen-stage .stat-detail { font-size:10px; }
  .screen-stage .stat-icon { width:24px; height:24px; }
  .roster-controls { flex-direction:column; align-items:stretch; gap:8px; padding:12px; }
  .roster-controls .search-field { max-width:none; }
  .roster-filters { justify-content:space-between; }
  .filter-chip { flex:1; padding-inline:6px; }
  .roster-count { padding-inline:12px; }
  .client-quick-actions .btn { display:flex; flex-direction:column; gap:6px; font-size:11px; min-height:64px; }
  .screen-stage .plan-card h2 { font-size:22px; }
  .screen-stage .plan-card { padding:16px; }
  .screen-stage .profile-plan h2 { font-size:22px; }
  .screen-stage .profile-plan .btn { min-height:44px; }
  .screen-deck.screen-inline { grid-template-areas:'views' 'content'; grid-template-rows:52px minmax(0,1fr); }
  .screen-deck.screen-inline.screen-with-heading { grid-template-areas:'heading' 'views' 'content'; grid-template-rows:auto 52px minmax(0,1fr); }
  .screen-deck.screen-inline.screen-single { grid-template-areas:'content'; grid-template-rows:minmax(0,1fr); }
  .screen-deck.screen-inline.screen-single.screen-with-heading { grid-template-areas:'heading' 'content'; grid-template-rows:auto minmax(0,1fr); }
  .screen-inline > .page-heading { grid-area:heading; }
  .screen-inline > .screen-stage { grid-area:content; }
  .screen-inline > .screen-inline-controls { grid-area:views; padding:0; border:0; background:none; display:block; min-width:0; }
  .screen-inline-controls .section-tabs { height:52px; }
  .screen-inline-controls > .text-link { display:flex; align-items:center; min-height:44px; gap:8px; }
  .screen-inline-controls > .text-link > .icon { transform:rotate(180deg); }
  .screen-deck:has(#workout-form).screen-with-heading { grid-template-rows:auto minmax(0,1fr) 52px; }
  .screen-deck:has(#workout-form) > .screen-controls { padding-block:4px; }


  .screen-stage .fold-body .panel-heading { display:flex; }
  .screen-stage .fold-body > .private-note-panel { padding:0; }
}

/* Text gets room to wrap in words; actions keep their usable size. */
.panel-heading { flex-wrap:wrap; }
.panel-heading > div { flex:1 1 160px; min-width:0; }
.panel-heading > h2 { flex:1 1 160px; min-width:0; }
.panel-heading > .btn,.panel-heading > .icon-btn,.panel-heading > .text-link { flex-shrink:0; }
.panel-heading h2 { overflow-wrap:break-word; word-break:normal; }
.page-heading { flex-wrap:wrap; }
.page-heading > div { flex:1 1 150px; min-width:0; }
.btn > .icon,.text-link > .icon { flex-shrink:0; }
.agenda-day > .panel-heading { display:flex; padding:16px 20px; gap:12px; }
.agenda-day > .panel-heading > div { flex:1 1 140px; }
.agenda-day > .panel-heading h2 { font-size:18px; line-height:1.4; }
.agenda-day > .panel-heading p { display:block; font-size:12px; line-height:1.5; overflow-wrap:break-word; }
.agenda-day .agenda-working-hours { margin:0; font-size:12px; line-height:1.6; }
.clock-range,.calendar-date-part { display:inline-block; white-space:nowrap; overflow-wrap:normal; }
.agenda-day > .agenda-empty { font-size:13px; line-height:1.6; }
.upcoming-session > span { flex-shrink:0; }
.upcoming-session > div { flex:1; min-width:0; }
.compact-profile h1 { overflow-wrap:break-word; word-break:normal; }
.stat-card-link { display:block; text-decoration:none; cursor:pointer; }
.stat-card-link:focus-visible { outline:3px solid var(--palette-075bff,#075bff); outline-offset:3px; }
.stat-card-link .stat-detail { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.stat-card-link .stat-detail > .icon { width:16px; height:16px; flex-shrink:0; }
@media (hover:hover) {
  .stat-card-link:hover { background:var(--palette-1a2d48,#1a2d48); }
}
.client-review-filter { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px; margin-bottom:16px; border-left:3px solid var(--palette-075bff,#075bff); }
.client-review-filter > div { flex:1 1 180px; min-width:0; }
.client-review-filter strong { font-size:15px; }
.client-review-filter p { color:#64748b; font-size:12px; line-height:1.6; margin-top:6px; }
.client-review-filter > .btn { flex-shrink:0; }
.profile-plan-actions { display:flex; flex-wrap:wrap; gap:8px; }
.profile-plan-actions > .btn { flex:1 1 170px; min-height:44px; }
.progress-sections { display:grid; gap:12px; }
.progress-sections .fold-body > .exercise-progress-panel { margin:0; }
.progress-sections .fold-body > h3 { margin:0 0 12px; font-size:14px; }
.progress-sections .checkin-list { padding-inline:0; }
.set-weight-copy { grid-column:2 / 4; justify-self:start; display:inline-flex; align-items:center; gap:7px; max-width:100%; min-height:44px; padding:8px 10px; color:var(--navy); background:var(--palette-edf2ff,#edf2ff); border:1px solid var(--palette-cbd8ee,#cbd8ee); border-radius:3px; font-size:12px; font-weight:600; text-align:left; }
.set-weight-copy .icon { width:16px; height:16px; flex-shrink:0; }
.set-weight-copy:hover { background:var(--palette-e0eaff,#e0eaff); }
.set-weight-copy:active { background:var(--palette-cddfff,#cddfff); }
.training-workout-card > summary h2 { font-weight:850; letter-spacing:-.025em; }
.training-workout-body .set-grid-heading { font-size:10px; font-weight:750; color:#526581; }
.training-workout-body .set-grid[data-set] { padding-block:14px; row-gap:10px; }
.training-workout-body .set-number { display:flex; align-items:center; justify-content:center; width:26px; height:28px; background:#e6edfa; color:#173459; font-size:13px; font-weight:800; border-radius:3px; }
.training-workout-body .set-grid input[type="number"] { font-weight:750; color:#10233f; background:#fff; border-color:var(--palette-bccbe0,#bccbe0); }
.training-workout-body .set-done input[type="number"] { background:var(--palette-ecf3ff,#ecf3ff); border-color:var(--palette-a9c1ef,#a9c1ef); }
.set-reference { flex:1 1 150px; min-width:0; color:#1c3456; }
.set-reference > span,.set-reference small { display:block; font-size:12px; line-height:1.6; }
.set-reference b { display:inline-block; min-width:58px; font-size:11px; color:#536581; }
.set-reference small { color:#334c70; }
.set-target-hint .rest-btn { color:var(--palette-174ba5,#174ba5); background:var(--palette-edf3ff,#edf3ff); border-color:var(--palette-bccde9,#bccde9); font-weight:700; }
.set-target-hint .rest-btn.is-running { color:white; background:var(--palette-075bff,#075bff); border-color:var(--palette-075bff,#075bff); font-variant-numeric:tabular-nums; }
.training-session-progress progress { min-width:16px; height:5px; accent-color:var(--palette-075bff,#075bff); }
.finish-session-status { font-size:13px; line-height:1.6; margin:12px 0 20px; color:#536581; }
.finish-session-status strong { color:#10233f; }
.resume-workout { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px; margin-bottom:18px; border-left:3px solid var(--palette-075bff,#075bff); }
.resume-workout > div { flex:1 1 150px; min-width:0; }
.resume-workout strong { font-size:14px; }
.resume-workout p { font-size:12px; line-height:1.5; color:#536581; margin-top:5px; overflow-wrap:anywhere; }
.workout-complete-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.workout-complete-stats > div { padding:16px 8px; text-align:center; background:#0a1527; color:white; border-top:3px solid var(--palette-075bff,#075bff); }
.workout-complete-stats strong { display:block; font-size:26px; font-weight:850; }
.workout-complete-stats span { display:block; font-size:12px; color:#afc2dd; margin-top:6px; }
@media (max-width:960px) {
  .screen-stage .training-session-progress { gap:8px; padding:6px 10px; min-height:52px; }
  .screen-stage .training-session-progress strong { font-size:11px; }
  .screen-stage .set-target-hint { padding-block:4px; }
}
.weekly-plan-note { display:block; color:#64748b; font-size:12px; line-height:1.6; margin:8px 0 12px; }
.message-composer > .message-input-shell { display:block; position:relative; margin:8px 0 0; }
.message-composer .message-input-shell textarea { display:block; margin:0; min-height:64px; padding:12px 64px 12px 14px; }
.message-input-shell .message-send { position:absolute; right:10px; bottom:10px; display:flex; align-items:center; justify-content:center; width:44px; height:44px; min-height:44px; padding:0; }
.message-send .icon { width:20px; height:20px; }
.message-composer-hint { color:var(--muted); font-size:10px; margin:8px 0 0; }
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .message-composer > .message-input-shell { margin:0; }
  .screen-stage .message-composer .message-input-shell textarea { height:64px; min-height:64px; margin:0; }
  .screen-stage .message-composer-hint { display:none; }
}
.checkin-edit { min-height:44px; padding-block:8px; }
.checkin-list article > div { flex-wrap:wrap; }
.checkin-list time { white-space:nowrap; }
.checkin-older > summary { min-height:44px; padding-block:12px; cursor:pointer; font-size:13px; font-weight:600; }

/* Reserve the same inset for every single-choice field, including compact forms. */
select:not([multiple]):not([size]), select:not([multiple])[size="1"] {
  appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2324364f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px 16px;
  /* Component padding shorthands must not consume the arrow's reserved space. */
  padding-inline-end:40px !important;
}
@media (forced-colors:active) {
  select:not([multiple]):not([size]), select:not([multiple])[size="1"] {
    appearance:auto;
    -webkit-appearance:auto;
    background-image:none;
  }
}

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .agenda-day > .panel-heading { display:flex; padding:16px; }
  .screen-stage .agenda-day > .panel-heading h2 { font-size:18px; }
  .screen-stage .agenda-day > .panel-heading p { display:block; }
  .screen-stage .agenda-day > .agenda-empty,.screen-stage .agenda-working-hours { padding:14px 16px; }
  .booking-card { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding:16px; }
  .booking-time { flex-direction:row; align-items:baseline; flex-wrap:wrap; gap:8px; min-width:0; }
  .booking-time strong,.booking-time > span { white-space:nowrap; }
  .booking-time > span::before { content:'– '; }
  .booking-actions { flex-direction:row; flex-wrap:wrap; justify-content:flex-start; }
  .booking-actions .btn { min-height:44px; }
  .booking-info,.booking-title { min-width:0; }
  .booking-title h3 { flex:1 1 150px; font-size:16px; line-height:1.5; }
  .screen-stage .upcoming-sessions > .panel-heading { gap:6px 12px; }
  .screen-stage .checkin-reminder { flex-wrap:wrap; }
  .screen-stage .checkin-reminder > div { flex:1 1 160px; min-width:0; }
  .screen-stage .checkin-reminder > .btn { flex-shrink:0; }
  .screen-document-content > .profile-heading.compact-profile { flex-wrap:wrap; align-items:flex-start; }
  .screen-document-content > .profile-heading.compact-profile > div:not(.profile-actions) { flex:1 1 170px; }
  .screen-document-content > .profile-heading.compact-profile .profile-actions { margin-left:auto; }
  .screen-stage .client-identity > span:not(.avatar) { flex:1; min-width:0; }
  .screen-stage .client-identity strong { white-space:normal; overflow-wrap:break-word; }
  .screen-stage .message-header { flex-wrap:wrap; gap:8px; }
  .screen-stage .message-person { flex:1 1 160px; overflow-wrap:break-word; }
  .screen-stage .message-header > .avatar,.screen-stage .message-profile-link { flex-shrink:0; }
  .screen-stage .message-profile-link { margin-left:auto; }
}

/* An active session stays within reach without covering page content. */
.workout-resume { display:flex; align-items:center; gap:12px; padding:12px 16px; margin:0 28px 16px; background:#0a1527; color:#fff; border-radius:6px; text-decoration:none; min-height:56px; }
.workout-resume span { flex:1; min-width:0; }
.workout-resume strong,.workout-resume small { display:block; }
.workout-resume small { color:var(--palette-c4d9f6,#c4d9f6); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workout-resume:hover { background:var(--palette-123368,#123368); }
.workout-resume:focus-visible { outline:3px solid var(--palette-075bff,#075bff); outline-offset:3px; }
@media (min-width:761px) {
  .main-shell:has(.workout-resume) { padding-bottom:84px; }
  .workout-resume { position:fixed; bottom:16px; right:24px; margin:0; width:min(360px,calc(100vw - 48px)); z-index:5; }
}
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-app .main-shell:has(.workout-resume) { padding-bottom:0; grid-template-rows:calc(50px + env(safe-area-inset-top)) minmax(0,1fr) 60px calc(56px + env(safe-area-inset-bottom)); }
  .screen-app .workout-resume { position:static; grid-row:3; margin:2px 12px 4px; padding:8px 12px; min-height:54px; width:auto; }
  .screen-app .main-shell:has(.workout-resume) .screen-dock { grid-row:4; }
}

.session-effort { margin:16px 0; padding:0; border:0; min-width:0; }
.session-effort legend { margin-bottom:8px; font-weight:650; font-size:14px; }
.session-effort-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.session-effort-options label { position:relative; margin:0; cursor:pointer; }
.session-effort-options input { position:absolute; opacity:0; width:1px; height:1px; min-height:0; }
.session-effort-options span { display:grid; place-items:center; padding:10px 4px; min-height:44px; border:1px solid var(--palette-bac9df,#bac9df); border-radius:4px; font-size:14px; }
.session-effort-options input:checked + span { background:var(--palette-075bff,#075bff); color:white; border-color:var(--palette-075bff,#075bff); }
.session-effort-options input:focus-visible + span { outline:3px solid var(--palette-1263c8,#1263c8); outline-offset:2px; }
.session-effort-result,.session-comparison-summary { margin:16px 0; line-height:1.6; }
.activity-workout { width:100%; text-align:left; background:transparent; border:0; border-bottom:1px solid #e6eaf0; cursor:pointer; font:inherit; color:inherit; }
.activity-workout:hover { background:#f1f5fb; }
.activity-workout:focus-visible { outline:2px solid var(--palette-315e8b,#315e8b); outline-offset:3px; }
.workout-summary-list { display:grid; gap:10px; }
.workout-summary-exercise { border:1px solid #cdd7e4; border-radius:8px; background:#f7f9fc; overflow:hidden; }
.workout-summary-exercise > summary { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px; min-height:52px; cursor:pointer; list-style:none; }
.workout-summary-exercise > summary::-webkit-details-marker { display:none; }
.workout-summary-exercise > summary > strong { min-width:0; overflow-wrap:anywhere; font-size:14px; }
.workout-summary-exercise > summary > span { display:flex; align-items:center; gap:8px; white-space:nowrap; color:var(--muted); font-size:12px; flex-shrink:0; }
.workout-summary-exercise > summary .icon { width:16px; height:16px; }
.workout-summary-exercise[open] > summary .icon { transform:rotate(180deg); }
.workout-summary-exercise > div { padding:0 15px 5px; }
.workout-summary-set { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:12px 0; border-top:1px solid #dce3ec; font-size:13px; }
.workout-summary-set small { flex-basis:100%; color:var(--palette-365c88,#365c88); line-height:1.6; overflow-wrap:anywhere; }
.workout-summary-note { margin-top:18px; padding:14px; border-radius:8px; background:#edf2f8; font-size:13px; }
.workout-summary-note p { margin-top:8px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.workout-detail-list .set-comparison { color:var(--palette-365c88,#365c88); line-height:1.5; overflow-wrap:anywhere; }

/* A focused, darker training space with distinct surfaces and readable controls. */
.main-shell:has(#workout-form) {
  background:radial-gradient(ellipse at 100% 0,var(--palette-183252,#183252) 0,transparent 55%),#080f1b;
  color:#edf4ff;
  --navy:var(--palette-edf4ff,#edf4ff);
  --muted:#a8bad2;
  --line:#2a3b53;
  color-scheme:dark;
}
.main-shell:has(#workout-form) .page-heading { color:#f4f8ff; }
.main-shell:has(#workout-form) .page-heading h1 { text-shadow:0 2px 12px #0005; }
.main-shell:has(#workout-form) .back-link { color:var(--palette-a8c3e8,#a8c3e8); }
.main-shell:has(#workout-form) .page-footer { color:#9db1ca; border-color:#26364d; }
.main-shell:has(#workout-form) .workout-notice { background:var(--palette-111f33,#111f33); border-color:var(--palette-2a3e58,#2a3e58); color:#b7c9df; }
#workout-form .training-workout-card,
#workout-form .session-summary {
  background:linear-gradient(145deg,var(--palette-1a2940,#1a2940),var(--palette-111d30,#111d30) 70%);
  border:1px solid #344761;
  border-radius:10px;
  box-shadow:0 12px 28px #0005,inset 0 1px 0 #ffffff0d;
  color:#edf4ff;
}
#workout-form .training-workout-card > summary {
  background:linear-gradient(115deg,var(--palette-213752,#213752),var(--palette-18273d,#18273d));
  border-bottom:1px solid #344761;
  border-left:3px solid var(--palette-398bff,#398bff);
  padding-block:16px;
}
#workout-form .training-workout-card > summary h2 { color:#f4f8ff; }
#workout-form .training-workout-card > summary::after,
#workout-form .workout-reference-actions .icon-btn { color:var(--palette-b6cef0,#b6cef0); }
#workout-form .workout-reference-actions .icon-btn:hover { background:#314965; color:#fff; }
#workout-form .workout-number { background:var(--palette-2b405c,#2b405c); color:#d9eaff; }
#workout-form .exercise-instructions,#workout-form .first-result-hint { color:#a8bad2; }
#workout-form .last-results .btn-secondary { background:var(--palette-23344c,#23344c); border-color:#415975; color:#dce9fb; }
#workout-form .exercise-done-count { color:var(--palette-b6d3f7,#b6d3f7); }
#workout-form .training-workout-body { padding-top:10px; }
#workout-form .set-grid-heading { color:#a5bbd7; }
#workout-form .set-grid[data-set] { border-color:#32435b; }
#workout-form .training-workout-body .set-grid[data-set] {
  padding:14px 10px; margin-block:8px; border:1px solid transparent;
  border-bottom-color:#32435b; border-radius:8px;
}
#workout-form .training-workout-body .set-grid-heading { padding-inline:11px; }
#workout-form .training-workout-body .set-grid[data-set].set-done { border-color:#54769b; }
#workout-form .set-number { background:var(--palette-2b405c,#2b405c); color:#d9eaff; box-shadow:inset 0 1px 0 #ffffff14; }
#workout-form .set-grid input[type="number"],
#workout-form .session-summary input[type="number"],
#workout-form .session-summary textarea {
  background:#0b1627; color:#f3f7ff; border:1px solid #4b6282; border-radius:6px;
  box-shadow:inset 0 2px 5px #0004,0 1px 0 #ffffff05;
}
#workout-form input:focus-visible,#workout-form textarea:focus-visible { outline:2px solid var(--palette-65a5ff,#65a5ff); outline-offset:2px; }
#workout-form .set-checkbox input { background:var(--palette-22344e,#22344e); border-color:#4b6282; border-radius:6px; }
#workout-form .set-checkbox .icon { color:#a5bbd7; }
#workout-form .set-checkbox input:checked { background:var(--palette-315e8b,#315e8b); border-color:var(--palette-7197c2,#7197c2); box-shadow:none; }
#workout-form .set-checkbox input:checked + .icon { color:#fff; }
#workout-form .set-done { background:linear-gradient(110deg,var(--palette-244c73,#244c73),var(--palette-1c3654,#1c3654)); box-shadow:none; }
#workout-form .set-done .set-number { background:var(--palette-3b6187,#3b6187); color:#fff; }
#workout-form .set-done input[type="number"] { background:var(--palette-132b47,#132b47); border-color:var(--palette-4a84bf,#4a84bf); }
#workout-form .set-reference,#workout-form .set-reference small { color:#d3e1f3; }
#workout-form .set-reference b { color:var(--palette-9bb6d8,#9bb6d8); }
#workout-form .rest-btn { background:linear-gradient(var(--palette-233e64,#233e64),var(--palette-1a3050,#1a3050)); color:#c2dcff; border-color:var(--palette-466b9b,#466b9b); border-radius:6px; box-shadow:0 3px 7px #0003,inset 0 1px 0 #ffffff0b; }
#workout-form .rest-btn:hover { background:var(--palette-2b4d78,#2b4d78); color:#fff; }
#workout-form .rest-btn.is-running { background:var(--palette-1268ec,#1268ec); border-color:var(--palette-6da8ff,#6da8ff); color:#fff; box-shadow:0 3px 14px var(--palette-075bff40,#075bff40); }
#workout-form .set-weight-copy { background:var(--palette-23344c,#23344c); color:var(--palette-c7d9f1,#c7d9f1); border-color:#415975; border-radius:6px; }
#workout-form .set-weight-copy:hover { background:#304763; color:#fff; }
#workout-form .training-session-progress { background:linear-gradient(115deg,var(--palette-16365b,#16365b),var(--palette-152339,#152339)); color:#eaf3ff; border:1px solid var(--palette-3b5d85,#3b5d85); border-radius:8px; box-shadow:0 5px 14px #0004,inset 0 1px 0 #ffffff0d; }
#workout-form .training-session-progress progress::-webkit-progress-bar { background:#30435c; border-radius:4px; }
#workout-form .training-session-progress progress::-webkit-progress-value { background:var(--palette-4c99ff,#4c99ff); border-radius:4px; }
#workout-form .finish-session-status,#workout-form .fine-print,#workout-form .optional { color:#a8bad2; }
#workout-form .finish-session-status strong,#workout-form .session-summary h2 { color:#f4f8ff; }
#workout-form .session-summary .eyebrow { color:var(--palette-8abaff,#8abaff); }
#workout-form .session-summary textarea::placeholder { color:#91a7c3; }
#workout-form .session-summary .text-link { color:var(--palette-99c2ff,#99c2ff); }
#workout-form .session-effort-options span { background:var(--palette-1d304a,#1d304a); border-color:#49617e; color:#dce9fb; }
#workout-form .session-effort-options input:checked + span { background:var(--palette-1268ec,#1268ec); border-color:var(--palette-69a5ff,#69a5ff); color:#fff; box-shadow:0 3px 12px var(--palette-075bff40,#075bff40); }
.main-shell:has(#workout-form) .screen-tab-picker select { background-color:var(--palette-1c2c44,#1c2c44); color:#f1f6ff; border-color:#4b6282; border-radius:6px; box-shadow:0 3px 8px #0004; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c2dcff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.main-shell:has(#workout-form) .screen-count { color:var(--palette-abc8ee,#abc8ee); }
.main-shell:has(#workout-form) .screen-controls .icon-btn { background:var(--palette-1c2c44,#1c2c44); border-color:#405775; border-radius:6px; color:#edf4ff; }
.main-shell:has(#workout-form) .screen-controls .icon-btn:disabled { opacity:.4; }
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-app .screen-stage #workout-form .training-workout-card { box-shadow:0 8px 20px #0005,inset 0 1px 0 #ffffff0d; }
  .screen-app .main-shell:has(#workout-form) .screen-controls { background:#0b1422; border-top:1px solid var(--palette-263b56,#263b56); padding-inline:4px; }
}

/* Daytime workspaces: light reading surfaces, with navy reserved for emphasis. */
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) {
  --workspace-surface:#fff;
  --workspace-tint:#f4f7fc;
  --workspace-border:#d3dfed;
  --workspace-ink:#14263f;
  --workspace-muted:#52657d;
  --workspace-hero:linear-gradient(125deg,var(--palette-102139,#102139),var(--palette-203d5e,#203d5e));
  --workspace-shadow:0 6px 18px #1936520d,0 1px 3px #1936520a;
  background:linear-gradient(145deg,#f4f7fc,#eaf0f7);
  color:var(--workspace-ink);
}
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .panel {
  background:var(--workspace-surface); border-color:var(--workspace-border); border-radius:10px; box-shadow:var(--workspace-shadow);
}
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .stat-card {
  background:linear-gradient(145deg,#fff,#f5f8fd); color:var(--workspace-ink);
  border:1px solid var(--workspace-border); border-top:3px solid var(--palette-327ce5,#327ce5); border-radius:8px; box-shadow:var(--workspace-shadow);
}
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .stat-card > strong { color:var(--workspace-ink); }
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) :is(.stat-top > span:first-child,.stat-detail,.stat-card .stat-detail) { color:var(--workspace-muted); }
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .stat-card .stat-icon { background:var(--palette-e5efff,#e5efff); color:var(--palette-2568c6,#2568c6); border-radius:6px; }
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .stat-card small { color:var(--workspace-muted); }
.main-shell[data-page="overview"] .stat-attention { background:linear-gradient(145deg,var(--palette-edf4ff,#edf4ff),#fff); border-top-color:var(--palette-183859,#183859); }
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .btn { border-radius:6px; }
.main-shell .page-heading > .btn-primary { min-height:44px; padding:12px 17px; font-size:13px; line-height:1.25; gap:9px; }
@media(max-width:600px) {
  .main-shell .page-heading > .btn-primary { padding:10px 12px; font-size:12px; }
}
.main-shell:is([data-page="overview"],[data-page="plans"],[data-page="client"]) .btn-secondary { background:#f9fbff; border-color:var(--palette-c6d5e7,#c6d5e7); box-shadow:0 2px 4px var(--palette-19365208,#19365208); }
.main-shell[data-page="overview"] .next-workout-card {
  background:var(--workspace-hero); color:#fff; border:1px solid #3c5778; border-left:3px solid var(--palette-4d9aff,#4d9aff);
  box-shadow:0 10px 24px var(--palette-10213926,#10213926),inset 0 1px 0 #ffffff14;
}
.main-shell[data-page="overview"] .next-workout-card h2 { color:#fff; font-size:28px; }
.main-shell[data-page="overview"] .next-workout-card :is(p,.weekly-plan-note) { color:#c1d1e5; }
.main-shell[data-page="overview"] .next-workout-card .tag-blue { color:#c7e0ff; background:var(--palette-2a496c,#2a496c); border-color:#49698e; }
.main-shell[data-page="overview"] .next-workout-card .text-link { color:#c4ddff; }
.main-shell[data-page="overview"] .next-workout-card .btn-secondary { color:#edf4ff; background:var(--palette-2a4565,#2a4565); border-color:#557493; }
.main-shell:is([data-page="overview"],[data-page="client"]) .panel-heading { background:linear-gradient(110deg,#f3f7fc,#fff); border-bottom:1px solid #e1e9f3; border-radius:9px 9px 0 0; }
.main-shell:is([data-page="overview"],[data-page="client"]) .panel-heading h2 { color:#193553; }
.main-shell:is([data-page="overview"],[data-page="client"]) .attention-strip { background:var(--palette-eaf2ff,#eaf2ff); border-left:3px solid var(--palette-327ce5,#327ce5); }
.main-shell:is([data-page="overview"],[data-page="client"]) .workspace-fold > summary { background:linear-gradient(110deg,#f4f8fd,#fff); border-radius:9px; }
.main-shell:is([data-page="overview"],[data-page="client"]) .workspace-fold[open] > summary { border-radius:9px 9px 0 0; }
.main-shell:is([data-page="overview"],[data-page="client"]) .workspace-fold > summary strong { color:#1c3856; }
.main-shell:is([data-page="overview"],[data-page="client"]) .workspace-fold > summary > .icon { color:var(--palette-326ba9,#326ba9); }
.main-shell[data-page="client"] .profile-heading {
  background:var(--workspace-hero); color:#fff; border:1px solid #3c5778; border-left:3px solid var(--palette-4d9aff,#4d9aff);
  border-radius:10px; box-shadow:0 8px 22px var(--palette-10213920,#10213920),inset 0 1px 0 #ffffff12;
}
.main-shell[data-page="client"] .profile-heading .icon-btn,
.main-shell[data-page="client"] .profile-heading .action-menu > summary { background:var(--palette-2a4565,#2a4565); color:#d5e7ff; border:1px solid #496582; border-radius:6px; }
.main-shell[data-page="client"] .section-tabs { background:#dfe8f3; border:1px solid var(--palette-cad8e9,#cad8e9); padding:4px; border-radius:10px; }
.main-shell[data-page="client"] .section-tabs button { border-radius:6px; color:#425d7c; }
.main-shell[data-page="client"] .section-tabs button[aria-selected="true"] { background:var(--palette-183657,#183657); color:#fff; box-shadow:0 2px 5px var(--palette-10213920,#10213920); }
.main-shell[data-page="client"] .current-plan-link { background:linear-gradient(115deg,var(--palette-edf4ff,#edf4ff),#fff); border-left:3px solid var(--palette-327ce5,#327ce5); }
.main-shell:is([data-page="plans"],[data-page="client"]) :is(.plan-card,.profile-plan) { border-top:3px solid var(--palette-327ce5,#327ce5); background:linear-gradient(155deg,#fff,#f7faff); }
.main-shell:is([data-page="plans"],[data-page="client"]) :is(.plan-card h2,.profile-plan h2) { color:#142e4b; }
.main-shell:is([data-page="plans"],[data-page="client"]) .plan-card-top .tag { background:var(--palette-e5efff,#e5efff); color:var(--palette-225caa,#225caa); border-color:#ccddf5; border-radius:5px; }
.main-shell[data-page="plans"] .next-workout-inline { background:var(--workspace-hero); color:#fff; padding:16px; border:1px solid #3c5778; border-radius:8px; box-shadow:0 4px 12px var(--palette-10213918,#10213918),inset 0 1px 0 #ffffff12; }
.main-shell[data-page="plans"] .next-workout-inline :is(.weekly-plan-note,.fine-print) { color:#c1d1e5; margin:0; }
.main-shell[data-page="plans"] .plan-workout > summary { padding-inline:10px; border-radius:6px; }
.main-shell[data-page="plans"] .plan-workout[open] > summary { background:var(--palette-eaf2ff,#eaf2ff); }
.main-shell[data-page="plans"] .plan-workout > summary:hover { background:var(--palette-edf4fd,#edf4fd); }
.main-shell[data-page="plans"] .plan-workout-body { padding:12px 10px 16px; }

/* Large active controls use a softer blue on dark surfaces only. */
:root { --dark-action:var(--palette-315e8b,#315e8b); --dark-action-hover:var(--palette-3c6c9c,#3c6c9c); --dark-action-border:var(--palette-7197c2,#7197c2); }
#workout-form .plan-update-notice { margin-top:18px; padding:14px; border:1px solid #54769b; border-radius:8px; background:var(--palette-1c3654,#1c3654); }
#workout-form .plan-update-notice[hidden] { display:none; }
#workout-form .plan-update-notice strong { display:block; color:#edf4ff; font-size:14px; }
#workout-form .plan-update-notice p { color:var(--palette-c5d6ea,#c5d6ea); font-size:12px; line-height:1.6; margin:8px 0 14px; }
#workout-form .plan-update-notice .btn-secondary { color:#edf4ff; background:var(--palette-31506f,#31506f); border-color:var(--palette-7197c2,#7197c2); }
#workout-form .btn-primary,
#workout-form .rest-btn.is-running,
.main-shell[data-page="overview"] .next-workout-card .btn-primary,
.main-shell[data-page="plans"] .next-workout-inline .btn-primary,
.welcome-banner .btn-dark {
  background:var(--dark-action); color:#fff; border:1px solid var(--dark-action-border); box-shadow:none;
}
#workout-form .btn-primary:hover,
#workout-form .rest-btn.is-running:hover,
.main-shell[data-page="overview"] .next-workout-card .btn-primary:hover,
.main-shell[data-page="plans"] .next-workout-inline .btn-primary:hover,
.welcome-banner .btn-dark:hover { background:var(--dark-action-hover); }
#workout-form .session-effort-options input:checked + span {
  background:var(--dark-action); border-color:var(--dark-action-border); color:#fff; box-shadow:none;
}
.sidebar .nav-link.active { background:var(--palette-243f60,#243f60); color:#fff; box-shadow:inset 3px 0 0 var(--palette-7799bf,#7799bf); }
.main-shell[data-page="client"] .profile-heading > .avatar { background:var(--dark-action); color:#fff; }
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-app .topbar-avatar { background:var(--dark-action); color:#fff; }
}
/* Shared dialogs: a consistent header and an obvious, comfortable close control. */
#modal { padding:0; border-radius:10px; border:1px solid #52627a; background:#f5f7fb; box-shadow:0 24px 80px #030a1866; overflow:auto; overscroll-behavior:contain; }
#modal::backdrop { background:#050d1c99; backdrop-filter:blur(5px); }
#modal .modal-header { position:sticky; top:0; z-index:3; margin:0; padding:16px 22px; min-height:76px; background:var(--palette-101d30,#101d30); color:#f2f6fd; border-bottom:1px solid #415975; }
#modal .modal-header h2 { min-width:0; font-size:23px; line-height:1.2; overflow-wrap:anywhere; }
#modal .modal-header .icon-btn { width:44px; height:44px; min-width:44px; border:1px solid #48617f; border-radius:8px; background:var(--palette-223850,#223850); color:#dfebfc; }
#modal .modal-header .icon-btn:hover { background:var(--palette-304e6c,#304e6c); }
#modal .modal-header .icon-btn:focus-visible { outline:2px solid var(--palette-a9c5e7,#a9c5e7); outline-offset:3px; }
#modal .modal-body { padding:22px; }
#modal .modal-description { line-height:1.6; overflow-wrap:anywhere; }
#modal.modal-training { --ink:#e8f0fc; --muted:#aec0d7; --line:#354b65; color:#e8f0fc; background:linear-gradient(150deg,var(--palette-1c3049,#1c3049),#0e1b2e); width:min(640px,calc(100% - 32px)); }
#modal.modal-training .modal-description,#modal.modal-training .fine-print { color:#afc2db; }
#modal.modal-training .workout-complete-stats > div { background:var(--palette-101e32,#101e32); border:1px solid #3d5876; border-top:3px solid #6386ad; border-radius:6px; }
#modal.modal-training .workout-summary-exercise { background:var(--palette-182b42,#182b42); border-color:#405b79; }
#modal.modal-training .workout-summary-exercise > summary > span { color:#b6c8df; }
#modal.modal-training .workout-summary-set { border-color:#3b526e; }
#modal.modal-training .workout-summary-set small { color:var(--palette-b4d0f1,#b4d0f1); }
#modal.modal-training .workout-summary-note { background:var(--palette-20374f,#20374f); }
#modal.modal-training .modal-actions { border-color:#3b526e; }
#modal.modal-training .btn-secondary { color:#e3edfa; background:var(--palette-253c56,#253c56); border-color:#547190; }
#modal.modal-training .btn-secondary:hover { background:var(--palette-34516f,#34516f); }
#modal.modal-training .btn-primary { color:white; background:var(--palette-315e8b,#315e8b); border-color:var(--palette-7197c2,#7197c2); box-shadow:0 2px 4px #0002; }
#modal.modal-training .btn-primary:hover { background:var(--palette-3a6c9e,#3a6c9e); }
#modal.modal-training input,#modal.modal-training select,#modal.modal-training textarea { color:#e3edfa; background:#0c192b; border-color:#547190; }
@media(max-width:960px) {
  #modal.screen-form-dialog { inset:calc(var(--screen-top,0px) + 12px) 0 auto; margin:0 auto; padding:0; width:calc(100% - 24px); max-height:calc(var(--screen-height,100dvh) - 24px); height:fit-content; overflow:hidden; }
  #modal.screen-form-dialog[open] { display:flex;flex-direction:column; }
  #modal.screen-form-dialog .modal-header { position:relative;top:0;flex-shrink:0; }
  #modal.screen-form-dialog .modal-body { min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:12px; }
  #modal .modal-header { padding:14px 16px; min-height:72px; }
  #modal .modal-header h2 { font-size:21px; }
  #modal .modal-body { padding:18px 16px; }
}
#modal :is(input,select,textarea,button) { scroll-margin-top:92px; }
#modal.modal-training .set-comparison { color:var(--palette-b4d0f1,#b4d0f1); }
.first-steps-card { max-width:640px; padding:24px; margin-bottom:22px; }
.first-steps-card h2 { font-size:26px; line-height:1.2; font-weight:850; margin:16px 0 10px; letter-spacing:-.035em; }
.first-steps-card > p { color:#5f718a; line-height:1.6; font-size:14px; }
.first-steps-list { display:grid; gap:14px; margin:22px 0; padding:0; list-style:none; }
.first-steps-list li { display:flex; align-items:center; gap:12px; font-size:14px; }
.setup-step-number { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border:1px solid #a8b9cf; border-radius:6px; background:#edf2f8; color:var(--palette-284c76,#284c76); font-weight:750; }
.setup-step-number .icon { width:16px; height:16px; }
.setup-complete { color:#65788f; }
.setup-complete .setup-step-number { background:#dfeaf6; border-color:var(--palette-9eb7d4,#9eb7d4); }
@media(max-width:540px) { .first-steps-card { padding:20px 16px; } .first-steps-card > .btn { width:100%; justify-content:center; min-height:48px; } }
/* Starting questionnaire: native choices with comfortable touch targets. */
.intake-prompt { padding: 22px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.intake-prompt h2 { font-size: 20px; margin: 10px 0 8px; }
.intake-prompt p { color: var(--muted, #526680); line-height: 1.6; margin: 0; }
.intake-prompt .btn { flex-shrink: 0; }
.intake-step-heading { display: flex; justify-content: space-between; gap: 14px; color: #526680; font-size: 12px; font-weight: 700; }
.intake-progress { width: 100%; height: 5px; margin: 12px 0 18px; accent-color: var(--palette-347de7,#347de7); }
.intake-wizard h3 { font-size: 22px; margin: 0 0 10px; outline: none; }
.intake-identity { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: #e8eef5; border-radius: 8px; overflow-wrap: anywhere; }
.intake-identity span { font-size: 13px; color: #526680; }
.intake-field { margin: 24px 0; }
.intake-field[hidden] { display: none; }
.intake-question { border: 0; padding: 0; margin: 0; min-width: 0; }
.intake-question legend { font-size: 14px; font-weight: 750; line-height: 1.5; margin-bottom: 10px; }
.intake-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.intake-option { display: flex !important; align-items: center; gap: 10px; padding: 12px; min-height: 48px; margin: 0 !important; border: 1px solid #c7d3e2; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.intake-option input, .intake-share input { width: 18px !important; height: 18px; min-height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--palette-326499,#326499); }
.intake-option:has(input:checked) { background: #e6eef7; border-color: var(--palette-507daf,#507daf); box-shadow: inset 0 0 0 1px var(--palette-507daf,#507daf); }
.intake-option:has(input:focus-visible) { outline: 2px solid var(--palette-326499,#326499); outline-offset: 2px; }
.intake-share { display: flex !important; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.6; padding: 16px; background: #e8eef5; border-radius: 8px; }
.intake-footer { display: flex; gap: 12px; margin-top: 20px; }
.intake-footer .btn { flex: 1; min-height: 48px; }
.intake-save-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 4px; }
.intake-save-row button { min-height: 44px; }
.intake-summary-section { border-bottom: 1px solid #d4ddea; }
.intake-summary-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 15px 12px; border-radius: 6px; cursor: pointer; font-weight: 750; list-style: none; }
.intake-summary-section > summary:active { background: #e8eff7; }
.intake-summary-section > summary::-webkit-details-marker { display: none; }
.intake-summary-section > summary > .icon { flex-shrink: 0; color: #496989; transition: transform .15s ease; }
.intake-summary-section[open] > summary > .icon { transform: rotate(90deg); }
.intake-summary-section[open] > summary { color: var(--palette-244e7b,#244e7b); }
.intake-summary-section dl { display: grid; gap: 12px; margin: 0 0 18px; }
.intake-summary-section dl .intake-answer { padding: 16px; background: #f0f5fb; border: 1px solid #d7e2ef; border-left: 3px solid var(--palette-7c9fc4,#7c9fc4); border-radius: 8px; }
.intake-summary-section dt { font-size: 13px; font-weight: 700; line-height: 1.5; color: #425a73; margin-bottom: 10px; }
.intake-summary-section dd { margin: 0; color: #142d48; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.intake-answer-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.intake-answer-choice { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--palette-cbd9e8,#cbd9e8); background: #fff; font-weight: 650; font-size: 14px; max-width: 100%; }
#modal.modal-intake .intake-step-heading { color: #b5c9e1; }
#modal.modal-intake .intake-progress { appearance: none; border: 0; border-radius: 5px; background: #324a65; accent-color: var(--palette-81a7d2,#81a7d2); }
#modal.modal-intake .intake-progress::-webkit-progress-bar { background: #324a65; border-radius: 5px; }
#modal.modal-intake .intake-progress::-webkit-progress-value { background: var(--palette-81a7d2,#81a7d2); border-radius: 5px; }
#modal.modal-intake .intake-progress::-moz-progress-bar { background: var(--palette-81a7d2,#81a7d2); border-radius: 5px; }
#modal.modal-intake .intake-field { padding: 16px; border: 1px solid #3b526d; border-radius: 10px; background: linear-gradient(120deg,var(--palette-20354e,#20354e),var(--palette-17283d,#17283d)); }
#modal.modal-intake .intake-question legend, #modal.modal-intake .intake-field > label { color: #eff5ff; }
#modal.modal-intake .intake-option { background: var(--palette-132337,#132337); border-color: #4a6380; color: #dce8f8; }
#modal.modal-intake .intake-option:has(input:checked) { background: var(--palette-304c6c,#304c6c); border-color: var(--palette-94b7de,#94b7de); box-shadow: inset 0 0 0 1px var(--palette-94b7de,#94b7de); color: #fff; }
#modal.modal-intake .intake-option:has(input:focus-visible) { outline-color: var(--palette-c2d9f5,#c2d9f5); }
#modal.modal-intake .intake-option input, #modal.modal-intake .intake-share input { accent-color: var(--palette-90b5dc,#90b5dc); color-scheme: dark; }
#modal.modal-intake .intake-field input:not([type="checkbox"]):not([type="radio"]), #modal.modal-intake .intake-field textarea { color-scheme: dark; }
#modal.modal-intake .intake-field textarea::placeholder { color: #9db2cb; }
#modal.modal-intake .intake-identity, #modal.modal-intake .intake-share { color: #e8f0fc; background: var(--palette-223a54,#223a54); border: 1px solid #476380; }
#modal.modal-intake .intake-identity span, #modal.modal-intake .optional { color: #afc2db; }
#modal.modal-intake .intake-save-row .text-link { color: var(--palette-bed6f3,#bed6f3); }
#modal.modal-intake .form-error { color: #ffb8bd; }
@media (max-width: 540px) {
  .intake-prompt { padding: 18px 16px; flex-direction: column; align-items: stretch; gap: 16px; }
  .intake-option { padding: 12px 14px; }
  #modal.modal-intake .intake-field { padding: 14px 12px; }
}
@media (max-width: 360px) { .intake-options { grid-template-columns: minmax(0,1fr); } }

/* The supplied logo keeps its original artwork; black blends into dark brand surfaces. */
.training-builder-card { padding: 0; overflow: hidden; }
.builder-exercise-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; min-height: 72px; cursor: pointer; list-style: none; }
.builder-exercise-summary::-webkit-details-marker { display: none; }
.builder-exercise-summary > span { min-width: 0; }
.builder-exercise-summary strong { display: block; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.builder-exercise-summary small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.builder-exercise-summary > .icon { flex-shrink: 0; transition: transform .15s; }
.training-builder-card[open] > .builder-exercise-summary { border-bottom: 1px solid var(--line); }
.training-builder-card[open] > .builder-exercise-summary > .icon { transform: rotate(90deg); }
.builder-exercise-body { padding: 16px; }
.builder-exercise-body .training-builder-heading { flex-wrap: wrap; }
.builder-exercise-body .training-builder-heading > div { margin-left: auto; }
.builder-search-status { font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.builder-search-status:empty { display: none; }
.builder-exercise-body > label + label { margin-top: 14px; }
.plan-discard-warning { border: 1px solid #bd7272; border-radius: 8px; padding: 16px; background: #fff2f0; margin-top: 16px; }
.plan-discard-warning p { margin: 8px 0 14px; font-size: 13px; }
.plan-discard-warning > div { display: flex; gap: 10px; flex-wrap: wrap; }
.booking-request-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--palette-abc0dc,#abc0dc); border-radius: 8px; background: #edf3fb; }
.booking-request-panel > strong { display: block; font-size: 14px; line-height: 1.5; }
.booking-request-panel p { margin-top: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.booking-request-note { white-space: pre-wrap; }
.booking-request-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.booking-request-actions .btn { min-height: 44px; }
.booking-request-list { margin-block: 16px; }
.booking-request-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border: 0; border-top: 1px solid var(--line); text-align: left; background: transparent; color: var(--ink); }
.booking-request-row:hover { background: #edf3fb; }
.booking-request-row > span { min-width: 0; }
.booking-request-row strong,.booking-request-row small { display: block; overflow-wrap: anywhere; }
.booking-request-row small { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.booking-request-row > .icon { flex-shrink: 0; }
.booking-request-notice { display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 16px; border: 1px solid var(--palette-a9bfdb,#a9bfdb); border-radius: 8px; background: var(--palette-eaf2fd,#eaf2fd); font-size: 14px; font-weight: 700; line-height: 1.5; color: #1c3c63; }
.booking-request-notice > span { flex: 1; min-width: 0; }
.booking-request-notice > .icon { flex-shrink: 0; }
#booking-request-time { margin-block: 16px; }
#booking-request-time > p { margin-bottom: 12px; }
.booking-change-cutoff { flex-basis: 100%; margin: 0 0 4px; line-height: 1.6; }
.brand-logo { display: block; width: 144px; height: 80px; object-fit: contain; mix-blend-mode: normal; flex-shrink: 0; }
.brand { width: fit-content; max-width: 100%; padding: 4px 12px; border-radius: 8px; background: transparent; }
.sidebar .brand { padding: 0; }
.sidebar .brand .brand-logo { width: 112px; height: 60px; object-fit: contain; }
.login-story .brand { background: transparent; padding: 0; mix-blend-mode: normal; }
.login-story .brand-logo { width: 176px; height: 94px; }
.access-card > .brand-logo { padding: 8px; background: transparent; mix-blend-mode: normal; border-radius: 8px; }
.topbar { position: relative; background: var(--palette-080f1d,#0a1527); color: #e7effa; border-color: #31465f; }
.topbar > * { position: relative; z-index: 1; }
.topbar .topbar-pulse { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.topbar-pulse::before { content: ''; position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; box-sizing: border-box; border-radius: 50%; background: radial-gradient(circle,transparent 35%,var(--palette-379fff12,#379fff12) 39%,var(--palette-48b2ff55,#48b2ff55) 44%,var(--palette-83d2ffb3,#83d2ffb3) 48%,var(--palette-70caff99,#70caff99) 51%,var(--palette-40aaff45,#40aaff45) 56%,var(--palette-379fff12,#379fff12) 62%,transparent 68%); opacity: 0; }
.topbar-pulse::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center,var(--palette-52b5ff55,#52b5ff55) 0%,var(--palette-379fff2e,#379fff2e) 38%,transparent 75%); transform-origin: center; opacity: 0; }
@keyframes header-logo-pulse {
  0% { transform: translate(-50%,-50%) scale(.28); opacity: 0; }
  8% { transform: translate(-50%,-50%) scale(.4); opacity: 1; }
  35% { opacity: .6; }
  65% { opacity: .2; }
  90%,100% { transform: translate(-50%,-50%) scale(1.7); opacity: 0; }
}
@keyframes header-logo-glow {
  0% { transform: scaleX(.4); opacity: 0; }
  8% { transform: scaleX(.55); opacity: .9; }
  35% { opacity: .45; }
  65% { transform: scaleX(1); opacity: .12; }
  90%,100% { transform: scaleX(1); opacity: 0; }
}
.header-pulse-play .topbar-pulse::before { animation: header-logo-pulse 2.5s ease-out var(--header-pulse-delay,.2s) 1 both; }
.header-pulse-play .topbar-pulse::after { animation: header-logo-glow 2.5s ease-out var(--header-pulse-delay,.2s) 1 both; }
.header-pulse-play .topbar-logo .brand-logo { animation: header-logo-impact 2.5s ease-out var(--header-pulse-delay,.2s) 1 both; }
@keyframes header-logo-impact {
  0%,25%,100% { transform: scale(1); filter: brightness(1); }
  4% { transform: scale(.94); filter: brightness(1); }
  8% { transform: scale(1.07); filter: brightness(1.22); }
  16% { transform: scale(.99); filter: brightness(1.04); }
}
@media (prefers-reduced-motion: reduce) { .header-pulse-play .topbar-pulse::before,.header-pulse-play .topbar-pulse::after { animation: none; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .header-pulse-play .topbar-logo .brand-logo { animation: none; } }
.topbar .breadcrumb, .topbar .breadcrumb strong { color: #c7d7ea; }
.topbar .breadcrumb { max-width: calc(50% - 90px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn, .topbar .topbar-date { color: #c7d7ea; }
.topbar-right { position: relative; z-index: 1; margin-left: auto; }
.topbar-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; justify-content: center; align-items: center; width: 84px; height: 44px; border-radius: 6px; mix-blend-mode: normal; }
.topbar-logo .brand-logo { width: 84px; height: 44px; }
.boot-screen, .startup-error { background: radial-gradient(ellipse at 50% 35%,#203b59,#0a1527 70%); color: #ecf4ff; }
.boot-screen .brand-logo, .startup-error .brand-logo { width: min(280px,75vw); height: auto; object-fit: contain; }
.boot-screen p, .startup-error p { color: #b6c8df; }
.boot-progress { display: block; width: 100px; height: 3px; margin-top: 24px; border-radius: 3px; background: #3c5878; overflow: hidden; }
.boot-progress::after { content: ''; display: block; width: 45%; height: 100%; background: #7ca8d9; border-radius: 3px; animation: logo-loading 1.3s ease-in-out infinite alternate; }
@keyframes logo-loading { from { transform: translateX(-100%); } to { transform: translateX(225%); } }
@media (prefers-reduced-motion: reduce) { .boot-progress::after { animation: none; margin-inline: auto; } }
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .sidebar { padding-top: calc(20px + env(safe-area-inset-top)); }
  .sidebar .brand .brand-logo { width: 104px; height: 44px; }
  .screen-app .topbar { position: relative; min-height: 50px; height: auto; }
  .screen-app .topbar .breadcrumb { display: none; }
  .topbar-logo { width: 76px; height: 40px; }
  .topbar-logo .brand-logo { width: 76px; height: 40px; }
}

/* Compact first-run guidance on Home. */
.first-steps-list li > span:last-child { min-width:0; line-height:1.5; }
.first-steps-list small { display:block; margin-top:4px; color:#61748d; font-size:12px; }
.client-first-steps .panel-heading { margin-bottom:0; gap:12px; }
.client-first-steps .panel-heading h2 { font-size:20px; margin:0; }
.client-first-steps .panel-heading small { flex-shrink:0; color:#61748d; font-size:12px; }
.client-first-steps .first-steps-list { margin:18px 0; }
.setup-checkin-date { display:flex; align-items:flex-start; gap:10px; padding-top:14px; border-top:1px solid #d5e0ed; }
.setup-checkin-date .icon { flex-shrink:0; width:18px; height:18px; margin-top:2px; }
.client-first-steps > .btn { margin-top:14px; }

.next-workout-card progress[aria-label="Coached workout progress"] { display:block; width:100%; height:8px; margin:16px 0; accent-color:var(--palette-91b7e1,#91b7e1); }

.coached-start-preview { padding:18px; border:1px solid #48698c; border-radius:8px; background:linear-gradient(120deg,var(--palette-172b43,#172b43),var(--palette-244462,#244462)); color:#eff6ff; margin:0 0 16px; }
.coached-start-preview .eyebrow { color:var(--palette-b7d2f0,#b7d2f0); }
.coached-start-preview h3 { margin:10px 0 8px; font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
.coached-start-preview p { margin:0; font-size:13px; color:var(--palette-c5d6eb,#c5d6eb); line-height:1.6; }
.coached-workout-choice > summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; border:1px solid var(--palette-c6d5e7,#c6d5e7); border-radius:6px; cursor:pointer; list-style:none; font-size:13px; font-weight:750; }
.coached-workout-choice > summary::-webkit-details-marker { display:none; }
.coached-workout-choice[open] > summary .icon { transform:rotate(90deg); }
.coached-workout-choice > label { display:block; margin-top:16px; }
.booking-workout-hint { padding-top:10px; }
.coached-result-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px; margin-bottom:18px; }
.coached-result-card > div { min-width:0; }
.coached-result-card small { font-size:10px; color:#61748d; }
.coached-result-card strong { display:block; margin-top:8px; overflow-wrap:anywhere; }
.coached-result-card p { margin-top:6px; font-size:12px; color:#61748d; }
.coached-result-card .btn { flex-shrink:0; }
@media(max-width:360px) { .coached-result-card { flex-wrap:wrap; } .coached-result-card .btn { width:100%; } }

/* Keep the main session action above a balanced pair of secondary buttons. */
.coach-booking-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-content:center; }
.coach-booking-actions .btn { width:100%; min-width:0; min-height:44px; white-space:normal; text-align:center; line-height:1.4; padding:11px 12px; }
.coach-booking-actions .btn-primary { grid-column:1 / -1; order:-2; }
.coach-booking-actions [data-action^="complete-booking:"] { grid-column:1 / -1; order:-1; }

.coach-session-now { padding:22px; margin-bottom:20px; border:1px solid var(--palette-43698f,#43698f); border-left:4px solid var(--palette-5a9ef1,#5a9ef1); border-radius:10px; color:#f1f6ff; background:linear-gradient(120deg,var(--palette-14273e,#14273e),var(--palette-254665,#254665)); box-shadow:0 6px 16px var(--palette-152c4520,#152c4520); }
.coach-session-now .tag { color:#d0e2fa; background:var(--palette-355676,#355676); font-size:11px; }
.coach-session-now h2 { margin:16px 0 8px; font-size:26px; font-weight:850; line-height:1.2; overflow-wrap:anywhere; }
.coach-session-now > p { font-size:13px; color:var(--palette-c5d6ea,#c5d6ea); line-height:1.6; }
.coach-session-workout { display:flex; flex-direction:column; gap:6px; padding:14px 0 18px; }
.coach-session-workout small { color:var(--palette-a9c7e7,#a9c7e7); font-size:10px; font-weight:750; }
.coach-session-workout strong { font-size:17px; overflow-wrap:anywhere; }
.coach-session-now > .btn { width:100%; min-height:52px; white-space:normal; padding:14px; }
.coach-session-now .btn-primary { background:var(--palette-315c85,#315c85); border-color:var(--palette-779dc3,#779dc3); color:#fff; box-shadow:0 2px 4px #0002; }
.coach-session-now .btn-primary:hover { background:var(--palette-3b6b99,#3b6b99); }
@media(max-width:540px) { .coach-session-now { padding:20px 16px; } .coach-session-now h2 { font-size:24px; } }

/* Plan editor: one clear workout at a time, tools disclosed only when needed. */
#plan-form { display:grid;gap:20px; }
#plan-form .builder-plan-info { padding:20px;border:1px solid var(--palette-c9d7e9,#c9d7e9);border-radius:14px;background:#edf3fa; }
#plan-form .builder-section-label { display:block;font-size:10px;letter-spacing:.1em;font-weight:800;color:#597392;margin-bottom:14px; }
#plan-form .builder-plan-info > label { display:block;font-size:13px;font-weight:700; }
#plan-form input,#plan-form select { border-radius:10px;margin-top:9px;min-height:46px; }
#plan-form .builder-description { margin-top:12px; }
#plan-form .builder-description summary,#plan-form .builder-options > summary,#plan-form .builder-search-options > summary { display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 0;list-style:none;font-size:12px;font-weight:600;cursor:pointer;color:#5b718d; }
#plan-form summary::-webkit-details-marker { display:none; }
#plan-form .builder-description summary > .icon,#plan-form .builder-options summary > .icon { width:15px;height:15px;margin-left:auto;transition:transform .15s; }
#plan-form .builder-description[open] > summary > .icon,#plan-form .builder-options[open] > summary > .icon { transform:rotate(90deg); }
#plan-form .builder-section-heading { display:flex;align-items:center;justify-content:space-between;gap:12px; }
#plan-form .builder-section-heading .builder-section-label { margin:0; }
#plan-form .builder-section-heading .btn { min-height:42px;padding:10px 14px; }
#plan-form .builder-tabs { border:0;padding:0;margin:16px 0 20px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px; }
#plan-form .builder-tabs .filter-chip { min-width:0;min-height:44px;white-space:nowrap;overflow-wrap:normal;padding:9px 3px;font-size:12px;border-radius:9px;background:#edf2f8;color:#4b617d;border:1px solid var(--palette-d0dbea,#d0dbea); }
#plan-form .builder-tabs .filter-chip.selected { background:linear-gradient(115deg,var(--palette-13283f,#13283f) 0%,var(--palette-203b59,#203b59) 60%,var(--palette-2b4b6d,#2b4b6d) 100%);color:white;border-color:#36516f;box-shadow:none; }
#plan-form .builder-workout-section > label { display:block;font-weight:700;font-size:13px; }
#plan-form .builder-day-tools { margin:4px 0 12px;padding:12px;border:1px solid #d5dfec;border-radius:10px;background:#f1f5fa; }
#plan-form .builder-exercise-list-heading { padding-block:18px 12px; }
#plan-form .builder-exercise-list-heading h3 { margin:0;font-size:16px; }
#plan-form .builder-exercise-list-heading > span { font-size:12px;color:#6c8099; }
#plan-form .training-builder-card { padding:0;border-radius:12px;background:white;border:1px solid var(--palette-ccd9e9,#ccd9e9); }
#plan-form .builder-exercise-summary { background:#edf3fa;padding:16px; }
#plan-form .training-builder-card[open] > .builder-exercise-summary { background:linear-gradient(110deg,var(--palette-102238,#102238) 0%,var(--palette-1b334f,#1b334f) 58%,var(--palette-2b4969,#2b4969) 100%);border-color:#36516f;color:#edf5ff;border-left:0;padding-left:16px; }
#plan-form .training-builder-card[open] > .builder-exercise-summary small { color:var(--palette-b1c7e1,#b1c7e1); }
#plan-form .builder-exercise-body { padding:18px; }
#plan-form .builder-exercise-body > label { font-weight:700; }
#plan-form .builder-search-options { margin-top:6px; }
#plan-form .builder-search-options > summary .icon { width:15px;height:15px; }
#plan-form .builder-search-options label { display:block;padding-bottom:8px; }
#plan-form .builder-basic-targets { padding:14px;background:#f1f5fa;border-radius:10px;gap:12px;margin:12px 0 8px; }
#plan-form .builder-basic-targets label { color:#4d6685; }
#plan-form .builder-exercise-body > .fine-print { font-size:11px;margin:8px 0 16px; }
#plan-form .builder-target-details { margin:0;border-top:1px solid #dae3ef; }
#plan-form .builder-target-details > summary { position:relative;list-style:none;padding:14px 28px 14px 0;font-weight:700; }
#plan-form .builder-target-details > summary > .icon { position:absolute;right:0;top:16px;width:16px;height:16px; }
#plan-form .builder-target-details[open] > summary > .icon { transform:rotate(90deg); }
#plan-form .builder-exercise-options { border-top:1px solid #dae3ef; }
#plan-form .training-builder-heading { margin:4px 0 8px; }
#plan-form .training-builder-heading > div { margin-left:0;gap:10px;flex-wrap:wrap; }
#plan-form .builder-workout-section > [data-action="builder-add-exercise"] { width:100%;border:1px dashed #91aac8;border-radius:10px;background:#edf3fa;color:#234262;min-height:48px; }
#plan-form .builder-save-actions { margin:0;padding-top:18px;border-top:1px solid var(--palette-ccd9e9,#ccd9e9); }
@media(max-width:600px) {
  #plan-form { gap:18px; }
  #plan-form .builder-plan-info { padding:16px; }
  #plan-form .builder-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #plan-form .builder-exercise-body { padding:14px; }
  #plan-form .builder-basic-targets { padding:12px;gap:8px; }
  #plan-form .builder-save-actions > .fine-print { flex:1 0 100%; }
}

#plan-form .builder-days-heading { flex-wrap:wrap; }
#plan-form .builder-days-actions { display:flex;gap:8px; }
@media(max-width:600px) {
  #plan-form .builder-days-actions { width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
  #plan-form .builder-days-actions .btn { padding:10px 8px; }
}

/* Shared card edges across all coach and client sections. */
.main-shell :is(.panel,.plan-card,.training-workout-card,.notification-card) { border-radius:var(--card-radius); }
.main-shell .stat-card { border-radius:var(--stat-radius); }
.workspace-fold > summary { border-radius:9px; }
.workspace-fold[open] > summary { border-radius:9px 9px 0 0; }
.panel > .panel-heading { border-radius:9px 9px 0 0; }
.search-field { border-radius:var(--field-radius); }
.search-field input { border-radius:0 7px 7px 0; }
.main-shell :is(.attention-strip,.booking-request-panel,.booking-request-notice,.coached-start-preview) { border-radius:var(--card-radius); }

.statistics-period { font-size:12px;color:var(--muted);margin:0 0 20px;line-height:1.6; }
.coach-statistics-layout { display:grid;grid-template-columns:1fr 1fr;gap:18px; }
.coach-statistics-panel { padding:22px;margin-bottom:18px; }
.coach-statistics-panel h2 { font-size:18px;margin:0 0 12px; }
.coach-statistics-panel h3 { font-size:15px;margin:24px 0 12px; }
.coach-statistics-panel > p { font-size:13px;line-height:1.65;color:var(--muted); }
.coach-statistics-panel .btn { margin-top:14px; }
.coach-workload-chart { display:grid;gap:14px;margin:24px 0; }
.coach-workload-row { display:grid;grid-template-columns:36px minmax(0,1fr) 72px;align-items:center;gap:12px;font-size:13px; }
.coach-workload-row > span { text-align:right;font-weight:750; }
.coach-workload-row small { display:block;font-weight:400;font-size:10px;color:var(--muted);margin-top:4px; }
.coach-workload-track { height:16px;border-radius:6px;background:#e6edf6;overflow:hidden; }
.coach-workload-track > span { display:block;height:100%;border-radius:6px;background:linear-gradient(100deg,var(--palette-172c46,#172c46),var(--palette-42658a,#42658a)); }
.statistics-facts { margin:16px 0; }
.statistics-facts > div { display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px; }
.statistics-facts dt { color:var(--muted); }
.statistics-facts dd { margin:0;font-weight:800; }
.statistics-followups { display:grid;gap:10px; }
.statistics-followups a { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--palette-d1ddec,#d1ddec);border-radius:10px;background:#f4f7fc; }
.statistics-followups small { display:block;margin-top:6px;font-size:12px;line-height:1.5;color:var(--muted); }
.statistics-followups .icon { flex-shrink:0; }
.statistics-note { line-height:1.65; }
@media(max-width:760px) {
  .coach-statistics-layout { grid-template-columns:minmax(0,1fr);gap:0; }
  .coach-statistics-panel { padding:18px; }
  .coach-workload-row { grid-template-columns:32px minmax(0,1fr) 64px;gap:10px; }
}

.coach-workload-track progress { display:block;appearance:none;width:100%;height:100%;margin:0;border:0;border-radius:6px;background:#e6edf6; }
.coach-workload-track progress::-webkit-progress-bar { background:#e6edf6;border-radius:6px; }
.coach-workload-track progress::-webkit-progress-value { background:linear-gradient(100deg,var(--palette-172c46,#172c46),var(--palette-42658a,#42658a));border-radius:6px; }
.coach-workload-track progress::-moz-progress-bar { background:linear-gradient(100deg,var(--palette-172c46,#172c46),var(--palette-42658a,#42658a));border-radius:6px; }

#workout-form .workout-end-button { flex-shrink:0;color:var(--palette-c5d7eb,#c5d7eb);border:1px solid #48617d;border-radius:8px;background:var(--palette-20354e,#20354e); }
#workout-form .workout-end-button:hover { background:var(--palette-2b4562,#2b4562); }

.workout-title-row { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px; }
.workout-title-row .page-heading { min-width:0;flex:1;margin:0; }
.workout-title-row .workout-end-button { flex:0 0 44px;width:44px;height:44px;border:1px solid #48617d;border-radius:8px;background:var(--palette-20354e,#20354e);color:var(--palette-c5d7eb,#c5d7eb); }
@media(max-width:760px) {
  .main-shell:has(#workout-form) .workout-title-row { margin:0 0 12px;flex-shrink:0; }
  .main-shell:has(#workout-form) .workout-title-row .page-heading { margin:0; }
}

.workout-title-row .page-heading { padding:0;border:0;background:none; }
@media(max-width:760px) {
  .screen-deck > .workout-title-row .page-heading h1 { font-size:23px;line-height:1.1; }
  .screen-deck > .workout-title-row .page-heading :is(p,.eyebrow) { display:none; }
}

.workout-title-row .page-heading { flex-direction:row;flex-wrap:nowrap; }
.workout-title-row .page-heading > div { flex:1 1 auto; }
.screen-deck > .workout-title-row { min-height:44px; }

/* Copy the previous load inside the KG field, without another set-grid row. */
.set-load-field { position:relative;min-width:0; }
.set-load-field input { width:100%; }
#workout-form .set-load-field.has-copy input { padding-right:36px;padding-left:4px;font-size:14px;appearance:textfield; }
.set-load-field.has-copy input::-webkit-inner-spin-button,.set-load-field.has-copy input::-webkit-outer-spin-button { appearance:none;margin:0; }
#workout-form .set-load-field .set-weight-copy { position:absolute;inset:0 0 0 auto;width:34px;min-height:44px;max-width:none;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-left:1px solid #415975;border-radius:0 6px 6px 0;background:var(--palette-20364f,#20364f);color:var(--palette-c7d9f1,#c7d9f1);box-shadow:none; }
#workout-form .set-load-field .set-weight-copy:hover { background:var(--palette-2c4968,#2c4968); }
#workout-form .set-load-field .set-weight-copy:focus-visible { outline:2px solid var(--palette-94b8df,#94b8df);outline-offset:-3px; }
#workout-form .set-load-field .set-weight-copy .icon { width:15px;height:15px; }

.set-reps-field { position:relative;min-width:0; }
.set-reps-field input { width:100%; }
#workout-form .set-reps-field.has-copy input { padding-right:36px;padding-left:4px;font-size:14px;appearance:textfield; }
.set-reps-field.has-copy input::-webkit-inner-spin-button,.set-reps-field.has-copy input::-webkit-outer-spin-button { appearance:none;margin:0; }
#workout-form .set-reps-field .set-value-copy { position:absolute;inset:0 0 0 auto;width:34px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-left:1px solid #415975;border-radius:0 6px 6px 0;background:var(--palette-20364f,#20364f);color:var(--palette-c7d9f1,#c7d9f1);box-shadow:none; }
#workout-form .set-reps-field .set-value-copy:hover { background:var(--palette-2c4968,#2c4968); }
#workout-form .set-reps-field .set-value-copy:focus-visible { outline:2px solid var(--palette-94b8df,#94b8df);outline-offset:-3px; }
#workout-form .set-reps-field .set-value-copy .icon { width:15px;height:15px; }

/* Coach notebook colour preview. */
.main-shell[data-page="client"] .private-note-panel {
  background:linear-gradient(120deg,var(--palette-102238,#102238),var(--palette-203c59,#203c59));
  border-color:#3b5878;color:#edf4ff;
  box-shadow:0 6px 18px var(--palette-14283e20,#14283e20),inset 0 1px 0 #ffffff0b;
}
.main-shell[data-page="client"] .private-note-panel h2 { color:#edf4ff; }
.main-shell[data-page="client"] .private-note-panel :is(.coach-note-preview,.fine-print) { color:#b6c9e0; }
.main-shell[data-page="client"] .private-note-panel .tag-blue { background:var(--palette-294561,#294561);color:var(--palette-c9dff5,#c9dff5);border-color:#486786; }
.main-shell[data-page="client"] .private-note-panel .btn-primary { background:var(--palette-31577c,#31577c);border-color:#6386aa;color:#fff;box-shadow:none; }
.main-shell[data-page="client"] .private-note-panel .btn-secondary { background:var(--palette-20354e,#20354e);border-color:#4b6685;color:#dce9f8;box-shadow:none; }
.main-shell[data-page="client"] .private-note-panel .btn:hover { background:var(--palette-3a6085,#3a6085); }

.attention-client-list { display:grid;gap:14px;padding:16px; }
.attention-client-card { padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--white); }
.attention-client-card ul { padding:0;margin:16px 0;list-style:none;display:grid;gap:12px; }
.attention-client-card li { display:grid;gap:5px;line-height:1.5;font-size:13px; }
.attention-client-card li > span { color:var(--muted); }
.attention-client-card .client-review-actions { display:flex;flex-wrap:wrap;gap:8px; }

.message-header .message-person { flex:1 1 0;min-width:0; }
.message-person-actions { display:flex;align-items:center;gap:4px;flex-shrink:0; }
.message-person-actions .icon-btn { display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit; }
.message-person-actions .icon-btn:hover { background:#80808014; }
.message-person-actions .icon { width:18px;height:18px; }

.screen-inline-controls .inbox-back { min-height:40px;padding:9px 14px;border-radius:8px;gap:8px; }
.inbox-back .icon { transform:rotate(180deg); }

.client-review-panel li > span { display:block;margin-top:4px;line-height:1.5; }

.screen-dock a { position:relative; }
.screen-dock .dock-message-count { position:absolute; top:3px; left:calc(50% + 5px); min-width:17px; height:17px; padding:0 4px; display:grid; place-items:center; border-radius:999px; background:#d72c45; color:#fff; border:1px solid var(--palette-102238,#080f1d); font-size:10px; font-weight:750; line-height:1; }
.screen-dock .dock-message-count[hidden] { display:none; }

/* Keep numeric badges independent of surrounding text and font metrics. */
:is(.sidebar .nav-count,.notification-badge,.unread-badge,.screen-dock .dock-message-count) {
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
  font-family:Arial,sans-serif; font-variant-numeric:tabular-nums; line-height:1; text-align:center;
  padding-block:0;
}
.sidebar .nav-count { min-height:18px; min-width:18px; }
.unread-badge { min-height:22px; min-width:22px; }
:is(.sidebar .nav-count,.notification-badge,.unread-badge,.screen-dock .dock-message-count)[hidden] { display:none; }

/* Daily client notes use the workspace typography, controls and colours. */
.main-shell[data-page="notepad"] .page-footer { display:none; }
.personal-notepad { display:flex;flex-direction:column;gap:12px;height:calc(100dvh - 140px);min-height:420px;max-width:1100px;margin:auto; }
.personal-notepad .notepad-heading { display:flex;align-items:center;justify-content:flex-start;gap:12px;flex-shrink:0;padding:0; }
.personal-notepad .notepad-heading > div { min-width:0; }
.personal-notepad .notepad-heading .eyebrow { display:block;margin:0 0 4px;font-size:11px; }
.personal-notepad .notepad-heading h1 { margin:0;font-size:28px;line-height:1.2;overflow-wrap:anywhere; }
.personal-notepad .notepad-back,.personal-notepad .notepad-toolbar .icon-btn { display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--white);color:inherit;text-decoration:none;font-size:24px;flex-shrink:0; }
.notepad-toolbar { display:flex;align-items:center;gap:8px;flex-shrink:0; }
.personal-notepad .notepad-toolbar input { width:166px;min-width:0;height:40px;box-sizing:border-box;padding:8px 10px;margin:0;border:1px solid var(--line);border-radius:8px;font-family:inherit;font-size:14px;background:var(--white);color:inherit; }
.personal-notepad .notepad-toolbar .btn,.personal-notepad .notepad-footer .btn { min-height:40px;margin:0;padding:8px 12px;white-space:nowrap; }
.main-shell[data-page="notepad"] .personal-notepad textarea { flex:1;min-height:150px;max-height:none;width:100%;margin:0;resize:none;box-sizing:border-box;padding:16px;border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:16px;line-height:1.55;background:var(--white);color:inherit; }
.notepad-footer { display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0; }
.notepad-status,.notepad-help { font-size:12px;color:var(--muted); }
.notepad-status[hidden] { display:none; }
.notepad-status { color:var(--danger,#b42336); }
.notepad-help { min-width:0; }
.notepad-help summary { cursor:pointer; }
.notepad-help p { margin:8px 0 0;line-height:1.5;max-width:640px; }
.notepad-footer:has(details[open]) { align-items:flex-start; }
.notepad-clients { display:grid;gap:10px;padding:16px; }
@media(max-width:800px) {
 .screen-app .main-shell[data-page="notepad"] main { padding:12px; }
 .screen-app .main-shell[data-page="notepad"] .screen-stage { padding:0;overflow:hidden;height:100%; }
 .screen-app .personal-notepad { height:100%;min-height:0;gap:10px; }
 .screen-app .personal-notepad textarea { min-height:80px;padding:12px;line-height:1.45; }
 .personal-notepad .notepad-heading h1 { font-size:24px; }
 .personal-notepad .notepad-heading .eyebrow { font-size:10px;margin-bottom:2px; }
 .notepad-toolbar { gap:6px; }
 .personal-notepad .notepad-toolbar input { flex:1;width:0; }
 .notepad-footer { gap:8px; }
 .notepad-help { font-size:11px; }
 .personal-notepad .notepad-footer .btn { font-size:12px; }
}

.notepad-footer .notepad-help { width:100%; }
.notepad-footer .notepad-help [data-note-download] { margin-top:10px; }
.notepad-clients > .btn { justify-content:flex-start;text-align:left;font-size:16px;padding-inline:16px; }

/* Keep touch scrolling inside the mobile workspace, including above a keyboard. */
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
 html:has(body.screen-app) { height:100%;overflow:hidden;overscroll-behavior:none; }
 body.screen-app { position:fixed;inset:0 0 auto;width:100%;min-height:0;overscroll-behavior:none; }
 .screen-app .personal-notepad textarea { overscroll-behavior-y:contain;touch-action:pan-y; }
}

/* Short hour and minute menus for working hours and partial time off. */
#availability-form .availability-time-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
}
#availability-form .availability-time-picker select {
  width: 100%;
  min-width: 0;
  padding: 10px 2px;
  font-size: 16px;
  text-align: center;
}
#availability-form .availability-time-picker > span {
  font-weight: 700;
}
#availability-form .availability-time-picker select {
  padding-right: 16px !important;
  background-position: right 2px center;
  background-size: 12px 12px;
}

#availability-form .availability-time-menu { position: relative; min-width: 0; }
#availability-form .availability-time-menu summary {
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  min-height: 44px; padding: 8px 5px; box-sizing: border-box;
  border: 1px solid var(--line, #dce1e9); border-radius: 10px;
  background: var(--surface, #fff); color: inherit;
  font-size: 16px; font-weight: 600; cursor: pointer; list-style: none;
}
#availability-form .availability-time-menu summary::-webkit-details-marker { display: none; }
#availability-form .availability-time-menu[data-disabled="true"] summary { opacity: .5; cursor: default; }
#availability-form .availability-time-options {
  position: absolute; top: calc(100% + 3px); left: 0; width: 100%;
  max-height: 176px; overflow-y: auto; overscroll-behavior: contain;
  z-index: 20; display: flex; flex-direction: column; box-sizing: border-box;
  border: 1px solid var(--line, #dce1e9); border-radius: 8px;
  background: var(--surface, #fff); box-shadow: 0 4px 12px #0002;
}
#availability-form .availability-time-options button {
  flex: 0 0 40px; width: 100%; min-height: 40px; padding: 4px 0;
  border: 0; border-radius: 0; background: transparent; color: inherit;
  font: inherit; font-size: 16px; text-align: center; cursor: pointer;
}
#availability-form .availability-time-options button[aria-pressed="true"],
#availability-form .availability-time-options button:hover,
#availability-form .availability-time-options button:focus-visible { background: #dbeafe; color: #10233e; }

#availability-form .availability-time-menu summary > span:last-child {
  font-size: 0;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#availability-form .availability-time-menu summary > span:last-child::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1.5px) rotate(45deg);
}

/* Availability follows the workspace card and form styling. */
#modal:has(#availability-form) .modal-description {
  margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: var(--muted);
}
#availability-form { --availability-card: #fff; --availability-soft: var(--palette-edf2ff, #edf2ff); }
#availability-form .availability-settings {
  padding: 16px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--availability-card); margin-bottom: 24px;
}
#availability-form label.availability-enabled {
  display: grid; grid-template-columns: 1fr 42px; align-items: center;
  gap: 14px; padding: 0 0 16px; margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
#availability-form .availability-enabled > span { grid-column: 1; grid-row: 1; }
#availability-form .availability-enabled strong { font-size: 14px; font-weight: 750; }
#availability-form .availability-enabled small { margin-top: 4px; font-size: 12px; line-height: 1.5; }
#availability-form .availability-enabled > input {
  appearance: none; grid-column: 2; grid-row: 1; position: relative;
  width: 42px; height: 24px; min-height: 24px; margin: 0; padding: 0;
  border: 1px solid #a4b0c2; border-radius: 20px; background: #cbd3df;
  cursor: pointer;
}
#availability-form .availability-enabled > input::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  top: 2px; left: 2px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px #0002; transition: transform .15s;
}
#availability-form .availability-enabled > input:checked { background: var(--sport-blue); border-color: var(--sport-blue); }
#availability-form .availability-enabled > input:checked::after { transform: translateX(18px); }
#availability-form .availability-enabled > input:focus-visible { outline: 2px solid var(--sport-blue); outline-offset: 3px; }
#availability-form .availability-zone { margin: 0; font-size: 12px; font-weight: 650; }
#availability-form .availability-zone select { margin-bottom: 0; font-size: 14px; }
#availability-form .availability-section-title,
#availability-form .availability-section-heading h3 {
  margin: 0; font-size: 15px; line-height: 1.3; font-weight: 850;
  text-transform: uppercase; letter-spacing: -.02em;
}
#availability-form .fine-print { font-size: 12px; line-height: 1.6; margin: 8px 0 14px; }
#availability-form .availability-weekly { gap: 10px; }
#availability-form .availability-day,
#availability-form .availability-time-off {
  padding: 14px; border-radius: 8px; background: var(--availability-card);
  border: 1px solid var(--line); box-shadow: 0 2px 5px #10233e04;
}
#availability-form .availability-day-heading { min-height: 36px; margin-bottom: 10px; gap: 8px; }
#availability-form .availability-day-heading h3 { margin: 0; font-size: 15px; font-weight: 800; }
#availability-form .availability-day-heading > span {
  padding: 4px 7px; border-radius: 4px; background: #f1f4f8;
  font-size: 10px; white-space: nowrap; color: var(--muted);
}
#availability-form .availability-day-heading .text-link {
  padding: 6px 9px; min-height: 36px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--availability-soft);
  color: var(--navy); font-size: 11px; font-weight: 700; text-decoration: none;
}
#availability-form .availability-day-heading .text-link:disabled { opacity: .45; }
#availability-form .availability-period { gap: 8px; margin-top: 10px; }
#availability-form .availability-period > label { margin: 0; font-size: 11px; font-weight: 650; color: var(--muted); }
#availability-form .availability-time-picker { margin-top: 5px; color: var(--navy); }
#availability-form .availability-time-menu summary { border-radius: 6px; border-color: var(--line); font-variant-numeric: tabular-nums; }
#availability-form .availability-period > .icon-btn { margin: 0; height: 44px; width: 32px; min-width: 32px; min-height: 44px; color: var(--muted); }
#availability-form .availability-section-heading { margin-top: 26px; margin-bottom: 0; }
#availability-form .availability-section-heading .btn { font-size: 12px; padding: 9px 12px; min-height: 40px; }
#availability-form .availability-no-timeoff { padding: 16px; margin: 0; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
#availability-form .modal-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); gap: 10px; }
@media (max-width: 760px) {
  #availability-form .availability-period { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 32px; }
  #availability-form .availability-section-heading { align-items: center; flex-wrap: nowrap; }
  #availability-form .availability-section-heading h3 { max-width: 55%; }
  #availability-form .modal-actions { display: grid; grid-template-columns: auto minmax(0,1fr); }
  #availability-form .modal-actions .btn { justify-content: center; padding-inline: 12px; }
}
#availability-form .availability-time-off label.preference-toggle {
  align-items: center; margin: 14px 0; padding: 0; font-size: 12px;
}
#availability-form .availability-time-off .preference-toggle > input {
  width: 18px; height: 18px; min-height: 18px; margin: 0;
}
#modal:has(#availability-form), #modal:has(#availability-form) .modal-body { overflow-anchor: none; }

#availability-form .availability-off-dates {
  gap: 14px 12px;
}
#availability-form .availability-off-dates > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
#availability-form .availability-off-dates > label > input,
#availability-form .availability-off-dates > label > .availability-time-picker {
  margin: 0;
}

/* Calendar settings use the same cards, labels and actions as the workspace. */
.calendar-settings-heading { display: none; }
.calendar-setting-card { border-radius: 8px; padding: 18px; box-shadow: 0 2px 5px #10233e04; }
.calendar-setting-card > div { flex: 1; min-width: 0; }
.calendar-setting-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.calendar-setting-heading strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.calendar-setting-status { padding: 4px 8px; border-radius: 4px; background: #edf1f6; color: #57677c; font-size: 11px; font-weight: 700; line-height: 1.4; }
.calendar-setting-status.is-enabled { background: var(--palette-edf2ff,#edf2ff); color: var(--palette-174ba5,#174ba5); }
.calendar-setting-zone { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.calendar-setting-card p { font-size: 12px; line-height: 1.6; margin-top: 9px; }
.calendar-setting-card > .btn { min-height: 44px; border-radius: 6px; }
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-filters {
    display: grid; grid-template-columns: minmax(0,1fr); gap: 16px;
    padding: 16px; margin: 0;
  }
  .screen-stage .calendar-filters .calendar-settings-heading {
    display: block; margin: 0 0 2px; font-size: 15px; font-weight: 850;
    text-transform: uppercase; letter-spacing: -.02em;
  }
  .screen-stage .calendar-filters > label {
    min-width: 0; margin: 0; display: flex; flex-direction: column;
    gap: 7px; font-size: 12px; font-weight: 650; color: var(--muted);
  }
  .screen-stage .calendar-filters > label input,
  .screen-stage .calendar-filters > label select { margin: 0; min-height: 44px; color: var(--navy); border-radius: 6px; }
  .screen-stage .calendar-filters .calendar-cancelled-toggle {
    flex-direction: row; align-items: center; gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--line); font-weight: 500;
  }
  .screen-stage .calendar-cancelled-toggle input { width: 18px; height: 18px; min-height: 18px !important; flex: 0 0 18px; }
  .screen-stage .calendar-setting-card {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 14px; padding: 16px; margin: 12px 0;
  }
  .screen-stage .calendar-setting-card > .btn { width: 100%; justify-content: center; margin: 0; background: var(--palette-edf2ff,#edf2ff); }
  .screen-stage .calendar-toolbar:has(.calendar-filters:not([hidden])) { padding: 0; border-radius: 8px; }
}

/* Use the workspace calendar icon for the date picker. */
.calendar-filters #calendar-date {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2324364f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18m-12 5 2 2 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
}
.calendar-filters #calendar-date::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}

/* Mobile date controls keep only the workspace calendar icon. */
.calendar-filters #calendar-date {
  appearance: none;
  -webkit-appearance: none;
}
.calendar-filters #calendar-date::-webkit-calendar-picker-indicator {
  background: none;
  color: transparent;
}
.calendar-filters #calendar-date::-webkit-inner-spin-button,
.calendar-filters #calendar-date::-webkit-clear-button {
  display: none;
  -webkit-appearance: none;
}

.calendar-legend-panel { margin: 10px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.calendar-legend-panel > summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 44px; padding: 10px 14px; box-sizing: border-box;
  cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; color: var(--navy);
}
.calendar-legend-panel > summary::-webkit-details-marker { display: none; }
.calendar-legend-panel > summary::after {
  content: ''; width: 6px; height: 6px; flex: 0 0 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.calendar-legend-panel[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.calendar-legend-content { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.calendar-legend-content .month-summary { margin: 12px 0; gap: 10px; }
.calendar-legend-content .month-help,.calendar-legend-content .month-filter-note { margin: 10px 0 0; }
@media(max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage:has(.calendar-legend-panel[open]) { overflow-y: auto; }
}

.calendar-view-toggle button[aria-pressed="false"] {
  color: var(--navy);
  opacity: 1;
  font-weight: 700;
}

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-week-controls {
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) 32px 32px;
    gap: 4px;
    align-items: center;
  }
  .screen-stage .calendar-week-controls > strong {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
    justify-self: stretch;
    min-width: 0;
    padding-inline: 68px;
    pointer-events: none;
  }
  .screen-stage .calendar-week-controls > button:first-child { grid-column: 1; grid-row: 1; }
  .screen-stage .calendar-week-controls > button[data-action="calendar-next"] { grid-column: 3; grid-row: 1; }
  .screen-stage .calendar-week-controls > button[data-action="reload-calendar"] { grid-column: 4; grid-row: 1; }
  .screen-stage .calendar-range-controls { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-week-controls > strong { margin: 0; width: 100%; box-sizing: border-box; }
}

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-week-controls > strong {
    grid-column: 2;
    padding-inline: 0;
  }
}
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-week-controls { grid-template-columns: 44px minmax(0,1fr) 44px 44px; }
  .screen-stage .calendar-week-controls > .icon-btn { width: 44px; min-width: 44px; min-height: 44px; }
}

.calendar-range-controls > [data-action="calendar-today"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--palette-174ba5,#174ba5);
  background: var(--palette-edf2ff,#edf2ff);
  border: 1px solid var(--palette-a9c1ef,#a9c1ef);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-weight: 750;
  cursor: pointer;
}
.calendar-range-controls > [data-action="calendar-today"] .icon { width: 18px; height: 18px; flex: 0 0 18px; }
.calendar-range-controls > [data-action="calendar-today"]:hover { background: var(--palette-e0eaff,#e0eaff); }
.calendar-range-controls > [data-action="calendar-today"]:active { transform: translateY(1px); }
@media(max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-stage .calendar-range-controls > [data-action="calendar-today"] { min-height: 44px; font-size: 12px; }
}

/* Keep mobile screen titles on one consistent header line. */
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-document { padding-top: 12px; }
  .screen-deck > .page-heading,
  .screen-document-content > .page-heading {
    min-height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }
  .screen-deck > .page-heading h1,
  .screen-document-content > .page-heading h1 {
    margin: 0;
    font-size: 23px;
    line-height: 1.1;
  }
  .screen-deck > .page-heading :is(.eyebrow,p),
  .screen-document-content > .page-heading :is(.eyebrow,p) { display: none; }
}

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  .screen-document-content > .page-heading { margin-bottom: 10px; }
  .screen-document-content > div:empty { display: none; }
  .screen-document-content > .page-heading + * { margin-top: 0; }
  .screen-deck { row-gap: 10px; }
  .screen-deck > .screen-stage > :first-child { margin-top: 0; }
}
