/* Desktop compositions. Mobile rules remain owned by each screen stylesheet. */
@media (min-width: 1024px) {
  html[data-screen] body .main { max-width:none; padding:32px clamp(24px,3vw,56px) 100px; }
  .main > .page-heading { margin-bottom:24px; }
  .main .page-heading h1 { font-size:30px; }
  .main > .demo-note { margin-top:32px; }
  .main :is(.personal-home-selected,.students-follow-selected,.schedule-selected,.home-selected,.ws-page,.exercise-selected,.nutrition-selected,.profile-selected,.professional-selected,.payments-selected,.appointment-focus,.at-page,.scv) { max-width:none; width:100%; }

  /* Personal dashboard: next appointment and daily agenda side by side. */
  .personal-home-selected { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(0,1.4fr); gap:24px; align-items:start; }
  .personal-home-selected .ph-hero { padding:0; background:transparent; }
  .personal-home-selected .ph-hero>header { padding:0 0 22px; min-height:88px; }
  .ph-avatar { width:48px; height:48px; }
  .ph-hero header>div>span { font-size:14px; }
  .ph-hero header strong { font-size:23px; }
  .ph-hero time b { font-size:26px; }
  .ph-hero-body { padding:26px; border-radius:18px; }
  .ph-hero-body .ph-next { max-width:100%; }
  .ph-next>strong { font-size:48px; letter-spacing:-2px; }
  .ph-next h2 { font-size:25px; }
  .ph-next p { font-size:14px; }
  .ph-kicker { font-size:10px; letter-spacing:1.7px; }
  .personal-home-selected .ph-primary { font-size:13px; min-height:44px; padding:12px 18px; margin-top:24px; }
  .personal-home-selected .ph-sheet { border:1px solid var(--line); border-radius:18px; padding:24px; }
  .ph-sheet>header h2 { font-size:22px; }
  .ph-person h3 { font-size:16px; }
  .ph-person p { font-size:13px; }
  .ph-time strong { font-size:19px; }
  .ph-event { padding:18px 0; gap:16px; }
  .ph-actions a,.ph-assistant { font-size:13px; }

  /* Student roster: summary rail and a full-width searchable roster. */
  .students-follow-selected { grid-template-columns:minmax(260px,.7fr) minmax(0,1.6fr); gap:20px 28px; align-items:start; }
  .students-follow-selected .sf-summary { grid-column:1; grid-row:1; min-height:160px; }
  .students-follow-selected .sf-tabs { grid-column:2; grid-row:1; align-self:start; }
  .students-follow-selected .sf-section { grid-column:1; grid-row:2; }
  .students-follow-selected .sf-section:last-child { grid-column:2; grid-row:1 / span 3; margin-top:86px; }
  html[data-screen=students]:has(.students-follow-selected) .page-heading { display:flex; align-items:center; }
  .students-follow-selected .sf-summary-art { width:42%; }

  /* Agenda: compact events arranged across the available workspace. */
  .schedule-selected { gap:22px; }
  .st-next { padding:18px 22px; border-radius:16px; }
  .st-next strong { font-size:22px; }
  .st-next small { font-size:10px; }
  .st-next i { width:36px; height:36px; }
  .st-events { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .st-event { grid-template-columns:56px minmax(0,1fr); gap:12px; padding-left:6px; }
  .st-date { padding:12px 4px; border-radius:12px; }
  .st-date strong { font-size:27px; }
  .st-date span { font-size:11px; }
  .st-card { padding:20px; border-radius:16px; }
  .st-card h3 { font-size:18px; }
  .st-card header { margin-bottom:14px; flex-wrap:wrap; }
  .st-status { font-size:10px; padding:5px 9px; }
  .st-info { margin-top:12px; gap:10px; }
  .st-info strong,.st-card footer a { font-size:13px; }
  .st-info p { font-size:12px; }
  .st-card footer { margin-top:16px; padding-top:10px; }
  .st-assistant { padding:18px 22px; }
  .st-assistant strong { font-size:16px; }
  .st-assistant small { font-size:13px; }

  /* Student dashboard. */
  .home-selected { grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr); align-items:start; gap:22px; }
  .hs-week { grid-column:2; grid-row:1; }
  .hs-training { grid-column:1; grid-row:1 / span 3; }
  .hs-appointment,.hs-coach { grid-column:2; }
  .hs-shortcuts { grid-column:1 / -1; }
  .hs-demo { grid-column:1 / -1; }
  .hs-training h2 { font-size:25px; }
  .hs-training-head p,.hs-training-head .hs-plan { font-size:14px; }
  .hs-stats b { font-size:21px; }
  .hs-stats small { font-size:12px; }
  .hs-start { font-size:14px; min-height:46px; }
  .hs-horizontal { padding:18px; gap:12px; }
  .hs-horizontal h2 { font-size:16px; }
  .hs-horizontal p { font-size:12px; }

  /* Workout overview and exercise player. */
  .ws-page { grid-template-columns:minmax(280px,.7fr) minmax(0,1.5fr); align-items:start; gap:24px; }
  .ws-overview { grid-column:1; grid-row:1; padding:24px; }
  .ws-sequence { grid-column:2; grid-row:1 / span 3; }
  .ws-coach,.ws-note { grid-column:1; }
  .ws-facts { gap:8px; }
  .ws-facts>div { padding:0 7px; flex-wrap:wrap; }
  .ws-facts b { font-size:24px; }
  .ws-facts small { font-size:11px; margin:0; }
  .ws-exercise { grid-template-columns:64px 24px minmax(0,1fr) 60px 14px; gap:10px; min-height:78px; }
  .ws-thumb { width:64px; height:58px; }
  .ws-exercise-copy strong { font-size:14px; }
  .ws-exercise-copy small { font-size:11px; }
  .ws-index { width:24px; height:24px; font-size:12px; }
  .exercise-selected { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr); align-items:start; gap:20px 28px; }
  .xs-heading { grid-column:1 / -1; }
  .xs-media { grid-column:1; grid-row:2 / span 2; }
  .xs-stats,.xs-instructions,.xs-ai { grid-column:2; }
  .xs-register { grid-column:1; grid-row:4; align-self:start; }
  .xs-back,.xs-note { grid-column:1 / -1; }

  /* Profile pages become an identity column and details column. */
  .profile-selected,.professional-selected,.payments-selected { display:grid; grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr); gap:24px; align-items:start; }
  .ps-identity,.pd-identity { border-radius:18px; padding:28px; }
  .ps-person,.pd-identity { flex-wrap:wrap; gap:18px; }
  .ps-person>.avatar,.ps-photo,.pd-identity>img { width:88px; height:88px; }
  .ps-person h1,.pd-identity h1 { font-size:27px; }
  .ps-person p,.pd-city,.ps-intro { font-size:13px; }
  .ps-sheet,.pd-sheet { margin:0; border:1px solid var(--line); border-radius:18px; padding:26px; }
  .ps-sheet h2,.pd-sheet h2 { font-size:23px; }
  .pd-bio { font-size:14px; }
  .pd-specialties strong,.pd-services strong { font-size:15px; }
  .pd-specialties p,.pd-services p { font-size:12px; }
  body:has(.payments-selected) { background:var(--bg); }
  body:has(.payments-selected) .main { background:var(--bg); padding:32px clamp(24px,3vw,56px) 100px; }
  .pay-top { border-radius:18px; padding:24px; }
  .pay-top h1 { font-size:28px; }
  .pay-summary { grid-template-columns:1fr; padding:18px; }
  .pay-last { padding:16px 0 0; border-left:0; border-top:1px solid #96c6e137; }
  .pay-summary .pay-amount { font-size:34px; }
  .pay-last>strong { font-size:26px; }
  .pay-sheet { border:1px solid var(--line); border-radius:18px; padding:0 24px 24px; }
  .pay-help-action { white-space:normal; }

  /* Forms use two columns rather than a tall phone sheet. */
  .scv-form { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px; }
  .scv-form>.scv-submit,.scv-form>.scv-back,.scv-form>.small { grid-column:1 / -1; }
  .scv-submit { max-width:340px; justify-self:end; }
  .scv-hero { padding:22px 28px; }
  html[data-screen=workout-create] .builder-sport-hero { min-height:250px; padding:24px 30px; border-radius:20px; }
  html[data-screen=workout-create] .builder-sport-copy h1 { font-size:38px; }
  html[data-screen=workout-create] .builder-option-layout { margin-top:24px; }
  html[data-screen=workout-create] .builder-sport-copy { margin-top:22px; }
  html[data-screen=workout-create] .builder-student-summary { position:relative; inset:auto; margin-top:20px; padding:0; }
  html[data-screen=workout-create] .builder-option-card { max-width:none; width:100%; }
  html[data-screen=workout-create] .builder-setup { display:grid; grid-template-columns:1fr 1.4fr; gap:22px; align-items:end; }
  html[data-screen=workout-create] .builder-setup>.form-grid { grid-template-columns:1fr; }
  html[data-screen=workout-create] .builder-setup>.form-grid>.field { width:100%; max-width:none; grid-column:1 / -1; }
  html[data-screen=workout-create] #builder-exercises { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  html[data-screen=workout-create] #builder-exercises>.exercise-row { margin:0; min-width:0; }

  .nutrition-selected { grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr); align-items:start; gap:20px 26px; }
  .ns-intro { grid-column:1 / -1; }
  .ns-hydration { grid-column:1; grid-row:2 / span 2; padding:24px; }
  .ns-tabs { grid-column:2; grid-row:2; }
  #ns-meals-panel,#ns-water-log { grid-column:2; grid-row:3 / span 2; }
  .ns-guidance { grid-column:1; }
  .ns-preview { grid-column:1 / -1; }
  .ns-water-content { grid-template-columns:100px minmax(0,1fr); gap:16px; }
  .ns-ring { width:100px; }
  .ns-amount>strong { font-size:29px; }
  .ns-amount>strong span { font-size:20px; }
  .ns-amount>span,.ns-amount p { font-size:12px; }
  .ns-water-content>.ns-water-action { grid-column:1 / -1; }
  .ns-meal { padding:16px; }
  .ns-meal-body { flex-wrap:wrap; }
  .ns-meal-body p { font-size:12px; }
  .ns-guidance h2 { font-size:21px; }
  .ns-guidance>p:not(.ns-eyebrow) { font-size:13px; }
  .feedback-diary { max-width:none; display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px 28px; align-items:start; }
  .fd-week { grid-column:1; grid-row:1; padding:18px 10px; background:#f3f8fc; border-radius:16px; }
  .fd-date { grid-column:1; grid-row:2; margin:0; }
  .fd-timeline { grid-column:2; grid-row:1 / span 3; padding:24px 22px 4px; }
  .fd-demo { grid-column:1 / -1; }
  .appointment-focus { grid-template-columns:1fr 1fr; align-items:start; gap:24px; }
  .af-identity { grid-column:1; }
  .af-time { grid-column:1; }
  .af-notes { grid-column:2; grid-row:1 / span 2; padding:0 24px; background:white; border:1px solid var(--line); border-radius:18px; }
  .af-actions { grid-column:1; }
  .appointment-essential { max-width:1100px; }
  .appointment-essential .appointment-main-time>strong { font-size:36px; }
  .appointment-essential .actions { flex-direction:row; flex-wrap:wrap; }
  .appointment-essential .actions>.btn { width:auto; min-width:180px; }
  body:has(.nutrition-selected) .main>.page-heading { display:none; }
  .journey { max-width:none; grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr); align-items:start; gap:24px; }
  .journey-hero { grid-column:1; padding:24px; }
  .journey-hero h2 { font-size:28px; }
  .journey-hero>div>p:last-child { font-size:14px; }
  .journey-consistency strong { font-size:32px; }
  .journey-week { grid-column:2; }
  .journey-panel { padding:22px; }
  .journey-indicator { grid-template-columns:36px minmax(0,1fr) auto 18px; gap:12px; }
  .journey-indicator strong { font-size:16px; }
  .journey-indicator small { font-size:11px; }
  .journey-symbol { width:36px; height:36px; }
  .journey-spark { grid-column:2 / span 2; width:100%; max-width:180px; justify-self:end; }
  .journey-assistant,.journey>.small { grid-column:1 / -1; }
  .evaluation-visual { max-width:none; }
  #ev-compare { grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr); gap:24px; align-items:start; }
  .ev-dates { grid-column:1 / -1; }
  .ev-metrics { grid-template-columns:1fr; gap:12px; }
  .ev-metrics article { padding:16px 20px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:6px; }
  .ev-metrics strong { font-size:28px; margin:0; grid-column:2; grid-row:1 / span 2; }
  .ev-comparison { grid-column:2; grid-row:2; }
  .ev-tabs { max-width:500px; }
}
@media (min-width:1280px) {
  .journey-indicator { grid-template-columns:36px minmax(0,1fr) auto 90px 16px; }
  .journey-spark { grid-column:auto; width:90px; }
  .journey-indicator h3 { font-size:15px; }
  .journey-indicator p { font-size:12px; }
}
@media (min-width:1600px) {
  .st-events { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
