/* =========================================================
   NEXT Athlete OS · RC77 System Layer
   Purpose:
   - One visible source of truth for shared UI.
   - Legacy app.css remains for feature-specific internals only.
   - Shell/topbar/cards/chips/buttons/modals are governed here.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root{
  --next-bg:#020814;
  --next-bg-2:#061426;
  --next-bg-3:#020711;
  --next-surface:rgba(8,22,40,.86);
  --next-surface-2:rgba(4,13,26,.82);
  --next-surface-hard:rgba(4,10,22,.94);
  --next-card-border:rgba(105,220,255,.24);
  --next-card-border-strong:rgba(112,235,255,.50);
  --next-accent:#6eeaff;
  --next-accent-2:#58b9ff;
  --next-accent-soft:rgba(104,234,255,.18);
  --next-text:#f8fbff;
  --next-muted:rgba(220,232,246,.72);
  --next-muted-2:rgba(220,232,246,.56);
  --next-danger:#ff6868;
  --next-radius-nav:28px;
  --next-radius-card:28px;
  --next-radius-card-sm:20px;
  --next-radius-chip:999px;
  --next-page-max:1180px;
  --next-content-max:1040px;
  --next-page-pad-x:clamp(14px,3vw,30px);
  --next-page-pad-y:clamp(12px,2.6vw,24px);
  --next-section-gap:clamp(12px,2.2vw,22px);
  --next-card-pad:clamp(16px,2.4vw,26px);
  --next-chip-h:34px;
  --next-btn-h:52px;
  --next-shadow-card:0 18px 54px rgba(0,0,0,.28);
  --next-glow:0 0 36px rgba(0,210,255,.11);
}
body[data-next-theme="ice-hockey"]{
  --next-bg:#020814; --next-bg-2:#051a30; --next-surface:rgba(7,24,43,.88);
  --next-accent:#8af5ff; --next-accent-2:#65c9ff; --next-card-border:rgba(139,245,255,.26);
  --next-accent-soft:rgba(139,245,255,.19);
}
body[data-next-theme="downhill-night"]{
  --next-bg:#020912; --next-bg-2:#071920; --next-surface:rgba(7,24,32,.88);
  --next-accent:#71f0c4; --next-accent-2:#55b8ff; --next-card-border:rgba(113,240,196,.25);
  --next-accent-soft:rgba(113,240,196,.16);
}
body[data-next-theme="energy-purple"]{
  --next-bg:#070716; --next-bg-2:#111432; --next-surface:rgba(17,18,47,.88);
  --next-accent:#b98cff; --next-accent-2:#52dfff; --next-card-border:rgba(185,140,255,.26);
  --next-accent-soft:rgba(185,140,255,.18);
}
body[data-next-theme="clean-dark"]{
  --next-bg:#02060d; --next-bg-2:#07101d; --next-surface:rgba(8,18,32,.92);
  --next-surface-2:rgba(3,9,18,.88); --next-accent:#74e7ff; --next-accent-2:#7fb6ff;
  --next-card-border:rgba(130,210,255,.19); --next-accent-soft:rgba(116,231,255,.11);
  --next-glow:0 0 22px rgba(0,170,255,.07);
}

/* ---------- App reset / screen ownership ---------- */
html,body,.wrap,.screen{max-width:100%!important;overflow-x:clip!important;}
@supports not (overflow:clip){html,body,.wrap,.screen{overflow-x:hidden!important;}}

body:not(.exercise-active){
  background:
    radial-gradient(800px 520px at 86% 6%,var(--next-accent-soft),transparent 62%),
    linear-gradient(180deg,var(--next-bg),var(--next-bg-2) 58%,var(--next-bg-3))!important;
  color:var(--next-text)!important;
}

/* Screen visibility is one source of truth. */
body:not(.exercise-active) .screen:not(.active){display:none!important;visibility:hidden!important;pointer-events:none!important;}
body:not(.exercise-active) .screen.active{display:block!important;visibility:visible!important;pointer-events:auto!important;}
body[data-screen]:not([data-screen="startScreen"]):not(.exercise-active) #startScreen{display:none!important;}
body[data-screen="startScreen"]:not(.exercise-active) #startScreen.active{display:block!important;}
body:not([data-screen="startScreen"]):not(.exercise-active) > .dashboard-viewport-bg-img{display:none!important;opacity:0!important;}
body[data-screen="startScreen"]:not(.exercise-active) > .dashboard-viewport-bg-img{
  display:block!important;
  position:fixed!important;
  inset:0!important;
  z-index:0!important;
  width:100vw!important;
  height:100dvh!important;
  object-fit:cover!important;
  object-position:center right!important;
  opacity:.34!important;
  filter:saturate(1.12) brightness(1.06) contrast(1.05)!important;
  pointer-events:none!important;
}
.screen:not(#startScreen) > .dashboard-global-bg-img:not(.profile-screen-bg):not(.calendar-screen-bg):not(.program-screen-bg){display:none!important;opacity:0!important;}

body:not(.exercise-active) .wrap{
  width:min(100%,var(--next-page-max))!important;
  margin-inline:auto!important;
  padding:calc(env(safe-area-inset-top,0px) + var(--next-page-pad-y)) var(--next-page-pad-x) calc(104px + env(safe-area-inset-bottom,0px))!important;
}

/* ---------- Shared topbar: only .app-topbar owns geometry ---------- */
body:not(.exercise-active) .app-topbar{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  display:grid!important;
  grid-template-columns:64px minmax(0,1fr) 64px!important;
  align-items:center!important;
  justify-items:center!important;
  gap:12px!important;
  width:min(100%,var(--next-content-max))!important;
  max-width:min(100%,var(--next-content-max))!important;
  min-height:78px!important;
  margin:0 auto var(--next-section-gap)!important;
  padding:10px 16px!important;
  border-radius:var(--next-radius-nav)!important;
  border:1px solid var(--next-card-border)!important;
  background:linear-gradient(180deg,rgba(7,17,31,.94),var(--next-surface-hard))!important;
  box-shadow:var(--next-shadow-card),var(--next-glow),inset 0 1px 0 rgba(255,255,255,.04)!important;
  -webkit-backdrop-filter:blur(18px) saturate(126%)!important;
  backdrop-filter:blur(18px) saturate(126%)!important;
  z-index:90!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
body:not(.exercise-active) .app-location,
body:not(.exercise-active) .app-primary-action{display:none!important;}

body:not(.exercise-active) .app-nav-toggle{
  grid-column:1!important;
  justify-self:start!important;
  display:grid!important;
  place-items:center!important;
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--next-accent)!important;
  font-size:0!important;
}
body:not(.exercise-active) .app-nav-toggle .nav-label{display:none!important;}
body:not(.exercise-active) .app-nav-toggle .nav-burger{
  width:30px!important;
  height:22px!important;
  display:grid!important;
  align-content:center!important;
  justify-items:start!important;
  gap:5px!important;
  transform:none!important;
}
body:not(.exercise-active) .app-nav-toggle .nav-burger>span{
  display:block!important;
  height:3px!important;
  border-radius:999px!important;
  background:linear-gradient(90deg,#bff6ff 0%,var(--next-accent) 55%,#4dcfff 100%)!important;
  box-shadow:0 0 12px rgba(76,213,255,.18)!important;
}
body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(1),
body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(3){width:30px!important;}
body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(2){width:21px!important;}

body:not(.exercise-active) .app-brand{
  grid-column:2!important;
  display:grid!important;
  place-items:center!important;
  min-width:0!important;
  width:100%!important;
  pointer-events:none!important;
}
body:not(.exercise-active) .app-brand .brand-fallback{display:none!important;}
body:not(.exercise-active) .app-brand-logo{
  display:block!important;
  width:clamp(176px,23vw,244px)!important;
  max-width:100%!important;
  height:auto!important;
  max-height:58px!important;
  object-fit:contain!important;
  transform:none!important;
  filter:drop-shadow(0 0 18px rgba(72,215,255,.13))!important;
}

body:not(.exercise-active) .app-profile-toggle{
  grid-column:3!important;
  justify-self:end!important;
  display:grid!important;
  place-items:center!important;
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  min-height:56px!important;
  padding:0!important;
  border-radius:999px!important;
  border:1px solid rgba(116,224,255,.34)!important;
  color:var(--next-accent)!important;
  background:rgba(6,20,38,.36)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 0 20px rgba(0,185,255,.08)!important;
}
body:not(.exercise-active) .app-profile-toggle svg{
  width:58%!important;
  height:58%!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.75!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body:not(.exercise-active) .app-tabs{
  display:none!important;
  position:absolute!important;
  top:calc(100% + 10px)!important;
  left:0!important;
  right:0!important;
  width:auto!important;
  max-width:none!important;
  padding:10px!important;
  border-radius:22px!important;
  border:1px solid var(--next-card-border)!important;
  background:rgba(4,10,20,.96)!important;
  box-shadow:var(--next-shadow-card)!important;
  gap:8px!important;
  z-index:100!important;
}
body:not(.exercise-active) .app-topbar.nav-open .app-tabs{display:grid!important;}
body:not(.exercise-active) .app-tab{
  min-height:56px!important;
  border-radius:16px!important;
  border:1px solid rgba(116,231,255,.18)!important;
  background:rgba(6,18,34,.58)!important;
  color:var(--next-text)!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  align-items:center!important;
  gap:10px!important;
  padding:10px 12px!important;
  text-align:left!important;
  font-weight:900!important;
}

/* ---------- Page shell moved to RC74 canonical .next-shell ownership ---------- */

/* ---------- Component styling moved to RC71 canonical owners ----------
   Cards, chips and buttons are now styled by .next-card, .next-chip
   and .next-button in the RC71 block below. Legacy selectors are kept
   as feature hooks in markup only, not as system owners here.
*/
/* ---------- Modals / sheets ---------- */
body:not(.exercise-active) :is(.program59-modal,.modal,.program59-modal-backdrop .program59-modal){
  border-color:var(--next-card-border)!important;
  border-radius:var(--next-radius-card)!important;
  background:linear-gradient(180deg,var(--next-surface),rgba(3,9,18,.96))!important;
}

/* ---------- Profile theme controls ---------- */
body:not(.exercise-active) .profile-settings-list button small{
  color:var(--next-muted)!important;
  margin-left:auto!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
body:not(.exercise-active) .profile-select-grid.theme{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
body:not(.exercise-active) .profile-select-grid.theme .profile-select-option{
  align-items:flex-start!important;
  justify-content:flex-start!important;
  min-height:72px!important;
  border-radius:18px!important;
  flex-direction:column!important;
  gap:5px!important;
}

/* ---------- Responsive geometry ---------- */
@media(max-width:760px){
  body:not(.exercise-active) .wrap{
    padding-top:calc(env(safe-area-inset-top,0px) + 10px)!important;
  }
  body:not(.exercise-active) .app-topbar{
    grid-template-columns:54px minmax(0,1fr) 54px!important;
    min-height:70px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 auto 14px!important;
    padding:8px 12px!important;
    border-radius:24px!important;
  }
  body:not(.exercise-active) .app-nav-toggle{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
  }
  body:not(.exercise-active) .app-nav-toggle .nav-burger{
    width:28px!important;
    height:20px!important;
    gap:5px!important;
  }
  body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(1),
  body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(3){width:28px!important;}
  body:not(.exercise-active) .app-nav-toggle .nav-burger>span:nth-child(2){width:20px!important;}
  body:not(.exercise-active) .app-brand-logo{width:176px!important;max-height:44px!important;}
  body:not(.exercise-active) .app-profile-toggle{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
  }
}
@media(max-width:380px){
  body:not(.exercise-active) .app-topbar{
    grid-template-columns:48px minmax(0,1fr) 48px!important;
    padding-inline:10px!important;
  }
  body:not(.exercise-active) .app-brand-logo{width:156px!important;}
  body:not(.exercise-active) .app-profile-toggle,
  body:not(.exercise-active) .app-nav-toggle{
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
  }
}


/* =========================================================
   RC70 · Continued ownership cleanup
   - App.css topbar selectors have been removed; this file is the
     only topbar owner.
   - Screen background images are real page backgrounds, not layout
     images.
   - Page shell remains owned by next-system.css.
   ========================================================= */

/* Background media ownership */
body:not(.exercise-active) .screen{
  position:relative !important;
  isolation:isolate !important;
  min-height:100svh !important;
}

body:not(.exercise-active) :is(#profileScreen > .profile-screen-bg,#calendarScreen > .calendar-screen-bg,#programScreen > .program-screen-bg){
  display:none !important;
  position:fixed !important;
  inset:0 !important;
  z-index:0 !important;
  width:100vw !important;
  height:100dvh !important;
  min-height:100vh !important;
  object-fit:cover !important;
  pointer-events:none !important;
  user-select:none !important;
}

body[data-screen="profileScreen"]:not(.exercise-active) #profileScreen > .profile-screen-bg,
body[data-screen="calendarScreen"]:not(.exercise-active) #calendarScreen > .calendar-screen-bg,
body[data-screen="programScreen"]:not(.exercise-active) #programScreen > .program-screen-bg{
  display:block !important;
}

body[data-screen="profileScreen"]:not(.exercise-active) #profileScreen > .profile-screen-bg{
  opacity:.26 !important;
  object-position:center center !important;
  filter:saturate(1.05) brightness(.78) contrast(1.08) !important;
}

body[data-screen="calendarScreen"]:not(.exercise-active) #calendarScreen > .calendar-screen-bg{
  opacity:.46 !important;
  object-position:68% center !important;
  filter:saturate(1.02) brightness(.72) contrast(1.08) !important;
}

body[data-screen="programScreen"]:not(.exercise-active) #programScreen > .program-screen-bg{
  opacity:.22 !important;
  object-position:center right !important;
  filter:saturate(1.08) brightness(.80) contrast(1.05) !important;
}

/* Active page content layering moved to RC74 .next-shell ownership. */

/* One final topbar contract: no screen- or RC-class may alter geometry. */
body:not(.exercise-active) .app-topbar{
  position:relative !important;
  display:grid !important;
  grid-template-columns:64px minmax(0,1fr) 64px !important;
  align-items:center !important;
  justify-items:center !important;
  width:min(100%,var(--next-content-max)) !important;
  min-height:78px !important;
  margin:0 auto var(--next-section-gap) !important;
  padding:10px 16px !important;
  transform:none !important;
}
@media(max-width:760px){
  body:not(.exercise-active) .app-topbar{
    grid-template-columns:54px minmax(0,1fr) 54px !important;
    min-height:70px !important;
    margin:0 auto 14px !important;
    padding:8px 12px !important;
  }
}

/* Legacy iPhone scrim from app.css must not sit as an independent shell layer. */
body:not(.exercise-active)::before,
body:not(.exercise-active)::after{
  pointer-events:none !important;
}


/* =========================================================
   RC71 · Component ownership cleanup
   Purpose: cards/chips/buttons now have canonical next-* classes
   in markup. Legacy classes may remain as feature hooks, but visual
   component styling must resolve through these owners.
   ========================================================= */

/* ---------- Canonical page shell now owned by RC74 .next-shell only ---------- */

/* ---------- Canonical card owner ---------- */
body:not(.exercise-active) .next-card{
  border:1px solid var(--next-card-border) !important;
  border-radius:var(--next-radius-card) !important;
  background:
    radial-gradient(680px 260px at 88% 8%,var(--next-accent-soft),transparent 58%),
    linear-gradient(180deg,var(--next-surface),var(--next-surface-2)) !important;
  box-shadow:var(--next-shadow-card),var(--next-glow),inset 0 1px 0 rgba(255,255,255,.04) !important;
  color:var(--next-text) !important;
}
body:not(.exercise-active) .next-card.next-card-compact{border-radius:var(--next-radius-card-sm) !important;}

/* ---------- Canonical chip owner ---------- */
body:not(.exercise-active) .next-chip{
  min-height:var(--next-chip-h) !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  border-radius:var(--next-radius-chip) !important;
  border:1px solid rgba(116,231,255,.24) !important;
  background:rgba(6,18,34,.58) !important;
  color:var(--next-text) !important;
  font-weight:850 !important;
  line-height:1.05 !important;
}
body:not(.exercise-active) .next-chip-equipment{border-color:rgba(120,224,255,.26) !important;}

/* ---------- Canonical button owner ---------- */
body:not(.exercise-active) .next-button{
  min-height:var(--next-btn-h) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  border-radius:18px !important;
  border:1px solid rgba(116,231,255,.26) !important;
  background:linear-gradient(180deg,rgba(255,255,255,.060),rgba(255,255,255,.028)) !important;
  color:var(--next-text) !important;
  font-weight:900 !important;
  text-decoration:none !important;
}
body:not(.exercise-active) .next-button-primary,
body:not(.exercise-active) .next-button.primary{
  border-color:var(--next-accent) !important;
  background:linear-gradient(180deg,var(--next-accent-2),#48a9ff) !important;
  color:#03101e !important;
  box-shadow:0 16px 40px rgba(110,234,255,.18) !important;
}
body:not(.exercise-active) .next-button-secondary{
  background:rgba(6,18,34,.58) !important;
  color:var(--next-text) !important;
}
body:not(.exercise-active) .next-button-danger{
  border-color:rgba(255,104,104,.35) !important;
  color:#ffd6d6 !important;
}

/* ---------- Canonical section/title owner ---------- */
body:not(.exercise-active) .next-section-title{
  color:var(--next-accent) !important;
  text-transform:uppercase !important;
  letter-spacing:.22em !important;
  font-size:clamp(12px,2.7vw,15px) !important;
  font-weight:950 !important;
}

@media(max-width:760px){
  body:not(.exercise-active) .next-button{min-height:48px !important;}
  body:not(.exercise-active) .next-chip{min-height:32px !important;}
}


/* =========================================================
   RC72 · Program/Profile internals migration
   Program and Profile now carry canonical next-* classes in markup.
   Legacy program57/profile-next/profile-rebuild classes remain as JS/layout
   hooks only; visible component styling should resolve through this section.
   ========================================================= */

body:not(.exercise-active) .next-page-stack{
  width:min(100%,var(--next-content-max)) !important;
  margin-inline:auto !important;
  display:grid !important;
  gap:var(--next-section-gap) !important;
}
body:not(.exercise-active) .next-page-head{
  display:grid !important;
  gap:6px !important;
  color:var(--next-text) !important;
}
body:not(.exercise-active) .next-page-head h1{
  margin:0 !important;
  font-size:clamp(44px,10vw,76px) !important;
  line-height:.88 !important;
  letter-spacing:-.06em !important;
  font-weight:950 !important;
}
body:not(.exercise-active) .next-page-head p{
  margin:0 !important;
  color:var(--next-muted) !important;
  font-size:clamp(16px,3.9vw,22px) !important;
  line-height:1.35 !important;
  max-width:48ch !important;
}
body:not(.exercise-active) .next-card-content{
  min-width:0 !important;
  display:grid !important;
  gap:clamp(8px,1.8vw,13px) !important;
}
body:not(.exercise-active) .next-card-head{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:12px !important;
}
body:not(.exercise-active) .next-card-head button,
body:not(.exercise-active) .profile-summary-head button{
  border:0 !important;
  background:transparent !important;
  color:var(--next-accent) !important;
  font-weight:950 !important;
  padding:6px 0 !important;
}
body:not(.exercise-active) .next-card-title,
body:not(.exercise-active) .next-card h2,
body:not(.exercise-active) .next-card h3{
  color:var(--next-text) !important;
  font-weight:950 !important;
  letter-spacing:-.045em !important;
  line-height:.98 !important;
}
body:not(.exercise-active) .next-card-subtitle{
  margin:0 !important;
  color:var(--next-accent) !important;
  font-weight:900 !important;
}
body:not(.exercise-active) .next-card-description{
  margin:0 !important;
  color:var(--next-muted) !important;
  line-height:1.35 !important;
  font-weight:650 !important;
}
body:not(.exercise-active) .next-chip-row{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
}
body:not(.exercise-active) .next-action-row{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  align-items:center !important;
}
body:not(.exercise-active) .next-action-column{grid-template-columns:1fr !important;}
body:not(.exercise-active) .next-action-grid{grid-template-columns:1fr 1fr !important;}
body:not(.exercise-active) .next-list-rows{
  display:grid !important;
  border:1px solid rgba(105,220,255,.13) !important;
  border-radius:20px !important;
  overflow:hidden !important;
  background:rgba(3,12,24,.34) !important;
}
body:not(.exercise-active) .next-list-row,
body:not(.exercise-active) .next-list-rows > button{
  width:100% !important;
  min-height:56px !important;
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  justify-content:stretch !important;
  text-align:left !important;
  border:0 !important;
  border-radius:0 !important;
  border-top:1px solid rgba(105,220,255,.09) !important;
  background:rgba(6,18,34,.30) !important;
  padding:12px 14px !important;
  color:var(--next-text) !important;
}
body:not(.exercise-active) .next-list-rows > button:first-child{border-top:0 !important;}
body:not(.exercise-active) .next-list-row svg,
body:not(.exercise-active) .next-list-rows > button svg{
  width:22px !important;
  height:22px !important;
  color:var(--next-accent) !important;
}
body:not(.exercise-active) .next-list-row span,
body:not(.exercise-active) .next-list-rows > button span{
  min-width:0 !important;
}
body:not(.exercise-active) .next-list-row small,
body:not(.exercise-active) .next-list-rows > button small{
  color:var(--next-muted) !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}

/* Program canonical layout */
body:not(.exercise-active) .next-profile-strip{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  padding:12px 14px !important;
}
body:not(.exercise-active) .next-profile-strip strong{margin-right:6px !important;}
body:not(.exercise-active) .next-program-card{overflow:hidden !important;}
body:not(.exercise-active) .next-program-card .program57-card-content{padding:var(--next-card-pad) !important;}
body:not(.exercise-active) .next-program-card-featured .next-card-title{font-size:clamp(34px,8vw,56px) !important;}
body:not(.exercise-active) .next-program-card-list{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) minmax(150px,220px) !important;
  gap:14px !important;
  align-items:center !important;
  padding:14px !important;
}
body:not(.exercise-active) .next-program-card-list .program57-list-icon{
  width:48px !important;
  height:48px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:16px !important;
  border:1px solid rgba(116,231,255,.22) !important;
  color:var(--next-accent) !important;
  background:rgba(6,18,34,.50) !important;
}
body:not(.exercise-active) .next-card-kicker{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
body:not(.exercise-active) .program57-selected,
body:not(.exercise-active) .program57-best,
body:not(.exercise-active) .program58-started,
body:not(.exercise-active) .program58-done{
  display:inline-flex !important;
  min-height:28px !important;
  align-items:center !important;
  padding:5px 10px !important;
  border-radius:999px !important;
  border:1px solid rgba(116,231,255,.30) !important;
  color:var(--next-accent) !important;
  background:rgba(6,18,34,.58) !important;
  text-transform:uppercase !important;
  letter-spacing:.12em !important;
  font-size:11px !important;
  font-weight:950 !important;
}
body:not(.exercise-active) .program58-progress-mini i{
  display:block !important;
  width:100% !important;
  height:7px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:rgba(116,231,255,.12) !important;
}
body:not(.exercise-active) .program58-progress-mini b{
  display:block !important;
  height:100% !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,var(--next-accent),var(--next-accent-2)) !important;
}

/* Profile canonical layout */
body:not(.exercise-active) .next-profile-card{padding:var(--next-card-pad) !important;}
body:not(.exercise-active) .profile-active-card.next-profile-card{padding-bottom:0 !important;}
body:not(.exercise-active) .profile-active-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:16px !important;
  align-items:center !important;
}
body:not(.exercise-active) .profile-active-main h2{
  margin:0 !important;
  font-size:clamp(48px,11vw,74px) !important;
  line-height:.9 !important;
  letter-spacing:-.055em !important;
}
body:not(.exercise-active) .profile-active-main p{color:var(--next-muted) !important;}
body:not(.exercise-active) .profile-avatar-wrap{
  display:grid !important;
  place-items:center !important;
}
body:not(.exercise-active) .profile-avatar{
  width:clamp(86px,20vw,132px) !important;
  height:clamp(86px,20vw,132px) !important;
  display:grid !important;
  place-items:center !important;
  border-radius:999px !important;
  border:1px solid var(--next-card-border-strong) !important;
  color:var(--next-accent) !important;
  background:radial-gradient(circle at 50% 34%,var(--next-accent-soft),rgba(5,18,34,.52) 70%) !important;
}
body:not(.exercise-active) .profile-action-grid{
  border-top:1px solid rgba(105,220,255,.12) !important;
  margin:16px calc(-1 * var(--next-card-pad)) 0 !important;
  padding:14px var(--next-card-pad) !important;
}
body:not(.exercise-active) .next-summary-card .profile-rebuild-body{
  display:grid !important;
  gap:14px !important;
}
body:not(.exercise-active) .profile-rebuild-kicker{
  color:var(--next-muted-2) !important;
  font-weight:900 !important;
}
body:not(.exercise-active) .profile-rebuild-goal{
  color:var(--next-text) !important;
  font-size:clamp(28px,7vw,44px) !important;
  line-height:1 !important;
}

@media(max-width:760px){
  body:not(.exercise-active) .next-program-card-list{
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }
  body:not(.exercise-active) .next-program-card-list .program57-list-icon{display:none !important;}
  body:not(.exercise-active) .next-action-row,
  body:not(.exercise-active) .next-action-grid{
    grid-template-columns:1fr !important;
  }
  body:not(.exercise-active) .profile-active-grid{
    grid-template-columns:minmax(0,1fr) auto !important;
  }
}


/* =========================================================
   RC73 · Page Header Ownership
   One visual source of truth for page headers across Dashboard,
   Program, Profile, Calendar, Overview, Library and Test views.
   Legacy header classes may remain as semantic/layout hooks only.
   ========================================================= */
body:not(.exercise-active) .next-page-header,
body:not(.exercise-active) .overview-head.next-page-header,
body:not(.exercise-active) .program-library-head.next-page-header,
body:not(.exercise-active) .profile-next-head.next-page-header,
body:not(.exercise-active) .calendar-hero.next-page-header,
body:not(.exercise-active) .showcase-copy.next-page-header{
  display:grid !important;
  gap:clamp(6px,1.5vw,10px) !important;
  width:100% !important;
  max-width:var(--next-content-max) !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--next-text) !important;
  isolation:auto !important;
}
body:not(.exercise-active) .next-page-header-card,
body:not(.exercise-active) .calendar-hero.next-page-header-card,
body:not(.exercise-active) .overview-head.next-page-header-card{
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:end !important;
  column-gap:clamp(14px,3vw,28px) !important;
}
body:not(.exercise-active) .next-page-header h1,
body:not(.exercise-active) .next-page-header .next-page-title,
body:not(.exercise-active) .next-page-header .title,
body:not(.exercise-active) .program-library-head.next-page-header h1,
body:not(.exercise-active) .profile-next-head.next-page-header h1,
body:not(.exercise-active) .calendar-hero.next-page-header h1,
body:not(.exercise-active) .showcase-copy.next-page-header h1{
  margin:0 !important;
  color:var(--next-text) !important;
  font-size:clamp(44px,10vw,76px) !important;
  line-height:.88 !important;
  letter-spacing:-.06em !important;
  font-weight:950 !important;
  text-wrap:balance !important;
}
body:not(.exercise-active) .next-page-header p,
body:not(.exercise-active) .next-page-header .next-page-subtitle,
body:not(.exercise-active) .next-page-header .muted,
body:not(.exercise-active) .program-library-head.next-page-header p,
body:not(.exercise-active) .profile-next-head.next-page-header p,
body:not(.exercise-active) .calendar-hero.next-page-header p,
body:not(.exercise-active) .showcase-copy.next-page-header p{
  margin:0 !important;
  color:var(--next-muted) !important;
  font-size:clamp(16px,3.9vw,22px) !important;
  line-height:1.35 !important;
  max-width:52ch !important;
  font-weight:680 !important;
}
body:not(.exercise-active) .next-page-kicker,
body:not(.exercise-active) .next-page-header .meta,
body:not(.exercise-active) .next-page-header .showcase-eyebrow{
  margin:0 !important;
  color:var(--next-accent) !important;
  text-transform:uppercase !important;
  letter-spacing:.22em !important;
  font-size:clamp(11px,2.4vw,14px) !important;
  font-weight:950 !important;
}
body:not(.exercise-active) .next-page-header .page-actions,
body:not(.exercise-active) .next-page-header .nav-left{
  align-self:end !important;
  justify-self:end !important;
  display:flex !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
body:not(.exercise-active) .calendar-hero.next-page-header .calendar-hero-status{
  justify-self:end !important;
  align-self:end !important;
  max-width:min(420px,46vw) !important;
}
body:not(.exercise-active) .showcase-copy.next-page-header::before,
body:not(.exercise-active) .showcase-copy.next-page-header::after{
  display:none !important;
  content:none !important;
}
body:not(.exercise-active) .showcase-copy.next-page-header .showcase-signals{
  margin-top:clamp(8px,2vw,14px) !important;
}
@media(max-width:760px){
  body:not(.exercise-active) .next-page-header-card,
  body:not(.exercise-active) .calendar-hero.next-page-header-card,
  body:not(.exercise-active) .overview-head.next-page-header-card{
    grid-template-columns:1fr !important;
    align-items:start !important;
  }
  body:not(.exercise-active) .calendar-hero.next-page-header .calendar-hero-status,
  body:not(.exercise-active) .next-page-header .page-actions,
  body:not(.exercise-active) .next-page-header .nav-left{
    justify-self:stretch !important;
    max-width:none !important;
  }
}


/* =========================================================
   RC74 · Page Shell / Spacing Ownership
   One visible source of truth for page containers and vertical rhythm.
   Legacy shell classes remain in markup only as feature hooks.
   ========================================================= */
:root{
  --next-shell-gap:var(--next-section-gap);
  --next-shell-bottom:clamp(38px,5vw,72px);
  --next-page-header-gap:clamp(12px,2.4vw,22px);
}

body:not(.exercise-active) .next-screen{
  position:relative !important;
  isolation:isolate !important;
  min-height:100svh !important;
}

body:not(.exercise-active) .next-shell{
  width:min(100%,var(--next-content-max)) !important;
  margin-inline:auto !important;
  display:grid !important;
  gap:var(--next-shell-gap) !important;
  padding:0 0 var(--next-shell-bottom) !important;
  position:relative !important;
  z-index:1 !important;
  align-content:start !important;
}

body:not(.exercise-active) .screen.active.next-shell{
  display:grid !important;
}

body:not(.exercise-active) .next-page-stack{
  display:grid !important;
  gap:var(--next-shell-gap) !important;
  align-content:start !important;
}

body:not(.exercise-active) .next-page-body{
  display:grid !important;
  gap:var(--next-shell-gap) !important;
}

body:not(.exercise-active) .next-page-header{
  margin-bottom:0 !important;
}

body:not(.exercise-active) .next-page-header + :is(.next-card,.next-card-grid,.program-catalog,.calendar-dashboard,.developed-cards-grid,.overview-flow-grid){
  margin-top:0 !important;
}

/* Calendar/Program/Profile are shell-compatible through the `.next-shell` class only. */

/* Overview, QA and Test now use the same shell rhythm as Program/Profile/Calendar. */
body:not(.exercise-active) :is(#overviewScreen.next-shell,#qaScreen.next-shell,#testScreen.next-shell){
  width:min(100%,var(--next-content-max)) !important;
}

/* Dashboard is allowed richer internals, but its outer shell spacing is still centralized. */
body[data-screen="startScreen"]:not(.exercise-active) #startScreen.next-shell{
  width:min(100%,var(--next-content-max)) !important;
}

@media(max-width:760px){
  :root{--next-shell-gap:14px;--next-shell-bottom:64px;}
  body:not(.exercise-active) .next-shell{gap:var(--next-shell-gap) !important;}
}


/* =========================================================
   RC75 · Deep Main UI Ownership
   Main Dashboard / Program / Profile / Calendar / Overview now use the
   central system layer instead of old per-RC page blocks in app.css.
   app.css is reduced to base + active pass/exercise legacy only.
   ========================================================= */
:root{
  --next-grid-gap:clamp(10px,2vw,16px);
  --next-card-grid-gap:clamp(12px,2.4vw,18px);
  --next-section-title-size:clamp(12px,2.6vw,15px);
  --next-row-radius:18px;
}

/* ---------- canonical layout primitives ---------- */
body:not(.exercise-active) .next-card-grid{display:grid!important;gap:var(--next-card-grid-gap)!important;}
body:not(.exercise-active) .next-card-grid-featured{grid-template-columns:1fr!important;}
body:not(.exercise-active) .next-chip-row{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
body:not(.exercise-active) .next-action-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:center!important;}
body:not(.exercise-active) .next-action-column{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
body:not(.exercise-active) .next-card-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;}
body:not(.exercise-active) .next-card-kicker{color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.16em!important;font-size:11px!important;font-weight:950!important;}
body:not(.exercise-active) .next-card-description{color:var(--next-muted)!important;line-height:1.35!important;font-weight:680!important;}
body:not(.exercise-active) .next-list-rows{display:grid!important;border:1px solid rgba(105,220,255,.12)!important;border-radius:20px!important;overflow:hidden!important;background:rgba(2,10,20,.28)!important;}
body:not(.exercise-active) .next-list-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;justify-content:stretch!important;text-align:left!important;border-radius:0!important;border:0!important;border-top:1px solid rgba(105,220,255,.10)!important;background:rgba(5,17,31,.42)!important;min-height:58px!important;padding:13px 14px!important;color:var(--next-text)!important;}
body:not(.exercise-active) .next-list-row:first-child{border-top:0!important;}
body:not(.exercise-active) .next-list-row svg{width:23px!important;height:23px!important;stroke:var(--next-accent)!important;fill:none!important;}
body:not(.exercise-active) .next-list-row b{color:var(--next-muted)!important;font-size:24px!important;line-height:1!important;}

/* ---------- dashboard ownership ---------- */
body[data-screen="startScreen"]:not(.exercise-active) #startScreen.next-dashboard-shell{gap:clamp(18px,3vw,32px)!important;}
body:not(.exercise-active) #startScreen .dashboard-shortcuts-panel{display:none!important;}
body:not(.exercise-active) #startScreen .home-hero{position:relative!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:clamp(10px,2vw,18px) 0!important;overflow:visible!important;}
body:not(.exercise-active) #startScreen .home-hero>.dashboard-bg-img{display:none!important;}
body:not(.exercise-active) #startScreen .showcase-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(280px,0.9fr)!important;gap:clamp(18px,4vw,42px)!important;align-items:center!important;}
body:not(.exercise-active) #startScreen .showcase-copy{display:grid!important;gap:clamp(8px,1.8vw,14px)!important;}
body:not(.exercise-active) #startScreen .showcase-copy h1{margin:0!important;font-size:clamp(46px,7.5vw,92px)!important;line-height:.86!important;letter-spacing:-.07em!important;font-weight:950!important;}
body:not(.exercise-active) #startScreen .showcase-copy h1 span{color:var(--next-accent)!important;text-shadow:0 0 22px rgba(110,234,255,.16)!important;}
body:not(.exercise-active) #startScreen .showcase-intro{margin:0!important;color:var(--next-muted)!important;font-size:clamp(16px,2.4vw,22px)!important;line-height:1.25!important;font-weight:750!important;}
body:not(.exercise-active) #startScreen .showcase-signals{display:flex!important;gap:8px!important;flex-wrap:wrap!important;margin-top:6px!important;}
body:not(.exercise-active) #startScreen .signal-chip{min-height:30px!important;padding:7px 10px!important;}
body:not(.exercise-active) #startScreen .hero-dashboard-panel{border:0!important;background:transparent!important;box-shadow:none!important;}
body:not(.exercise-active) #startScreen .hero-dashboard-panel .panel-pad{padding:0!important;}
body:not(.exercise-active) #progressDashboard{display:grid!important;gap:12px!important;}
body:not(.exercise-active) .rc18-today-card{position:relative!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:14px!important;align-items:start!important;padding:clamp(18px,3vw,28px)!important;min-height:220px!important;overflow:hidden!important;}
body:not(.exercise-active) .rc18-pass-icon{width:50px!important;height:50px!important;border-radius:18px!important;display:grid!important;place-items:center!important;border:1px solid var(--next-card-border)!important;background:rgba(5,18,34,.50)!important;color:var(--next-accent)!important;}
body:not(.exercise-active) .rc18-pass-icon svg{width:26px!important;height:26px!important;stroke:currentColor!important;fill:none!important;}
body:not(.exercise-active) .rc18-kicker{color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.16em!important;font-size:11px!important;font-weight:950!important;}
body:not(.exercise-active) .rc18-today-copy{display:grid!important;gap:8px!important;min-width:0!important;}
body:not(.exercise-active) .rc18-today-copy h2{margin:0!important;font-size:clamp(30px,4.5vw,48px)!important;line-height:.95!important;letter-spacing:-.045em!important;}
body:not(.exercise-active) .rc18-today-meta{color:var(--next-muted)!important;font-weight:900!important;}
body:not(.exercise-active) .rc18-today-copy p{margin:0!important;color:var(--next-muted)!important;line-height:1.35!important;font-weight:650!important;}
body:not(.exercise-active) .rc18-today-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:8px!important;}
body:not(.exercise-active) .rc18-time-chip{position:absolute!important;right:18px!important;top:18px!important;display:inline-flex!important;align-items:center!important;gap:6px!important;min-height:30px!important;padding:6px 10px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.24)!important;background:rgba(4,14,28,.62)!important;color:var(--next-muted)!important;font-weight:850!important;font-size:12px!important;}
body:not(.exercise-active) .quickstats-panel{border:0!important;background:transparent!important;box-shadow:none!important;}
body:not(.exercise-active) .quickstats-panel .panel-pad{padding:0!important;}
body:not(.exercise-active) .quick-stats-grid{display:grid!important;gap:12px!important;}
body:not(.exercise-active) .rc18-progress-card{padding:clamp(18px,3vw,28px)!important;display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(220px,.9fr)!important;gap:clamp(16px,3vw,28px)!important;align-items:center!important;overflow:hidden!important;}
body:not(.exercise-active) .rc18-progress-main{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:16px!important;align-items:center!important;}
body:not(.exercise-active) .rc18-progress-copy h2{margin:0!important;font-size:clamp(36px,6vw,64px)!important;line-height:.92!important;letter-spacing:-.055em!important;}
body:not(.exercise-active) .rc18-progress-copy p{margin:4px 0 0!important;color:var(--next-muted)!important;font-weight:700!important;}
body:not(.exercise-active) .rc18-kpi-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
body:not(.exercise-active) .rc18-kpi-cell{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:10px!important;align-items:center!important;border:1px solid rgba(105,220,255,.16)!important;border-radius:18px!important;background:rgba(2,10,22,.38)!important;padding:10px!important;color:var(--next-text)!important;}
body:not(.exercise-active) .rc18-kpi-label{color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.14em!important;font-size:10px!important;font-weight:950!important;}
body:not(.exercise-active) .rc18-kpi-value{font-size:clamp(18px,3vw,28px)!important;font-weight:950!important;line-height:1!important;}
body:not(.exercise-active) .rc18-ring{display:grid!important;place-items:center!important;border-radius:999px!important;background:conic-gradient(var(--next-accent) calc(var(--p,0)*1%),rgba(40,78,112,.32) 0)!important;position:relative!important;}
body:not(.exercise-active) .rc18-ring::before{content:""!important;position:absolute!important;inset:9px!important;border-radius:999px!important;background:rgba(2,9,18,.94)!important;}
body:not(.exercise-active) .rc18-ring span{position:relative!important;z-index:1!important;font-weight:950!important;}
body:not(.exercise-active) .rc18-ring-xl{width:138px!important;height:138px!important;font-size:34px!important;}
body:not(.exercise-active) .rc18-ring-sm{width:60px!important;height:60px!important;font-size:16px!important;}
body:not(.exercise-active) .rc18-day-row{display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-top:10px!important;}
body:not(.exercise-active) .rc18-day-pill{min-height:25px!important;padding:4px 10px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.20)!important;background:rgba(4,15,30,.58)!important;color:var(--next-text)!important;font-weight:850!important;}

/* ---------- program ownership ---------- */
body:not(.exercise-active) .program57-library{display:grid!important;gap:var(--next-shell-gap)!important;}
body:not(.exercise-active) .next-profile-strip{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;padding:12px 14px!important;}
body:not(.exercise-active) .next-profile-strip strong{font-size:20px!important;font-weight:950!important;margin-right:auto!important;}
body:not(.exercise-active) .program57-profile-icon{width:42px!important;height:42px!important;border-radius:16px!important;display:grid!important;place-items:center!important;border:1px solid var(--next-card-border)!important;background:rgba(4,15,30,.46)!important;color:var(--next-accent)!important;}
body:not(.exercise-active) .program57-profile-icon svg{width:22px!important;height:22px!important;stroke:currentColor!important;fill:none!important;}
body:not(.exercise-active) .next-program-card{position:relative!important;overflow:hidden!important;padding:0!important;}
body:not(.exercise-active) .next-program-card.featured{min-height:260px!important;}
body:not(.exercise-active) .program57-card-img{position:absolute!important;inset:0 0 0 auto!important;width:58%!important;height:100%!important;object-fit:cover!important;object-position:center!important;opacity:.32!important;mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%)!important;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 34%,#000 100%)!important;}
body:not(.exercise-active) .program57-card-content{position:relative!important;z-index:1!important;display:grid!important;gap:10px!important;padding:var(--next-card-pad)!important;max-width:70%!important;}
body:not(.exercise-active) .program57-card h2{margin:8px 0 0!important;font-size:clamp(30px,6vw,50px)!important;line-height:.96!important;letter-spacing:-.05em!important;}
body:not(.exercise-active) .program57-target,.program57-list-main p{color:var(--next-accent)!important;font-weight:850!important;margin:0!important;}
body:not(.exercise-active) .program57-desc{margin:0!important;max-width:36ch!important;color:var(--next-muted)!important;line-height:1.35!important;font-weight:680!important;}
body:not(.exercise-active) .program57-card-top{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important;}
body:not(.exercise-active) .program57-best,.program57-selected,.program58-started,.program58-done{display:inline-flex!important;align-items:center!important;min-height:28px!important;padding:5px 10px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.30)!important;color:var(--next-accent)!important;background:rgba(6,18,34,.58)!important;text-transform:uppercase!important;letter-spacing:.12em!important;font-size:11px!important;font-weight:950!important;}
body:not(.exercise-active) .next-program-card-list{display:grid!important;grid-template-columns:auto minmax(0,1fr) minmax(140px,auto)!important;gap:14px!important;align-items:center!important;padding:16px!important;}
body:not(.exercise-active) .program57-list-icon{width:50px!important;height:50px!important;display:grid!important;place-items:center!important;border-radius:18px!important;border:1px solid var(--next-card-border)!important;background:rgba(4,15,30,.46)!important;color:var(--next-accent)!important;}
body:not(.exercise-active) .program57-list-main h3{margin:0!important;font-size:clamp(24px,4vw,34px)!important;line-height:1!important;letter-spacing:-.035em!important;}
body:not(.exercise-active) .program58-progress-mini{display:grid!important;gap:6px!important;color:var(--next-muted)!important;font-weight:850!important;}
body:not(.exercise-active) .program58-progress-mini i{display:block!important;height:7px!important;border-radius:999px!important;overflow:hidden!important;background:rgba(116,231,255,.12)!important;}
body:not(.exercise-active) .program58-progress-mini b{display:block!important;height:100%!important;border-radius:999px!important;background:linear-gradient(90deg,var(--next-accent),var(--next-accent-2))!important;}
body:not(.exercise-active) .program57-preview{grid-column:1/-1!important;}
body:not(.exercise-active) .program61-preview-box{display:grid!important;gap:12px!important;padding:var(--next-card-pad)!important;margin-top:12px!important;}
body:not(.exercise-active) .program61-preview-head{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:start!important;}
body:not(.exercise-active) .program61-preview-head strong{font-size:clamp(20px,4vw,28px)!important;line-height:1!important;}
body:not(.exercise-active) .program61-preview-head p{margin:4px 0 0!important;color:var(--next-muted)!important;}
body:not(.exercise-active) .program61-preview-head>span{display:inline-flex!important;min-height:28px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.24)!important;padding:5px 9px!important;color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.12em!important;font-size:10px!important;font-weight:950!important;}
body:not(.exercise-active) .program61-preview-note{border:1px solid rgba(116,231,255,.12)!important;border-radius:16px!important;background:rgba(4,15,30,.42)!important;color:var(--next-muted)!important;padding:10px 12px!important;line-height:1.35!important;}
body:not(.exercise-active) .program61-preview-summary{display:grid!important;grid-template-columns:1fr 1.2fr!important;gap:12px!important;}
body:not(.exercise-active) .program61-preview-summary b,.program61-list-title{display:block!important;color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.16em!important;font-size:11px!important;font-weight:950!important;margin-bottom:7px!important;}
body:not(.exercise-active) .program61-equipment-list,.program61-ex-equipment{display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
body:not(.exercise-active) .program61-equipment-chip,.program61-muted-chip{display:inline-flex!important;align-items:center!important;gap:6px!important;min-height:28px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.22)!important;background:rgba(6,18,34,.58)!important;color:var(--next-text)!important;padding:6px 9px!important;font-weight:850!important;}
body:not(.exercise-active) .program62-exercise-list{display:grid!important;gap:9px!important;}
body:not(.exercise-active) .program62-ex-group{border:1px solid rgba(116,231,255,.16)!important;border-radius:16px!important;overflow:hidden!important;background:rgba(3,12,24,.34)!important;}
body:not(.exercise-active) .program62-ex-head{list-style:none!important;cursor:pointer!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto 18px!important;align-items:center!important;gap:10px!important;padding:11px 12px!important;background:linear-gradient(90deg,rgba(4,80,116,.36),rgba(4,28,53,.20))!important;}
body:not(.exercise-active) .program62-ex-head::-webkit-details-marker{display:none!important;}
body:not(.exercise-active) .program62-ex-head::after{content:"›"!important;color:var(--next-accent)!important;font-size:24px!important;line-height:1!important;transition:transform .16s ease!important;}
body:not(.exercise-active) .program62-ex-group[open] .program62-ex-head::after{transform:rotate(90deg)!important;}
body:not(.exercise-active) .program62-ex-head span{color:var(--next-text)!important;text-transform:uppercase!important;letter-spacing:.14em!important;font-size:12px!important;font-weight:950!important;}
body:not(.exercise-active) .program62-ex-head em{font-style:normal!important;color:var(--next-muted)!important;font-size:12px!important;font-weight:800!important;}
body:not(.exercise-active) .program62-ex-group ul{list-style:none!important;padding:0!important;margin:0!important;border-top:1px solid rgba(116,231,255,.12)!important;}
body:not(.exercise-active) .program62-ex-group li{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:9px 12px!important;border-top:1px solid rgba(116,231,255,.09)!important;}
body:not(.exercise-active) .program62-ex-group li:first-child{border-top:0!important;}

/* ---------- profile ownership ---------- */
body:not(.exercise-active) .next-profile-page{display:grid!important;gap:var(--next-shell-gap)!important;}
body:not(.exercise-active) .next-profile-card{padding:var(--next-card-pad)!important;}
body:not(.exercise-active) .profile-active-card.next-profile-card{padding-bottom:0!important;overflow:hidden!important;}
body:not(.exercise-active) .profile-card-label{color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.22em!important;font-size:var(--next-section-title-size)!important;font-weight:950!important;}
body:not(.exercise-active) .profile-active-grid{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:16px!important;align-items:center!important;}
body:not(.exercise-active) .profile-active-main h2{margin:0!important;font-size:clamp(48px,11vw,74px)!important;line-height:.9!important;letter-spacing:-.055em!important;}
body:not(.exercise-active) .profile-active-main p{margin:10px 0 0!important;color:var(--next-muted)!important;font-size:clamp(16px,3.8vw,20px)!important;line-height:1.35!important;}
body:not(.exercise-active) .profile-avatar-wrap{position:relative!important;display:grid!important;place-items:center!important;}
body:not(.exercise-active) .profile-avatar{width:clamp(86px,20vw,132px)!important;height:clamp(86px,20vw,132px)!important;display:grid!important;place-items:center!important;border-radius:999px!important;border:1px solid var(--next-card-border-strong)!important;color:var(--next-accent)!important;background:radial-gradient(circle at 50% 34%,var(--next-accent-soft),rgba(5,18,34,.52) 70%)!important;}
body:not(.exercise-active) .profile-avatar svg{width:50%!important;height:50%!important;stroke:currentColor!important;fill:none!important;}
body:not(.exercise-active) .profile-avatar-edit{position:absolute!important;right:0!important;bottom:0!important;width:44px!important;height:44px!important;border-radius:999px!important;border:1px solid var(--next-card-border)!important;background:rgba(5,18,34,.88)!important;color:var(--next-accent)!important;display:grid!important;place-items:center!important;}
body:not(.exercise-active) .profile-action-grid{border-top:1px solid rgba(105,220,255,.12)!important;margin:16px calc(-1 * var(--next-card-pad)) 0!important;padding:14px var(--next-card-pad)!important;}
body:not(.exercise-active) .profile-action-grid.three{grid-template-columns:1fr 1fr!important;}
body:not(.exercise-active) .profile-action-grid.three .primary{grid-column:1/-1!important;}
body:not(.exercise-active) .profile-program-card{display:grid!important;gap:14px!important;}
body:not(.exercise-active) .profile-program-left h3{margin:0!important;font-size:clamp(30px,7vw,48px)!important;letter-spacing:-.05em!important;line-height:1!important;}
body:not(.exercise-active) .profile-program-left p{margin:4px 0 0!important;color:var(--next-muted)!important;font-size:clamp(17px,4vw,22px)!important;}
body:not(.exercise-active) .profile-program-progress{display:grid!important;gap:8px!important;}
body:not(.exercise-active) .profile-program-top{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:end!important;color:var(--next-muted)!important;font-weight:900!important;}
body:not(.exercise-active) .profile-program-top strong{font-size:clamp(32px,8vw,54px)!important;color:var(--next-accent)!important;}
body:not(.exercise-active) .profile-progress-track{height:10px!important;border-radius:999px!important;background:rgba(116,231,255,.12)!important;overflow:hidden!important;}
body:not(.exercise-active) .profile-progress-track span{display:block!important;height:100%!important;border-radius:999px!important;background:linear-gradient(90deg,var(--next-accent),var(--next-accent-2))!important;}
body:not(.exercise-active) .profile-rebuild-body{display:grid!important;gap:14px!important;}
body:not(.exercise-active) .profile-rebuild-kicker{display:block!important;color:var(--next-muted-2)!important;font-weight:900!important;margin-bottom:4px!important;}
body:not(.exercise-active) .profile-rebuild-goal{display:block!important;color:var(--next-text)!important;font-size:clamp(28px,7vw,44px)!important;line-height:1!important;}
body:not(.exercise-active) .profile-summary-head button{border:0!important;background:transparent!important;color:var(--next-accent)!important;font-weight:950!important;font-size:18px!important;}
body:not(.exercise-active) .profile-toggle{width:58px!important;height:34px!important;border-radius:999px!important;background:var(--next-accent-2)!important;display:grid!important;align-items:center!important;padding:3px!important;}
body:not(.exercise-active) .profile-toggle i{display:block!important;width:28px!important;height:28px!important;border-radius:999px!important;background:#fff!important;justify-self:end!important;}

/* ---------- calendar ownership ---------- */
body:not(.exercise-active) .calendar-dashboard{display:grid!important;gap:var(--next-shell-gap)!important;}
body:not(.exercise-active) .next-phase-week-selector{display:grid!important;gap:6px!important;border:1px solid rgba(116,231,255,.20)!important;border-radius:18px!important;background:rgba(2,10,22,.36)!important;padding:8px!important;min-width:min(420px,100%)!important;}
body:not(.exercise-active) .next-pw-row{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;}
body:not(.exercise-active) .next-pw-current{display:grid!important;gap:1px!important;min-width:64px!important;color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.12em!important;font-size:9px!important;font-weight:950!important;}
body:not(.exercise-active) .next-pw-current strong{color:var(--next-text)!important;font-size:10px!important;letter-spacing:0!important;text-transform:none!important;}
body:not(.exercise-active) .next-pw-options{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
body:not(.exercise-active) .next-pw-btn{min-height:28px!important;border-radius:9px!important;border:1px solid rgba(116,231,255,.20)!important;background:rgba(6,18,34,.58)!important;color:var(--next-text)!important;font-size:10px!important;font-weight:900!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;}
body:not(.exercise-active) .next-pw-btn.is-selected{border-color:var(--next-accent)!important;box-shadow:inset 0 0 0 1px rgba(110,234,255,.18)!important;}
body:not(.exercise-active) .next-pw-btn.is-done{color:#bfffd8!important;border-color:rgba(151,255,197,.35)!important;}
body:not(.exercise-active) .next-calendar-grid{display:grid!important;gap:var(--next-card-grid-gap)!important;}
body:not(.exercise-active) .next-calendar-plan-card{padding:var(--next-card-pad)!important;}
body:not(.exercise-active) .next-calendar-plan-head h2{margin:0!important;font-size:clamp(28px,6vw,46px)!important;line-height:1!important;letter-spacing:-.045em!important;}
body:not(.exercise-active) .next-calendar-plan-head span{color:var(--next-accent)!important;font-weight:850!important;}
body:not(.exercise-active) .next-calendar-list{display:grid!important;gap:8px!important;margin-top:12px!important;}
body:not(.exercise-active) .next-calendar-row{border:1px solid rgba(116,231,255,.16)!important;border-radius:18px!important;background:rgba(3,12,24,.34)!important;overflow:hidden!important;}
body:not(.exercise-active) .next-calendar-row-head{display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto auto!important;gap:10px!important;align-items:center!important;min-height:58px!important;padding:10px 12px!important;}
body:not(.exercise-active) .next-calendar-day{display:inline-flex!important;min-height:34px!important;align-items:center!important;border-radius:11px!important;border:1px solid rgba(116,231,255,.22)!important;background:rgba(4,15,30,.58)!important;color:var(--next-accent)!important;padding:7px 9px!important;font-size:12px!important;font-weight:950!important;white-space:nowrap!important;}
body:not(.exercise-active) .calendar-list-icon{width:36px!important;height:36px!important;border-radius:13px!important;display:grid!important;place-items:center!important;border:1px solid rgba(116,231,255,.20)!important;color:var(--next-accent)!important;}
body:not(.exercise-active) .calendar-list-icon svg{width:20px!important;height:20px!important;stroke:currentColor!important;fill:none!important;}
body:not(.exercise-active) .next-calendar-copy{display:grid!important;gap:2px!important;min-width:0!important;}
body:not(.exercise-active) .next-calendar-copy b{font-size:16px!important;line-height:1.1!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body:not(.exercise-active) .next-calendar-copy small{color:var(--next-muted)!important;font-size:12px!important;font-weight:750!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body:not(.exercise-active) .calendar-list-status{display:inline-flex!important;align-items:center!important;min-height:24px!important;border-radius:999px!important;padding:4px 8px!important;background:rgba(116,231,255,.12)!important;color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.08em!important;font-size:9px!important;font-weight:950!important;}
body:not(.exercise-active) .calendar-list-status.done{color:#bfffd8!important;background:rgba(17,72,48,.34)!important;}
body:not(.exercise-active) .calendar-list-status.rest,.calendar-list-status.optional{color:#d8c5ff!important;background:rgba(76,50,140,.28)!important;}
body:not(.exercise-active) .next-calendar-chevron{color:var(--next-muted)!important;font-size:22px!important;}
body:not(.exercise-active) .next-calendar-hero{display:grid!important;gap:12px!important;border-top:1px solid rgba(116,231,255,.10)!important;padding:12px!important;background:rgba(2,10,22,.26)!important;}

/* ---------- overview / generic main cards ---------- */
body:not(.exercise-active) .overview-head.next-page-header-card{padding:var(--next-card-pad)!important;}
body:not(.exercise-active) .overview-return-row{display:flex!important;gap:10px!important;flex-wrap:wrap!important;align-items:center!important;margin-bottom:8px!important;}
body:not(.exercise-active) .overview-equipment{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-top:10px!important;}
body:not(.exercise-active) .developed-cards-grid,.overview-flow-grid,.overview-list{display:grid!important;gap:var(--next-card-grid-gap)!important;}
body:not(.exercise-active) .developed-card,.flow-card,.overview-insight-card{padding:var(--next-card-pad)!important;}
body:not(.exercise-active) .overview-list article{border:1px solid rgba(116,231,255,.16)!important;border-radius:18px!important;background:rgba(3,12,24,.34)!important;}

/* ---------- tablet / mobile consolidation ---------- */
@media(max-width:760px){
  body:not(.exercise-active) #startScreen .showcase-grid{grid-template-columns:1fr!important;gap:14px!important;}
  body:not(.exercise-active) #startScreen .showcase-copy h1{font-size:clamp(48px,13vw,74px)!important;}
  body:not(.exercise-active) .rc18-today-card{grid-template-columns:1fr!important;min-height:auto!important;padding:16px!important;}
  body:not(.exercise-active) .rc18-pass-icon{width:48px!important;height:48px!important;}
  body:not(.exercise-active) .rc18-time-chip{position:static!important;justify-self:start!important;}
  body:not(.exercise-active) .rc18-today-actions{grid-template-columns:1fr 1fr!important;}
  body:not(.exercise-active) .rc18-progress-card{grid-template-columns:1fr!important;padding:16px!important;}
  body:not(.exercise-active) .rc18-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body:not(.exercise-active) .rc18-ring-xl{width:120px!important;height:120px!important;}
  body:not(.exercise-active) .next-program-card.featured{min-height:0!important;}
  body:not(.exercise-active) .program57-card-img{width:100%!important;opacity:.22!important;mask-image:none!important;-webkit-mask-image:none!important;}
  body:not(.exercise-active) .program57-card-content{max-width:100%!important;padding:16px!important;}
  body:not(.exercise-active) .next-program-card-list{grid-template-columns:minmax(0,1fr)!important;padding:14px!important;}
  body:not(.exercise-active) .program57-list-icon{display:none!important;}
  body:not(.exercise-active) .program57-list-actions{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .program61-preview-summary{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .program62-ex-group li{grid-template-columns:1fr!important;align-items:start!important;}
  body:not(.exercise-active) .profile-active-grid{grid-template-columns:minmax(0,1fr) auto!important;}
  body:not(.exercise-active) .profile-action-grid.three{grid-template-columns:1fr 1fr!important;}
  body:not(.exercise-active) .profile-action-grid.three .primary{grid-column:1/-1!important;}
  body:not(.exercise-active) .next-calendar-row-head{grid-template-columns:auto auto minmax(0,1fr) auto!important;}
  body:not(.exercise-active) .next-calendar-chevron{display:none!important;}
  body:not(.exercise-active) .calendar-list-status{font-size:8px!important;}
}
@media(max-width:420px){
  body:not(.exercise-active) .rc18-today-actions{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .rc18-kpi-grid{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .profile-avatar{width:76px!important;height:76px!important;}
  body:not(.exercise-active) .profile-avatar-edit{width:38px!important;height:38px!important;}
  body:not(.exercise-active) .next-calendar-row-head{grid-template-columns:auto minmax(0,1fr) auto!important;}
  body:not(.exercise-active) .calendar-list-icon{display:none!important;}
  body:not(.exercise-active) .calendar-list-status{display:none!important;}
}

/* RC75.1 · harden canonical primitives after removing legacy padding/width owners */
body:not(.exercise-active) .wrap{
  padding:var(--next-page-pad-y) var(--next-page-pad-x) 104px !important;
  padding-top:calc(env(safe-area-inset-top,0px) + var(--next-page-pad-y)) !important;
  padding-bottom:calc(104px + env(safe-area-inset-bottom,0px)) !important;
}
body:not(.exercise-active) .next-chip{
  padding:6px 10px !important;
  font-size:clamp(12.5px,3.2vw,14px) !important;
  max-width:100% !important;
}
body:not(.exercise-active) .next-button{
  width:100% !important;
  box-sizing:border-box !important;
  white-space:nowrap !important;
  text-align:center !important;
  padding:11px 14px !important;
}
body:not(.exercise-active) .next-action-row>.next-button,
body:not(.exercise-active) .next-action-row>.program57-btn,
body:not(.exercise-active) .next-action-row>.profile-action{
  min-width:0 !important;
}
body:not(.exercise-active) .program57-btn{
  width:100% !important;
  min-width:0 !important;
}
body:not(.exercise-active) .app-profile-toggle svg,
body:not(.exercise-active) .app-profile-toggle svg *{
  fill:none !important;
  stroke:currentColor !important;
}
@media(max-width:760px){
  body:not(.exercise-active) .wrap{padding-left:14px !important;padding-right:14px !important;}
  body:not(.exercise-active) .program57-card h2{font-size:clamp(30px,8.5vw,42px)!important;}
  body:not(.exercise-active) .next-chip{font-size:13px!important;}
}


/* =========================================================
   RC76 · Full system ownership: exercise/library/tests migration
   Remaining visual rules from app.css moved here so next-system.css
   is the only loaded visual owner. app.css is now reset/tokens only.
   ========================================================= */
/* ---------- RC75 retained legacy: active pass / exercise player only ---------- */
/* ---------- Exercise/pass ---------- */
body.exercise-active .wrap{width:100%;padding:0 0 calc(120px + var(--safe-bottom))}
.sticky-nav{
  position:sticky;
  top:0;
  z-index:130;
  padding:8px 10px 10px;
  background:linear-gradient(180deg,rgba(5,10,19,.98),rgba(6,12,22,.95));
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(18px);
}
.nav-row{display:grid;gap:8px}
.nav-actions{display:grid;gap:8px}
.nav-left{display:grid;grid-template-columns:auto auto;gap:8px;align-items:center}
.menu-wrap{position:relative}
.menu-toggle,.exit-pass-btn{width:auto;min-height:42px;border-radius:14px;padding:9px 14px;font-size:15px}
.top-tools{display:none;position:fixed;left:10px;right:10px;top:86px;z-index:200;padding:10px;border-radius:20px;border:1px solid var(--line);background:rgba(5,10,19,.98);box-shadow:var(--shadow)}
.top-tools.open{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tool-btn{font-size:12px;min-height:42px;justify-content:space-between}
.progress-meta{display:grid;gap:6px}
#exerciseMeta{font-size:14px;letter-spacing:.10em;text-transform:uppercase;color:#dff8ff;font-weight:1000}
.progress-shell{height:9px;border-radius:999px;background:rgba(160,190,230,.14);overflow:hidden}
.progress-bar{height:100%;width:0;background:linear-gradient(90deg,var(--cyan),var(--blue))}
.stage-layout{display:grid;grid-template-columns:1fr;gap:10px}
.video-card{border-radius:0 0 24px 24px;overflow:hidden;border-left:0;border-right:0}
.video-wrap{aspect-ratio:16/9;background:#050a12;position:relative;display:grid;place-items:center}
.video-wrap iframe,.video-wrap video{width:100%;height:100%;border:0;display:block}
.no-video{min-height:220px;display:grid;place-items:center;text-align:center;padding:24px;color:var(--muted)}
.no-video h2{margin:8px 0;color:var(--text)}
.proxy-status,.open-link{display:none!important}
.info-card{margin:0 10px;padding:16px;display:grid;gap:12px}
.exercise-kicker{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.exercise-kicker::-webkit-scrollbar{display:none}
.exercise-kicker .tag{flex:0 0 auto;text-transform:uppercase;letter-spacing:.12em;font-size:12px;color:var(--cyan)}
.exercise-name{font-size:clamp(36px,10vw,58px);line-height:.92;letter-spacing:-.06em;margin:0;text-wrap:balance}
.exercise-reps{min-height:112px;border-radius:22px;background:rgba(255,255,255,.045);border:1px solid var(--line);display:grid;place-items:center;padding:14px}
.rx-line{font-size:clamp(48px,14vw,72px);line-height:.95;font-weight:1000;letter-spacing:-.06em}
.set-note,.coach-cues,.next-preview,.timer-card,.superset-status{padding:14px;border-radius:20px;background:rgba(8,15,27,.72);border:1px solid var(--line)}
.coach-cues small,.next-preview small{display:block;color:var(--cyan);letter-spacing:.14em;text-transform:uppercase;font-weight:950;font-size:12px;margin-bottom:8px}
.coach-cues ul{margin:0;padding-left:20px;color:#dce8f5}
.next-preview b,.next-line{color:#dff8ff;font-weight:950}
.timer-card{display:none}
.timer-card.show{display:grid;gap:10px}
.timer-display{font-size:44px;font-weight:1000;font-variant-numeric:tabular-nums}
.timer-status{color:var(--cyan);font-weight:900}
.timer-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.playlist-card{display:none!important}
.pass-bottom-controls{
  position:sticky;
  bottom:0;
  z-index:110;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  padding:10px 10px calc(10px + var(--safe-bottom));
  background:linear-gradient(180deg,rgba(5,10,19,0),rgba(5,10,19,.94) 25%,rgba(5,10,19,.98));
}
#prevBtn{min-width:106px;max-width:128px;min-height:54px;border-radius:18px;font-size:0;opacity:.80}
#prevBtn::before{content:"← Tillbaka";font-size:15px}
#nextBtn{min-height:58px;border-radius:20px;font-size:19px}

/* Rest */
.rest-stage{position:absolute;inset:0;display:grid;align-content:center;justify-items:start;padding:26px;background-size:cover;background-position:center;color:#fff}
.rest-stage::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,8,16,.68),rgba(3,8,16,.18));z-index:0}
.rest-stage>*{position:relative;z-index:1}
.rest-kicker{color:var(--cyan);letter-spacing:.14em;text-transform:uppercase;font-weight:950}
.rest-title{font-size:44px;font-weight:1000}
.rest-display{font-size:clamp(80px,22vw,160px);font-weight:1000;letter-spacing:-.08em}
.rest-next{font-size:18px;color:#e4f0fb}

/* ---------- Library ---------- */
.library-filters{display:grid;grid-template-columns:1fr;gap:12px;margin:12px 0}
.library-filters input,.library-filters select,.test-card input{
  min-height:56px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#071020;
  color:var(--text);
  padding:0 14px;
  width:100%;
}
.library-detail{display:grid!important;grid-template-columns:1fr!important;gap:14px;padding:14px;margin-bottom:14px}
.library-video{aspect-ratio:16/9;min-height:0;height:auto;border-radius:20px;overflow:hidden;background:#050a12}
.library-video iframe,.library-video video,.library-video img{width:100%;height:100%;border:0;display:block;object-fit:cover}
.library-copy{display:grid;gap:12px}
.library-copy h2{font-size:clamp(36px,10vw,58px);line-height:.94;letter-spacing:-.06em;margin:0}
.library-copy p{font-size:16px;margin:0}
.library-facts,.library-dose{display:grid;gap:10px}
.dose-card{padding:14px;border-radius:18px;background:rgba(8,15,27,.72)}
.dose-card .sub{display:flex;flex-wrap:wrap;gap:8px}
.dose-card ul{margin:0;padding-left:20px;color:var(--muted)}
.qa-grid{display:grid;grid-template-columns:1fr;gap:12px}
.qa-row{padding:16px;display:grid;gap:12px}
.qa-top{display:grid;gap:10px}
.qa-top b{font-size:28px;line-height:1;letter-spacing:-.04em}
.qa-status{width:max-content;border-radius:999px;padding:8px 12px;border:1px solid var(--line);background:rgba(13,31,55,.76);font-weight:900}
.qa-meta-pills{display:flex;flex-wrap:wrap;gap:8px}
.qa-open{min-height:50px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-weight:900}

/* ---------- Tests ---------- */
.test-card{padding:16px;display:grid;gap:12px}
.test-card label{color:var(--cyan);font-weight:950;font-size:18px}
.test-stats{display:grid;grid-template-columns:1fr;gap:10px}
.test-stat{padding:14px;border-radius:18px;border:1px solid var(--line);background:rgba(8,15,27,.72)}
.test-stat small{display:block;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-weight:900}
.test-stat b{display:block;font-size:28px;margin-top:6px}
.test-delta,.test-history{color:var(--muted);font-size:14px}

/* ---------- Responsive desktop-ish ---------- */
@media (min-width:760px){
  .wrap{padding-top:18px}
  .panel-pad{padding:22px}
  .home-hero{padding:22px}
  .showcase-grid{display:grid;grid-template-columns:minmax(0,.95fr) minmax(360px,1.05fr);gap:18px}
  
  .showcase-copy{display:grid!important;align-content:center}
  .showcase-eyebrow{display:block!important}
  .showcase-copy h1{font-size:clamp(56px,6vw,92px);line-height:.9;letter-spacing:-.07em;margin:0}
  .showcase-intro{display:block!important;max-width:44ch}
  .showcase-benefits,.showcase-signals{display:flex!important;gap:10px;flex-wrap:wrap}
  .benefit{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(8,15,27,.72)}
  .benefit b,.benefit span{display:block}
  .benefit span{color:var(--muted)}
  .dash-action-row{grid-template-columns:1.2fr .8fr}
  .profile-config-grid{grid-template-columns:repeat(12,minmax(0,1fr))}
  .profile-config-grid>.profile-panel{grid-column:span 4}
  .profile-config-grid>.selector-panel:nth-of-type(2){grid-column:1/-1}
  .profile-config-grid>.selector-panel:nth-of-type(3),
  .profile-config-grid>.selector-panel:nth-of-type(4){grid-column:span 6}
  .profile-overview-panel,.week-overview-panel,.passday-panel,.data-panel{grid-column:1/-1}
  #stageButtons{grid-template-columns:repeat(3,1fr)!important}
  .developed-cards-grid{grid-template-columns:repeat(4,1fr)}
  .week-plan-grid{grid-template-columns:repeat(3,1fr)}
  .selected-day-grid{grid-template-columns:repeat(2,1fr)}
  .overview-head{grid-template-columns:1fr auto}
  #overviewInsights{grid-template-columns:repeat(4,1fr)}
  #overviewFlow{grid-template-columns:repeat(4,1fr)!important}
  .stage-layout{grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr)}
  body.exercise-active .wrap{width:min(1220px,calc(100vw - 32px));padding-top:0}
  .video-card{border-radius:24px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
  .info-card{margin:0}
  .playlist-card{display:block!important}
  .mini-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-height:40vh;overflow:auto}
  .mini-item{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035);padding:8px}
  .mini-item.active{border-color:var(--line2);background:rgba(70,142,255,.16)}
  .mini-title{font-weight:850;font-size:13px}.mini-reps{font-size:12px;color:var(--muted)}
  .qa-grid{grid-template-columns:repeat(2,1fr)}
  .library-detail{grid-template-columns:1fr 1fr!important}
  .test-stats{grid-template-columns:repeat(3,1fr)}
}


/* v91.2 structural cleanup
   Keeps v91.1 navigation base. Cleans remaining mobile density, box nesting and pass controls.
*/

/* Global: fewer nested visual borders on mobile */
@media (max-width: 760px){
  .panel,
  .hero,
  .daily-primary,
  .daily-secondary,
  .profile-config-grid > .panel,
  .selected-day-focus,
  .library-detail,
  .qa-row,
  .test-card,
  .info-card{
    box-shadow:0 12px 30px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.03) !important;
  }

  .panel-pad{
    padding:14px !important;
  }
}

/* Dashboard: avoid large nested card feeling and make CTA safe around Safari toolbar */
@media (max-width: 760px){
  .home-hero{
    border-radius:22px !important;
  }
  .daily-primary{
    padding:14px !important;
    border-radius:20px !important;
  }
  .dash-title{
    font-size:clamp(34px,10.2vw,50px) !important;
  }
  .dash-focus-card{
    padding:12px !important;
    border-radius:16px !important;
  }
  .dash-focus-text{
    font-size:16px !important;
  }
  .dash-action-row{
    gap:8px !important;
  }
  .next-pass-btn{
    min-height:58px !important;
    border-radius:18px !important;
    font-size:20px !important;
  }
  .overview-pass-btn{
    min-height:48px !important;
    border-radius:16px !important;
  }
  .daily-secondary{
    padding:14px !important;
    border-radius:20px !important;
  }
  .dash-grid{
    grid-auto-columns:minmax(104px,1fr) !important;
  }
  .dash-day{
    min-width:104px !important;
    min-height:84px !important;
    padding:10px !important;
  }
}

/* Profile: remove "big marketing block" feeling; make it compact control-first */
@media (max-width:760px){
  #profileScreen .overview-head{
    padding:14px !important;
    border-radius:20px !important;
    margin-bottom:10px !important;
  }
  #profileScreen .overview-head .meta{
    font-size:11px !important;
    letter-spacing:.12em !important;
  }
  #profileScreen .title{
    font-size:clamp(32px,8.8vw,48px) !important;
    max-width:none !important;
    margin:4px 0 8px !important;
  }
  #profileScreen .muted{
    max-width:28ch !important;
    font-size:15px !important;
    line-height:1.25 !important;
  }
  #profileScreen .profile-config-grid{
    gap:8px !important;
  }
  #profileScreen .profile-panel,
  #profileScreen .selector-panel,
  #profileScreen .profile-overview-panel,
  #profileScreen .week-overview-panel,
  #profileScreen .passday-panel,
  #profileScreen .data-panel{
    border-radius:20px !important;
  }
  #profileScreen .stage-choice{
    min-height:188px !important;
    border-radius:22px !important;
    padding:18px !important;
  }
  #profileScreen .stage-choice b{
    font-size:clamp(32px,9.5vw,50px) !important;
  }
  #profileScreen .stage-choice span{
    font-size:15px !important;
  }
  .week-day-card{
    min-height:278px !important;
    border-radius:22px !important;
  }
  .week-day-content h3{
    font-size:clamp(34px,10vw,48px) !important;
  }
  .selected-day-focus h3{
    font-size:clamp(32px,9vw,46px) !important;
  }
}

/* Selected pass: fewer boxes inside boxes */
@media(max-width:760px){
  .selected-day-grid{
    display:none !important;
  }
  .selected-day-equipment span:nth-child(n/**/+5){
    display:none !important;
  }
  .selected-day-stats{
    font-size:22px !important;
  }
}

/* Library: video and card sizing more controlled */
#qaScreen .library-video{
  aspect-ratio:16 / 9 !important;
  width:100% !important;
  max-height:42svh !important;
}
#qaScreen .library-video iframe,
#qaScreen .library-video video{
  width:100% !important;
  height:100% !important;
}
@media(max-width:760px){
  .library-detail{
    padding:12px !important;
    border-radius:22px !important;
  }
  .library-copy h2{
    font-size:clamp(30px,9vw,44px) !important;
    line-height:.98 !important;
  }
  .library-copy p{
    font-size:15px !important;
  }
  .qa-top b{
    font-size:clamp(24px,7vw,34px) !important;
  }
}

/* Pass mode: previous should be tiny/secondary; hidden when disabled */
body.exercise-active .pass-bottom-controls{
  grid-template-columns:1fr !important;
}
body.exercise-active .pass-bottom-controls.has-prev{
  grid-template-columns:minmax(82px,.32fr) 1fr !important;
}
body.exercise-active #prevBtn:disabled{
  display:none !important;
}
body.exercise-active #prevBtn{
  min-width:0 !important;
  max-width:none !important;
  min-height:48px !important;
  padding-inline:10px !important;
  opacity:.72 !important;
  font-size:0 !important;
}
body.exercise-active #prevBtn::before{
  content:"←";
  font-size:20px;
}
body.exercise-active .pass-bottom-controls.has-prev #prevBtn::before{
  content:"←";
}
body.exercise-active #nextBtn{
  min-height:58px !important;
  font-size:18px !important;
}
@media(min-width:760px){
  body.exercise-active #prevBtn::before{
    content:"← Tillbaka";
    font-size:15px;
  }
}

/* Pass mode: if reps-based exercise, timer should not dominate below */
body.exercise-active .timer-card:not(.show){
  display:none !important;
}
body.exercise-active .timer-card{
  margin-top:2px !important;
}

/* App menu: ensure dropdown stays clean and never sits as visible pills */





/* v91.3 – phase/week segment cleanup
   The large stacked phase/week controls wasted vertical space on iPhone.
   Keep nav base from v91.1 and structural flattening from v91.2.
*/

/* Rename-friendly compact controls */
#profileScreen #phaseButtons,
#profileScreen #weekButtons{
  display:grid !important;
  gap:8px !important;
}

#profileScreen #phaseButtons{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

#profileScreen #weekButtons{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

#profileScreen #phaseButtons .seg-btn,
#profileScreen #weekButtons .seg-btn{
  min-height:52px !important;
  padding:10px 8px !important;
  border-radius:16px !important;
  font-size:clamp(15px,4vw,19px) !important;
  white-space:nowrap !important;
}

/* Similar compact button groups that should not become huge vertical stacks */
#profileScreen .profile-row{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}

#profileScreen .profile-row .profile-btn{
  min-height:52px !important;
  padding:10px 8px !important;
  border-radius:16px !important;
  font-size:clamp(15px,4vw,19px) !important;
}

#profileScreen .profile-row .profile-btn.add-profile{
  grid-column:auto !important;
}

/* Make these selector panels smaller now that controls are grids */
#profileScreen .selector-panel .panel-pad,
#profileScreen .profile-panel .panel-pad{
  padding:14px !important;
}

#profileScreen .selector-panel,
#profileScreen .profile-panel{
  border-radius:18px !important;
}

/* When the phone is very narrow, keep phase as 3 columns but week as 2x2 if needed */
@media(max-width:390px){
  #profileScreen #weekButtons{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  #profileScreen .profile-row{
    grid-template-columns:1fr 1fr !important;
  }
  #profileScreen .profile-row .profile-btn.add-profile{
    grid-column:1 / -1 !important;
  }
}

/* Reduce vertical rhythm around these panels */
#profileScreen .profile-config-grid{
  gap:9px !important;
}
#profileScreen .section-title{
  margin-bottom:10px !important;
}



/* v91.4 – Dashboard/pass cleanup
   Fixes real iPhone findings:
   - progress stat icons were huge
   - pass mode had two top bars
   - next/rest button appeared above video
   - week rhythm clipped horizontally
*/

/* Dashboard week rhythm: 3 equal cards, no right clipping */
#progressDashboard .dash-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  grid-auto-flow:row !important;
  grid-auto-columns:unset !important;
  overflow:visible !important;
  gap:8px !important;
  width:100% !important;
}
#progressDashboard .dash-day{
  min-width:0 !important;
  width:100% !important;
  min-height:92px !important;
}
#progressDashboard .dash-day-top{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  gap:6px !important;
}
#progressDashboard .dash-day-top b{
  font-size:clamp(28px,8vw,42px) !important;
  line-height:.95 !important;
}
#progressDashboard .dash-day-state{
  font-size:13px !important;
  line-height:1.05 !important;
  max-width:3.5em;
}
#progressDashboard .dash-week-summary{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  gap:8px !important;
  align-items:center !important;
}
#progressDashboard .dash-week-count{
  white-space:nowrap !important;
  font-size:clamp(16px,5vw,24px) !important;
  padding:8px 12px !important;
}
@media(max-width:370px){
  #progressDashboard .dash-grid{
    grid-template-columns:repeat(3,minmax(92px,1fr)) !important;
    overflow-x:auto !important;
  }
}

/* Quick stats: no giant icons, compact stat cards */
.quick-stats-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:12px !important;
}
.progress-stat,
.stat-card.progress-stat{
  min-height:0 !important;
  padding:16px !important;
  border-radius:20px !important;
  display:grid !important;
  gap:8px !important;
  align-content:start !important;
}
.progress-stat .stat-icon,
.stat-icon{
  display:none !important;
}
.progress-stat .big{
  font-size:clamp(32px,9vw,52px) !important;
  line-height:.92 !important;
  letter-spacing:-.05em !important;
}
.progress-stat .sub{
  font-size:15px !important;
}
.progress-stat .mini-progress{
  height:10px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:rgba(160,190,230,.14) !important;
}
.progress-stat .mini-progress span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--cyan),var(--blue));
}
.progress-stat .cta{
  color:var(--cyan);
  font-weight:900;
}

/* Desktop can use grid, mobile remains single-column readable */
@media(min-width:760px){
  .quick-stats-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}

/* Pass mode: hide normal app shell topbar when workout is active */


/* Pass mode: bottom controls are actual bottom controls, never above the video */
body.exercise-active .wrap{
  padding-bottom:calc(92px + var(--safe-bottom)) !important;
}
body.exercise-active .pass-bottom-controls{
  position:fixed !important;
  left:max(10px, calc((100vw - 1220px) / 2)) !important;
  right:max(10px, calc((100vw - 1220px) / 2)) !important;
  bottom:0 !important;
  z-index:500 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
  padding:10px 10px calc(10px + var(--safe-bottom)) !important;
  background:linear-gradient(180deg,rgba(5,10,19,0),rgba(5,10,19,.94) 28%,rgba(5,10,19,.99)) !important;
  pointer-events:auto !important;
}
body.exercise-active .pass-bottom-controls.has-prev{
  grid-template-columns:minmax(52px,64px) 1fr !important;
}
body.exercise-active #prevBtn:disabled{
  display:none !important;
}
body.exercise-active #prevBtn{
  width:100% !important;
  min-width:0 !important;
  max-width:64px !important;
  min-height:56px !important;
  border-radius:18px !important;
  padding:0 !important;
  opacity:.72 !important;
}
body.exercise-active #prevBtn::before{
  content:"←" !important;
  font-size:22px !important;
}
body.exercise-active #nextBtn{
  width:100% !important;
  min-height:60px !important;
  border-radius:20px !important;
  font-size:clamp(17px,4.8vw,22px) !important;
}

/* Since controls are fixed, video should be first after pass topbar */
body.exercise-active .stage-layout{
  margin-top:0 !important;
}
body.exercise-active .sticky-nav{
  margin-bottom:0 !important;
}
body.exercise-active .video-card{
  margin-top:0 !important;
}

/* Pass video: keep 16:9 and avoid oversized vertical flow */
body.exercise-active .video-wrap{
  aspect-ratio:16 / 9 !important;
  max-height:42svh !important;
}
body.exercise-active .video-wrap iframe,
body.exercise-active .video-wrap video{
  width:100% !important;
  height:100% !important;
}

/* Pass info: slightly tighter after moving controls out of flow */
body.exercise-active .info-card{
  margin-top:10px !important;
  padding-bottom:16px !important;
}
body.exercise-active .exercise-reps{
  min-height:96px !important;
}

/* Top pass bar compact after removing app topbar */
body.exercise-active .sticky-nav{
  top:0 !important;
  padding-top:calc(8px + env(safe-area-inset-top,0px)) !important;
}
body.exercise-active #exerciseMeta{
  font-size:clamp(12px,3.4vw,16px) !important;
}



/* v91.5 – restore dashboard nav tiles and create more room in pass mode */
.dashboard-shortcuts-panel{margin-bottom:14px;}
.dashboard-shortcuts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.shortcut-btn{min-height:112px;border-radius:28px;border:1px solid var(--line);background:linear-gradient(180deg,rgba(14,23,40,.92),rgba(8,14,27,.96));box-shadow:var(--shadow);color:var(--text);font-weight:900;font-size:clamp(22px,6.2vw,28px);letter-spacing:-.03em;padding:20px 16px;text-align:center;}
.shortcut-btn.active{outline:2px solid rgba(108,225,255,.75); box-shadow:0 16px 36px rgba(0,0,0,.34), inset 0 -4px 0 rgba(108,225,255,.75);}
.shortcut-btn:active{transform:translateY(1px);}
@media(min-width:760px){.dashboard-shortcuts-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}

/* pass mode: remove non-essential duplication to prioritise film + övning + coach-cues */
#nextTopPreview,.next-top-preview,.next-preview,#exerciseSummary{display:none !important;}
body.exercise-active .info-card{display:grid !important;gap:12px !important;align-content:start !important;padding:16px !important;}
body.exercise-active .exercise-kicker{margin-bottom:0 !important;}
body.exercise-active .exercise-name{margin:0 !important;font-size:clamp(30px,8.6vw,54px) !important;line-height:.94 !important;}
body.exercise-active .exercise-reps{margin-top:0 !important;min-height:72px !important;}
body.exercise-active .coach-cues{padding:14px !important;}
body.exercise-active .set-note, body.exercise-active .next-preview{display:none !important;}
body.exercise-active .stage-layout{gap:12px !important;}
body.exercise-active .sticky-nav{padding-bottom:8px !important;}
body.exercise-active .nav-row{gap:8px !important;}
body.exercise-active .progress-meta{gap:8px !important;}
body.exercise-active #exitPassBtn{min-height:48px !important;padding:12px 16px !important;border-radius:16px !important;}
body.exercise-active .menu-toggle{min-height:48px !important;padding:12px 16px !important;border-radius:16px !important;}


/* v91.6 – Pass lite
   Goal: active pass should prioritize film, exercise, prescription and coach-cues.
   Exit moves into menu. Previous is tiny. Topbar is compact.
*/

/* Active pass: one compact header row */
body.exercise-active .sticky-nav{
  padding:calc(6px + env(safe-area-inset-top,0px)) 10px 8px !important;
  border-bottom:1px solid rgba(128,181,255,.14) !important;
}

body.exercise-active .nav-row{
  display:grid !important;
  grid-template-columns:auto 1fr !important;
  gap:8px !important;
  align-items:center !important;
}

body.exercise-active .nav-actions{
  display:block !important;
}

body.exercise-active .nav-left{
  display:block !important;
}

body.exercise-active .menu-wrap{
  display:block !important;
}

body.exercise-active #menuToggleBtn,
body.exercise-active .menu-toggle{
  width:48px !important;
  min-width:48px !important;
  height:44px !important;
  min-height:44px !important;
  padding:0 !important;
  border-radius:15px !important;
  font-size:0 !important;
}

body.exercise-active #menuToggleBtn::before{
  content:"☰";
  font-size:22px;
  line-height:1;
}

/* Exit stays available inside menu, not as a big top button */
body.exercise-active #exitPassBtn{
  display:none !important;
}

/* Settings menu in pass becomes the place for secondary actions */
body.exercise-active .top-tools{
  top:calc(58px + env(safe-area-inset-top,0px)) !important;
}

/* Progress is compact but visible */
body.exercise-active .progress-meta{
  min-width:0 !important;
  gap:6px !important;
}

body.exercise-active #exerciseMeta{
  font-size:clamp(11px,3vw,14px) !important;
  letter-spacing:.08em !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

body.exercise-active .progress-shell{
  height:7px !important;
}

/* Film should dominate */
body.exercise-active .stage-layout{
  gap:8px !important;
}

body.exercise-active .video-card{
  border-radius:0 0 18px 18px !important;
}

body.exercise-active .video-wrap{
  aspect-ratio:16 / 9 !important;
  max-height:48svh !important;
}

body.exercise-active .video-wrap iframe,
body.exercise-active .video-wrap video{
  width:100% !important;
  height:100% !important;
}

/* Exercise card: no extra pass-name feeling, fewer chips */
body.exercise-active .info-card{
  margin:8px 10px 0 !important;
  padding:14px !important;
  border-radius:20px !important;
  gap:8px !important;
}

body.exercise-active .exercise-kicker{
  display:flex !important;
  gap:8px !important;
  min-height:0 !important;
  margin:0 !important;
}

/* Keep only first meaningful category chip; hide group/set duplication */
body.exercise-active #exerciseGroup,
body.exercise-active #exerciseSet{
  display:none !important;
}

body.exercise-active #exerciseSection{
  min-height:30px !important;
  padding:6px 10px !important;
  font-size:11px !important;
  letter-spacing:.12em !important;
}

body.exercise-active .exercise-name{
  font-size:clamp(32px,9vw,52px) !important;
  line-height:.92 !important;
  margin:0 !important;
  letter-spacing:-.06em !important;
}

body.exercise-active .exercise-reps{
  min-height:78px !important;
  border-radius:18px !important;
  padding:10px !important;
}

body.exercise-active .rx-line{
  font-size:clamp(42px,12vw,64px) !important;
  line-height:.92 !important;
}

/* Coach cues get priority after prescription */
body.exercise-active .coach-cues{
  display:grid !important;
  padding:12px 14px !important;
  border-radius:18px !important;
}

body.exercise-active .coach-cues small{
  margin-bottom:6px !important;
  font-size:11px !important;
}

body.exercise-active .coach-cues ul{
  padding-left:18px !important;
  line-height:1.35 !important;
}

/* Remove non-essential active-pass modules */
body.exercise-active .set-note,
body.exercise-active .next-preview,
body.exercise-active #nextPreview,
body.exercise-active #exerciseSummary,
body.exercise-active .superset-status:empty,
body.exercise-active .playlist-card{
  display:none !important;
}

/* Timer only when actually active/visible */
body.exercise-active .timer-card:not(.show){
  display:none !important;
}

body.exercise-active .timer-card.show{
  padding:12px !important;
  border-radius:18px !important;
}

body.exercise-active .timer-display{
  font-size:34px !important;
}

body.exercise-active .timer-controls{
  gap:8px !important;
}

/* Bottom controls: primary next/rest, tiny back */
body.exercise-active .pass-bottom-controls{
  position:fixed !important;
  left:10px !important;
  right:10px !important;
  bottom:0 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
  padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px)) !important;
}

body.exercise-active .pass-bottom-controls.has-prev{
  grid-template-columns:48px 1fr !important;
}

body.exercise-active #prevBtn{
  min-width:48px !important;
  width:48px !important;
  max-width:48px !important;
  height:54px !important;
  min-height:54px !important;
  border-radius:16px !important;
}

body.exercise-active #prevBtn::before{
  content:"←" !important;
  font-size:22px !important;
}

body.exercise-active #nextBtn{
  min-height:56px !important;
  border-radius:18px !important;
  font-size:clamp(17px,4.8vw,21px) !important;
}

/* Ensure bottom controls don't hide coach cues too aggressively */
body.exercise-active .wrap{
  padding-bottom:calc(84px + env(safe-area-inset-bottom,0px)) !important;
}

/* Very small screens: squeeze further */
@media(max-width:390px){
  body.exercise-active .info-card{
    margin-left:8px !important;
    margin-right:8px !important;
    padding:12px !important;
  }
  body.exercise-active .exercise-name{
    font-size:clamp(30px,8.4vw,44px) !important;
  }
  body.exercise-active .exercise-reps{
    min-height:68px !important;
  }
}

/* RC75 note: main app pages are governed by assets/css/next-system.css. */


/* =========================================================
   RC76 · Centralized stabilization hardening
   These rules intentionally live at the end of next-system.css so all
   main, exercise, library and test views resolve through one stylesheet.
   ========================================================= */
:root{
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-top:env(safe-area-inset-top,0px);
  --bg:#020814;
  --card:var(--next-surface);
  --card2:var(--next-surface-2);
  --text:var(--next-text);
  --muted:var(--next-muted);
  --cyan:var(--next-accent);
  --blue:var(--next-accent-2);
  --blue2:#6ec7ff;
  --line:var(--next-card-border);
  --line2:var(--next-card-border-strong);
  --shadow:var(--next-shadow-card);
}
*{box-sizing:border-box}
html,body{min-height:100%;margin:0;background:var(--next-bg);color:var(--next-text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
img,svg,video,iframe{max-width:100%}

/* All visual page system ownership stays here. */
body:not(.exercise-active) .panel,
body:not(.exercise-active) .day-card,
body:not(.exercise-active) .developed-card,
body:not(.exercise-active) .profile-panel,
body:not(.exercise-active) .selector-panel,
body:not(.exercise-active) .week-overview-panel,
body:not(.exercise-active) .passday-panel,
body:not(.exercise-active) .data-panel,
body:not(.exercise-active) .qa-row,
body:not(.exercise-active) .test-card,
body:not(.exercise-active) .library-detail{
  border:1px solid var(--next-card-border)!important;
  border-radius:var(--next-radius-card)!important;
  background:radial-gradient(680px 260px at 88% 8%,var(--next-accent-soft),transparent 58%),linear-gradient(180deg,var(--next-surface),var(--next-surface-2))!important;
  box-shadow:var(--next-shadow-card),var(--next-glow),inset 0 1px 0 rgba(255,255,255,.04)!important;
  color:var(--next-text)!important;
}
body:not(.exercise-active) .panel-pad{padding:var(--next-card-pad)!important;}
body:not(.exercise-active) .grid,
body:not(.exercise-active) .start-grid,
body:not(.exercise-active) .qa-grid,
body:not(.exercise-active) .test-stats,
body:not(.exercise-active) .developed-cards-grid,
body:not(.exercise-active) .overview-flow-grid,
body:not(.exercise-active) .selected-day-grid{
  display:grid!important;
  gap:var(--next-card-grid-gap,var(--next-section-gap))!important;
}
body:not(.exercise-active) :is(.section-title,.calendar-card-title,.overview-list-head,.library-copy h2,.qa-top b){color:var(--next-text)!important;}
body:not(.exercise-active) :is(.muted,.hint,.small-note,.sub,.panel p,.calendar-copy small,.library-copy p,.test-history,.test-delta){color:var(--next-muted)!important;line-height:1.38!important;}

/* Unified chip fallback for remaining old chip hooks. */
body:not(.exercise-active) :is(.tag,.week-day-chips span,.selected-day-tags span,.selected-day-equipment span,.qa-meta-pills span,.library-facts span,.overview-equipment span,.overview-equipment b,.dash-focus-chips span,.week-day-stats span,.selected-day-stats,.meta){
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:var(--next-chip-h)!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  border:1px solid rgba(116,231,255,.24)!important;
  background:rgba(6,18,34,.58)!important;
  color:var(--next-text)!important;
  font-weight:850!important;
  line-height:1.05!important;
}

/* Unified button fallback for remaining old button hooks. */
body:not(.exercise-active) :is(.main-btn,.ghost-btn,.seg-btn,.profile-btn,.day-start,.day-overview,.menu-toggle,.tool-btn,.utility-pill,.next-pass-btn,.qa-open,.shortcut-btn){
  min-height:var(--next-btn-h)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border-radius:18px!important;
  border:1px solid rgba(116,231,255,.26)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.060),rgba(255,255,255,.028))!important;
  color:var(--next-text)!important;
  font-weight:900!important;
  text-decoration:none!important;
}
body:not(.exercise-active) :is(.main-btn,.day-start,.next-pass-btn,.shortcut-btn.active,.profile-btn.active,.seg-btn.active){
  border-color:var(--next-accent)!important;
  background:linear-gradient(180deg,var(--next-accent-2),#48a9ff)!important;
  color:#03101e!important;
  box-shadow:0 16px 40px rgba(110,234,255,.18)!important;
}

/* Exercise/pass system now uses same tokens but remains a deliberately separate state. */
body.exercise-active{
  background:linear-gradient(180deg,var(--next-bg),var(--next-bg-2) 58%,var(--next-bg-3))!important;
  color:var(--next-text)!important;
}
body.exercise-active :is(.video-card,.info-card,.playlist-card,.set-note,.coach-cues,.next-preview,.timer-card,.superset-status,.mini-item,.exercise-reps){
  border:1px solid var(--next-card-border)!important;
  border-radius:var(--next-radius-card-sm)!important;
  background:linear-gradient(180deg,rgba(8,22,40,.86),rgba(4,13,26,.82))!important;
  color:var(--next-text)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.exercise-active :is(.menu-toggle,.tool-btn,#prevBtn,#nextBtn,.timer-controls button,.exit-pass-btn){
  min-height:48px!important;
  border-radius:18px!important;
  border:1px solid rgba(116,231,255,.26)!important;
  background:rgba(6,18,34,.72)!important;
  color:var(--next-text)!important;
  font-weight:900!important;
}
body.exercise-active #nextBtn,
body.exercise-active .timer-controls button:first-child{
  background:linear-gradient(180deg,var(--next-accent-2),#48a9ff)!important;
  color:#03101e!important;
  border-color:var(--next-accent)!important;
}
body.exercise-active :is(.exercise-kicker .tag,.coach-cues small,.next-preview small,.timer-status,.rest-kicker){color:var(--next-accent)!important;}
body.exercise-active .sticky-nav{border-color:var(--next-card-border)!important;background:linear-gradient(180deg,rgba(5,10,19,.98),rgba(6,12,22,.95))!important;}

@media(min-width:760px){
  body:not(.exercise-active) .qa-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body:not(.exercise-active) .test-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  body:not(.exercise-active) .library-detail{grid-template-columns:1fr 1fr!important;}
}


/* =========================================================
   RC77 · Centralized regression stabilization
   Purpose:
   - Finish the ownership consolidation after RC75/76.
   - Icons, media, card internals and page modules are governed centrally.
   - No page-specific quick patches; this is a shared contract layer.
   ========================================================= */

/* ---------- Universal geometry guardrails ---------- */
*,*::before,*::after{box-sizing:border-box;}
body:not(.exercise-active) :where(.next-shell,.next-page-stack,.next-card,.next-card-content,.next-chip-row,.next-action-row,.next-calendar-row,.next-program-card,.next-profile-card,.rc18-progress-card,.rc18-today-card){min-width:0!important;}
body:not(.exercise-active) :where(.next-card,.panel,.program57-card,.profile-next-card,.calendar-card,.developed-card,.flow-card,.overview-insight-card){overflow:hidden!important;}

/* ---------- Central icon contract ----------
   Every inline app SVG is stroke-based, sized by role, never by its raw SVG box.
   This prevents black giant icons from blowing up buttons/cards after legacy CSS removal.
*/
body:not(.exercise-active) :where(svg){
  max-width:100%!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.85!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  overflow:visible!important;
}
body:not(.exercise-active) :where(svg *){
  vector-effect:non-scaling-stroke!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body:not(.exercise-active) :where(.next-button,.program57-btn,.profile-action,.main-btn,.ghost-btn,.tool-btn,.menu-toggle,.shortcut-btn,.calendar-link-btn,.day-start,.day-overview) > svg,
body:not(.exercise-active) :where(.next-button,.program57-btn,.profile-action,.main-btn,.ghost-btn,.tool-btn,.menu-toggle,.shortcut-btn,.calendar-link-btn,.day-start,.day-overview) svg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  flex:0 0 18px!important;
  color:currentColor!important;
}
body:not(.exercise-active) :where(.next-chip,.profile-next-chip,.program57-chip,.program61-equipment-chip,.signal-chip,.tag) > svg,
body:not(.exercise-active) :where(.next-chip,.profile-next-chip,.program57-chip,.program61-equipment-chip,.signal-chip,.tag) svg{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  max-width:15px!important;
  flex:0 0 15px!important;
}
body:not(.exercise-active) :where(.rc18-pass-icon,.program57-profile-icon,.program57-list-icon,.calendar-list-icon,.profile-avatar,.profile-avatar-edit,.profile-select-option,.profile-avatar-choice) svg{
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  flex:0 0 22px!important;
}
body:not(.exercise-active) .profile-avatar > svg{width:52%!important;height:52%!important;max-width:72px!important;max-height:72px!important;}
body:not(.exercise-active) .profile-avatar-edit > svg{width:21px!important;height:21px!important;max-width:21px!important;max-height:21px!important;}
body:not(.exercise-active) .app-profile-toggle svg{width:58%!important;height:58%!important;max-width:34px!important;max-height:34px!important;}
body:not(.exercise-active) .rc18-pass-icon svg{width:25px!important;height:25px!important;max-width:25px!important;max-height:25px!important;}
body:not(.exercise-active) .calendar-list-icon svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;}
body:not(.exercise-active) .program57-list-icon svg,
body:not(.exercise-active) .program57-profile-icon svg{width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important;}

/* ---------- Central button/chip text contract ---------- */
body:not(.exercise-active) .next-button{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.08!important;
  gap:8px!important;
}
body:not(.exercise-active) .next-button span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body:not(.exercise-active) .next-chip{min-width:0!important;max-width:100%!important;white-space:nowrap!important;}
body:not(.exercise-active) .next-chip span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body:not(.exercise-active) .next-chip-row{align-items:center!important;}
body:not(.exercise-active) .next-action-row{align-items:stretch!important;}

/* ---------- Dashboard ownership hardening ---------- */
body:not(.exercise-active) #startScreen .hero{display:block!important;}
body:not(.exercise-active) #startScreen .showcase-grid{width:100%!important;}
body:not(.exercise-active) #startScreen .showcase-copy{min-width:0!important;}
body:not(.exercise-active) #progressDashboard,
body:not(.exercise-active) #quickStatsGrid{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .rc18-today-card{width:100%!important;}
body:not(.exercise-active) .rc18-today-copy{min-width:0!important;}
body:not(.exercise-active) .rc18-today-copy h2,
body:not(.exercise-active) .rc18-today-copy p,
body:not(.exercise-active) .rc18-today-meta{min-width:0!important;overflow-wrap:anywhere!important;}
body:not(.exercise-active) .rc18-progress-card{width:100%!important;align-items:stretch!important;}
body:not(.exercise-active) .rc18-progress-main{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .rc18-kpi-grid{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .rc18-kpi-cell{min-width:0!important;}
body:not(.exercise-active) .rc18-kpi-cell > div:last-child{min-width:0!important;}
body:not(.exercise-active) .rc18-kpi-value{overflow:hidden!important;text-overflow:ellipsis!important;}

@media(max-width:760px){
  body:not(.exercise-active) #startScreen .showcase-grid{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .rc18-progress-card{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .rc18-progress-main{grid-template-columns:120px minmax(0,1fr)!important;align-items:center!important;}
  body:not(.exercise-active) .rc18-ring-xl{width:120px!important;height:120px!important;}
  body:not(.exercise-active) .rc18-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:420px){
  body:not(.exercise-active) .rc18-progress-main{grid-template-columns:1fr!important;justify-items:start!important;}
  body:not(.exercise-active) .rc18-kpi-grid{grid-template-columns:1fr 1fr!important;}
  body:not(.exercise-active) .rc18-kpi-cell{grid-template-columns:auto minmax(0,1fr)!important;}
  body:not(.exercise-active) .rc18-ring-sm{width:52px!important;height:52px!important;font-size:14px!important;}
}

/* ---------- Program ownership hardening ---------- */
body:not(.exercise-active) .program57-card,
body:not(.exercise-active) .program57-list-card{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .program57-card-content,
body:not(.exercise-active) .program57-list-main{min-width:0!important;}
body:not(.exercise-active) .program57-card-content{max-width:100%!important;}
body:not(.exercise-active) .program57-card-img{pointer-events:none!important;}
body:not(.exercise-active) .program57-actions,
body:not(.exercise-active) .program57-list-actions,
body:not(.exercise-active) .program59-modal-actions{width:100%!important;}
body:not(.exercise-active) .program57-actions .next-button,
body:not(.exercise-active) .program57-list-actions .next-button{min-height:48px!important;}
body:not(.exercise-active) .program57-preview{grid-column:1/-1!important;min-width:0!important;width:100%!important;}
body:not(.exercise-active) .program61-preview-box{width:100%!important;}
body:not(.exercise-active) .program61-preview-summary{grid-template-columns:1fr 1fr!important;align-items:start!important;}
body:not(.exercise-active) .program61-equipment-list{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
body:not(.exercise-active) .program61-exercise-list{display:grid!important;gap:9px!important;}
@media(max-width:760px){
  body:not(.exercise-active) .next-program-card-list{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .program57-list-icon{display:none!important;}
  body:not(.exercise-active) .program57-list-actions{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .program61-preview-summary{grid-template-columns:1fr!important;}
}

/* ---------- Profile ownership hardening ---------- */
body:not(.exercise-active) .profile-active-grid{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .profile-active-main{min-width:0!important;}
body:not(.exercise-active) .profile-active-main h2{overflow-wrap:anywhere!important;}
body:not(.exercise-active) .profile-action-grid{display:grid!important;gap:10px!important;align-items:stretch!important;}
body:not(.exercise-active) .profile-action-grid.three{grid-template-columns:1fr 1fr!important;}
body:not(.exercise-active) .profile-action-grid.three .primary{grid-column:1/-1!important;}
body:not(.exercise-active) .profile-action{min-height:52px!important;padding:12px 14px!important;}
body:not(.exercise-active) .profile-summary-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;}
body:not(.exercise-active) .profile-rebuild-chip-grid{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
body:not(.exercise-active) .profile-select-grid{display:grid!important;gap:10px!important;}
body:not(.exercise-active) .profile-select-option,
body:not(.exercise-active) .profile-avatar-choice{min-width:0!important;}
body:not(.exercise-active) .profile-select-option svg,
body:not(.exercise-active) .profile-avatar-choice svg{width:20px!important;height:20px!important;}

/* ---------- Calendar ownership hardening ---------- */
body:not(.exercise-active) #calendarScreen > .calendar-screen-bg{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;object-fit:cover!important;z-index:0!important;opacity:.22!important;pointer-events:none!important;}
body:not(.exercise-active) .next-calendar-plan-card{width:100%!important;}
body:not(.exercise-active) .next-calendar-row-head{min-width:0!important;}
body:not(.exercise-active) .next-calendar-copy{min-width:0!important;}
body:not(.exercise-active) .next-calendar-hero{min-width:0!important;display:grid!important;gap:10px!important;}
body:not(.exercise-active) .next-calendar-hero :where(h1,h2,h3,p,div,span){max-width:100%!important;overflow-wrap:anywhere!important;}
@media(max-width:420px){
  body:not(.exercise-active) .next-calendar-row-head{grid-template-columns:auto minmax(0,1fr) auto!important;}
  body:not(.exercise-active) .next-calendar-day{font-size:11px!important;padding-inline:8px!important;}
}

/* ---------- Overview / active pass preview ownership hardening ---------- */
body:not(.exercise-active) .overview-flow-grid,
body:not(.exercise-active) .developed-cards-grid,
body:not(.exercise-active) .overview-list{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .flow-card,
body:not(.exercise-active) .developed-card,
body:not(.exercise-active) .overview-insight-card,
body:not(.exercise-active) .overview-list article{min-width:0!important;}
body:not(.exercise-active) :where(.flow-card,.developed-card,.overview-insight-card,.overview-list article) svg{width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important;}
body:not(.exercise-active) .overview-list :where(h2,h3,p,span,div){max-width:100%!important;overflow-wrap:anywhere!important;}

/* ---------- Active exercise player stabilization ---------- */
body.exercise-active :where(svg){max-width:100%;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;}
body.exercise-active :where(.next-button,.tag,.menu-toggle,.tool-btn,.main-btn,.ghost-btn) svg{width:18px;height:18px;flex:0 0 18px;}
body.exercise-active .stage-layout{min-width:0;}
body.exercise-active .info-card,
body.exercise-active .video-card,
body.exercise-active .playlist-card{min-width:0;}


/* =========================================================
   RC78 · Structural centralization
   Rebuilds dashboard/overview/edit profile surfaces with canonical
   system classes instead of legacy visual contracts.
   ========================================================= */
body:not(.exercise-active) .next-dashboard-shell{
  position:relative!important;
  isolation:isolate!important;
}
body:not(.exercise-active)[data-screen="startScreen"] .next-dashboard-shell::before,
body:not(.exercise-active)[data-screen="calendarScreen"] .next-calendar-shell::before,
body:not(.exercise-active)[data-screen="profileScreen"] .next-profile-shell::before{
  content:""!important;
  position:fixed!important;
  inset:0!important;
  z-index:-1!important;
  pointer-events:none!important;
  background-size:cover!important;
  background-position:center!important;
  opacity:.34!important;
  filter:saturate(1.1) brightness(.9) contrast(1.08)!important;
}
body:not(.exercise-active)[data-screen="startScreen"] .next-dashboard-shell::before{background-image:url('../img/v93/hero/hero-dashboard.webp')!important;}
body:not(.exercise-active)[data-screen="calendarScreen"] .next-calendar-shell::before{background-image:url('../img/hero/futuristic_energy_in_motion_design.png')!important;opacity:.24!important;}
body:not(.exercise-active)[data-screen="profileScreen"] .next-profile-shell::before{background-image:url('../img/v93/visual-anchor.webp')!important;opacity:.16!important;}
body:not(.exercise-active) #startScreen > .dashboard-global-bg-img,
body:not(.exercise-active) #calendarScreen > .calendar-screen-bg,
body:not(.exercise-active) #profileScreen > .profile-screen-bg,
body:not(.exercise-active) > .dashboard-viewport-bg-img{display:none!important;opacity:0!important;}

.next-dashboard-root{display:grid!important;gap:var(--next-section-gap)!important;}
.next-dashboard-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;gap:var(--next-section-gap)!important;align-items:stretch!important;}
.next-dashboard-header .next-page-title span{color:var(--next-accent)!important;}
.next-dashboard-pass-card,.next-dashboard-progress-card{display:grid!important;gap:14px!important;align-content:start!important;}
.next-dashboard-pass-card{grid-template-columns:auto minmax(0,1fr)!important;}
.next-card-icon{width:44px!important;height:44px!important;border:1px solid var(--next-card-border)!important;border-radius:999px!important;display:grid!important;place-items:center!important;color:var(--next-accent)!important;background:rgba(6,20,38,.52)!important;}
.next-card-icon svg{width:24px!important;height:24px!important;}
.next-progress-summary{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:16px!important;align-items:center!important;}
.next-progress-ring{--p:0;width:118px!important;height:118px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:conic-gradient(var(--next-accent) calc(var(--p)*1%), rgba(9,33,58,.72) 0)!important;position:relative!important;flex:0 0 auto!important;}
.next-progress-ring::before{content:""!important;position:absolute!important;inset:14px!important;border-radius:inherit!important;background:rgba(2,8,18,.94)!important;box-shadow:inset 0 0 24px rgba(0,0,0,.35)!important;}
.next-progress-ring span{position:relative!important;z-index:1!important;font-size:28px!important;font-weight:950!important;color:var(--next-text)!important;}
.next-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;}
.next-kpi{min-width:0!important;border:1px solid rgba(116,231,255,.18)!important;border-radius:18px!important;padding:12px!important;background:rgba(3,13,27,.46)!important;color:var(--next-text)!important;text-align:left!important;display:grid!important;gap:4px!important;}
.next-kpi b{font-size:clamp(20px,4.8vw,30px)!important;line-height:1!important;}
.next-kpi span{font-size:12px!important;color:var(--next-muted)!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.08em!important;}
.next-kpi-button{cursor:pointer!important;}
.next-option-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(126px,1fr))!important;gap:10px!important;}
.next-option-button{min-width:0!important;min-height:48px!important;border:1px solid rgba(116,231,255,.20)!important;border-radius:18px!important;background:rgba(6,18,34,.58)!important;color:var(--next-text)!important;display:flex!important;align-items:center!important;gap:8px!important;padding:10px 12px!important;font-weight:850!important;text-align:left!important;overflow:hidden!important;}
.next-option-button.selected,.next-option-button.active{border-color:var(--next-card-border-strong)!important;color:var(--next-accent)!important;background:linear-gradient(180deg,rgba(104,234,255,.18),rgba(6,18,34,.60))!important;box-shadow:0 0 20px rgba(0,210,255,.10)!important;}
.next-option-button svg{width:20px!important;height:20px!important;flex:0 0 20px!important;}
.next-input{width:100%!important;min-height:48px!important;border-radius:16px!important;border:1px solid rgba(116,231,255,.22)!important;background:rgba(4,12,25,.64)!important;color:var(--next-text)!important;padding:12px 14px!important;font:inherit!important;font-weight:850!important;}
.next-muted{color:var(--next-muted)!important;}

/* Calendar action/button contract */
.next-phase-week-selector{display:grid!important;gap:8px!important;min-width:min(100%,310px)!important;}
.next-pw-row{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:8px!important;align-items:center!important;}
.next-pw-current{display:grid!important;gap:1px!important;min-width:60px!important;color:var(--next-muted)!important;font-size:10px!important;text-transform:uppercase!important;letter-spacing:.08em!important;font-weight:900!important;}
.next-pw-options{display:flex!important;flex-wrap:wrap!important;gap:6px!important;justify-content:flex-end!important;}
.next-pw-btn{min-height:30px!important;min-width:38px!important;border-radius:999px!important;border:1px solid rgba(116,231,255,.22)!important;background:rgba(6,18,34,.58)!important;color:var(--next-text)!important;font-weight:900!important;font-size:12px!important;padding:5px 10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;}
.next-pw-btn.is-selected{background:linear-gradient(180deg,rgba(104,234,255,.22),rgba(6,18,34,.72))!important;border-color:var(--next-card-border-strong)!important;color:var(--next-accent)!important;}
.next-expand-actions .next-button{min-height:44px!important;}

/* Overview rebuilt surface */
.next-overview-root{display:grid!important;gap:var(--next-section-gap)!important;}
.next-overview-hero{display:grid!important;gap:14px!important;}
.next-overview-return-row{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;}
.next-equipment-panel{padding:14px!important;border-radius:20px!important;background:rgba(3,13,27,.36)!important;}
.next-overview-layout{display:grid!important;gap:12px!important;}
.next-overview-block-list{display:grid!important;gap:10px!important;}
.next-overview-block{padding:0!important;overflow:hidden!important;}
.next-overview-block>summary{list-style:none!important;cursor:pointer!important;display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:14px!important;}
.next-overview-block>summary::-webkit-details-marker{display:none!important;}
.next-overview-index{width:34px!important;height:34px!important;border-radius:12px!important;border:1px solid var(--next-card-border)!important;display:grid!important;place-items:center!important;font-weight:950!important;color:var(--next-accent)!important;background:rgba(6,20,38,.52)!important;}
.next-overview-block-icon{width:34px!important;height:34px!important;border-radius:12px!important;border:1px solid rgba(116,231,255,.18)!important;display:grid!important;place-items:center!important;color:var(--next-accent)!important;}
.next-overview-block-icon svg,.next-overview-block-icon i{width:20px!important;height:20px!important;font-size:18px!important;}
.next-overview-block summary b{display:block!important;font-size:18px!important;color:var(--next-text)!important;line-height:1.05!important;}
.next-overview-block summary small{display:block!important;color:var(--next-muted)!important;font-weight:750!important;margin-top:3px!important;}
.next-overview-block summary i{font-style:normal!important;color:var(--next-accent)!important;font-size:24px!important;transition:transform .16s ease!important;}
.next-overview-block[open] summary i{transform:rotate(90deg)!important;}
.next-overview-block-body{border-top:1px solid rgba(116,231,255,.12)!important;padding:12px!important;display:grid!important;gap:10px!important;}
.next-overview-group{border:1px solid rgba(116,231,255,.12)!important;border-radius:16px!important;overflow:hidden!important;background:rgba(4,14,28,.40)!important;}
.next-overview-group-head{display:flex!important;justify-content:space-between!important;gap:10px!important;padding:10px 12px!important;background:rgba(7,28,50,.52)!important;}
.next-overview-group-head b{color:var(--next-accent)!important;text-transform:uppercase!important;letter-spacing:.12em!important;font-size:12px!important;}
.next-overview-group-head span{color:var(--next-muted)!important;font-size:12px!important;font-weight:800!important;}
.next-overview-group ul{list-style:none!important;margin:0!important;padding:0!important;display:grid!important;}
.next-overview-group li{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;padding:10px 12px!important;border-top:1px solid rgba(116,231,255,.08)!important;}
.next-ex-code{min-height:28px!important;border-radius:10px!important;border:1px solid rgba(116,231,255,.20)!important;display:grid!important;place-items:center!important;color:var(--next-accent)!important;font-weight:950!important;}
.next-overview-group li b{overflow:hidden!important;text-overflow:ellipsis!important;}
.next-overview-group li small{color:var(--next-muted)!important;font-weight:850!important;}
.next-checklist-card h3{margin:4px 0 10px!important;font-size:24px!important;}
.next-check-grid{display:grid!important;gap:8px!important;}
.next-check-item{border:1px solid rgba(116,231,255,.12)!important;border-radius:16px!important;padding:10px 12px!important;background:rgba(4,14,28,.40)!important;display:grid!important;gap:4px!important;}
.next-check-item span{color:var(--next-muted)!important;}

/* Profile edit canonical form */
.next-profile-edit-page{display:grid!important;gap:var(--next-section-gap)!important;}
.next-edit-card{display:grid!important;gap:12px!important;}
.next-form-grid{display:grid!important;gap:12px!important;}
.next-field{display:grid!important;gap:8px!important;}
.next-field>span{display:flex!important;align-items:center!important;gap:8px!important;color:var(--next-muted)!important;font-weight:900!important;}
.next-field svg{width:18px!important;height:18px!important;}
.next-program-compact{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;}
.next-program-compact>div:first-child{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.next-sticky-actions{position:sticky!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;z-index:60!important;background:linear-gradient(180deg,rgba(2,8,18,.15),rgba(2,8,18,.82))!important;padding-top:8px!important;}

@media(max-width:760px){
  .next-dashboard-grid{grid-template-columns:1fr!important;}
  .next-dashboard-pass-card{grid-template-columns:1fr!important;}
  .next-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .next-progress-summary{grid-template-columns:1fr!important;text-align:left!important;}
  .next-progress-ring{width:104px!important;height:104px!important;}
  .next-pw-row{grid-template-columns:1fr!important;}
  .next-pw-options{justify-content:flex-start!important;}
  .next-overview-group li{grid-template-columns:34px minmax(0,1fr)!important;}
  .next-overview-group li small{grid-column:2!important;}
  .next-program-compact{grid-template-columns:1fr!important;}
  .next-sticky-actions{grid-template-columns:1fr 1fr!important;}
}

/* =========================================================
   RC79 · Remaining surface standardization
   Purpose: not a quickfix. Centralizes the last messy surfaces:
   - icon registry/render contract
   - calendar expanded session detail
   - pass overview hero + equipment
   - edit profile form rhythm
   - dashboard/progress containment
   ========================================================= */

/* ---------- Canonical icon contract ---------- */
body:not(.exercise-active) :is(.next-button,.next-chip,.next-option-button,.next-list-row,.next-calendar-row-head,.next-overview-block, .next-field) svg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  flex:0 0 18px!important;
  display:block!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.75!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body:not(.exercise-active) .next-card-icon svg,
body:not(.exercise-active) .calendar-list-icon svg,
body:not(.exercise-active) .next-overview-block-icon svg{
  width:22px!important;
  height:22px!important;
  max-width:22px!important;
  max-height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
}
body:not(.exercise-active) .profile-avatar svg{
  width:52%!important;
  height:52%!important;
  max-width:72px!important;
  max-height:72px!important;
}
body:not(.exercise-active) .profile-avatar-edit svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;}

/* ---------- Action row contract ---------- */
body:not(.exercise-active) .next-action-row{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;
  gap:10px!important;
  align-items:stretch!important;
}
body:not(.exercise-active) .next-action-row .next-button{width:100%!important;min-width:0!important;}
body:not(.exercise-active) .next-button{
  min-width:0!important;
  white-space:normal!important;
  text-align:center!important;
  line-height:1.12!important;
  padding:12px 14px!important;
}
body:not(.exercise-active) .next-button span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}

/* ---------- Dashboard containment ---------- */
body:not(.exercise-active) .next-dashboard-grid{align-items:stretch!important;}
body:not(.exercise-active) .next-dashboard-pass-card,
body:not(.exercise-active) .next-dashboard-progress-card{
  min-width:0!important;
  overflow:hidden!important;
}
body:not(.exercise-active) .next-progress-summary{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:18px!important;
  align-items:center!important;
}
body:not(.exercise-active) .next-progress-summary h2{margin:0!important;font-size:clamp(28px,4vw,44px)!important;line-height:1!important;}
body:not(.exercise-active) .next-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
body:not(.exercise-active) .next-kpi{
  min-width:0!important;
  border:1px solid rgba(116,231,255,.18)!important;
  border-radius:16px!important;
  background:rgba(4,14,28,.42)!important;
  padding:12px!important;
  display:grid!important;
  gap:3px!important;
  align-content:center!important;
}
body:not(.exercise-active) .next-kpi b{font-size:clamp(22px,3vw,32px)!important;line-height:1!important;}
body:not(.exercise-active) .next-kpi span{text-transform:uppercase!important;letter-spacing:.08em!important;color:var(--next-muted)!important;font-size:11px!important;font-weight:900!important;}

/* ---------- Calendar expanded detail: one clean component ---------- */
body:not(.exercise-active) .next-calendar-hero{padding:0!important;background:transparent!important;border-top:1px solid rgba(116,231,255,.12)!important;}
body:not(.exercise-active) .next-calendar-expand{
  position:relative!important;
  isolation:isolate!important;
  min-height:auto!important;
  display:grid!important;
  gap:12px!important;
  padding:16px!important;
  overflow:hidden!important;
  border-radius:0 0 18px 18px!important;
  background:linear-gradient(180deg,rgba(3,12,24,.66),rgba(3,11,21,.42))!important;
}
body:not(.exercise-active) .next-calendar-expand::before{
  content:''!important;
  position:absolute!important;
  inset:0!important;
  z-index:-1!important;
  background-image:var(--entry-img)!important;
  background-size:cover!important;
  background-position:center!important;
  opacity:.12!important;
  filter:saturate(1.05) brightness(.55)!important;
}
body:not(.exercise-active) .next-expand-copy{
  display:grid!important;
  gap:10px!important;
  min-width:0!important;
  max-width:760px!important;
}
body:not(.exercise-active) .next-expand-kicker{
  color:var(--next-accent)!important;
  text-transform:uppercase!important;
  letter-spacing:.18em!important;
  font-size:12px!important;
  font-weight:950!important;
}
body:not(.exercise-active) .next-expand-copy h3{
  margin:0!important;
  font-size:clamp(26px,5vw,42px)!important;
  line-height:.98!important;
  letter-spacing:-.04em!important;
}
body:not(.exercise-active) .next-expand-copy p{
  margin:0!important;
  max-width:58ch!important;
  color:var(--next-text)!important;
  line-height:1.38!important;
}
body:not(.exercise-active) .next-expand-chips{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
body:not(.exercise-active) .next-expand-chips span{
  display:inline-flex!important;
  align-items:center!important;
  min-height:30px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  border:1px solid rgba(116,231,255,.22)!important;
  background:rgba(6,18,34,.58)!important;
  color:var(--next-text)!important;
  font-weight:850!important;
  font-size:12px!important;
}
body:not(.exercise-active) .next-expand-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  max-width:620px!important;
}
body:not(.exercise-active) .next-expand-day{display:none!important;}

/* ---------- Calendar compact row guardrails ---------- */
body:not(.exercise-active) .next-calendar-row{overflow:hidden!important;}
body:not(.exercise-active) .next-calendar-row-head{min-width:0!important;}
body:not(.exercise-active) .next-calendar-copy{min-width:0!important;}
body:not(.exercise-active) .next-calendar-copy b,
body:not(.exercise-active) .next-calendar-copy small{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}

/* ---------- Pass overview: central hero/detail contract ---------- */
body:not(.exercise-active) .next-overview-root{display:grid!important;gap:var(--next-section-gap)!important;}
body:not(.exercise-active) .next-overview-hero{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
  padding:var(--next-card-pad)!important;
  overflow:hidden!important;
}
body:not(.exercise-active) .next-overview-hero .next-page-title{
  max-width:100%!important;
  margin:0!important;
  font-size:clamp(46px,8vw,74px)!important;
  line-height:.88!important;
  overflow-wrap:normal!important;
}
body:not(.exercise-active) .next-overview-hero .next-page-subtitle{
  max-width:62ch!important;
  margin:0!important;
  color:var(--next-muted)!important;
  font-size:clamp(17px,2.6vw,23px)!important;
  line-height:1.3!important;
}
body:not(.exercise-active) .next-overview-return-row{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
body:not(.exercise-active) .next-overview-return-row .next-button{width:auto!important;min-width:180px!important;}
body:not(.exercise-active) .next-equipment-panel{
  width:100%!important;
  padding:14px!important;
  border-radius:20px!important;
  background:rgba(4,14,28,.40)!important;
  box-shadow:none!important;
}
body:not(.exercise-active) .next-overview-layout{
  display:grid!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
}
body:not(.exercise-active) .next-overview-block-list{display:grid!important;gap:10px!important;}
body:not(.exercise-active) .next-overview-block>summary{min-width:0!important;}
body:not(.exercise-active) .next-overview-block summary b,
body:not(.exercise-active) .next-overview-block summary small{overflow:hidden!important;text-overflow:ellipsis!important;}
body:not(.exercise-active) .next-checklist-card{padding:var(--next-card-pad)!important;overflow:hidden!important;}
body:not(.exercise-active) .next-check-grid{display:grid!important;gap:10px!important;}
body:not(.exercise-active) .next-check-item{border:1px solid rgba(116,231,255,.14)!important;border-radius:16px!important;background:rgba(3,12,24,.34)!important;padding:12px!important;display:grid!important;gap:4px!important;}
body:not(.exercise-active) .next-check-item b{font-size:16px!important;}
body:not(.exercise-active) .next-check-item span{color:var(--next-muted)!important;line-height:1.35!important;}

/* ---------- Edit profile: central form surface ---------- */
body:not(.exercise-active) .next-profile-edit-page{display:grid!important;gap:var(--next-section-gap)!important;}
body:not(.exercise-active) .next-profile-edit-header{
  display:grid!important;
  gap:10px!important;
  max-width:100%!important;
}
body:not(.exercise-active) .next-inline-back{width:max-content!important;min-width:180px!important;}
body:not(.exercise-active) .next-edit-card{
  display:grid!important;
  gap:14px!important;
  padding:var(--next-card-pad)!important;
  overflow:hidden!important;
}
body:not(.exercise-active) .next-form-grid{display:grid!important;gap:14px!important;}
body:not(.exercise-active) .next-field{
  display:grid!important;
  gap:8px!important;
  min-width:0!important;
}
body:not(.exercise-active) .next-field>span{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  color:var(--next-muted)!important;
  font-weight:900!important;
}
body:not(.exercise-active) .next-input{
  width:100%!important;
  min-height:50px!important;
  border-radius:16px!important;
  border:1px solid rgba(116,231,255,.22)!important;
  background:rgba(3,12,24,.56)!important;
  color:var(--next-text)!important;
  padding:12px 14px!important;
  font:inherit!important;
  font-weight:850!important;
}
body:not(.exercise-active) .next-option-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;
  gap:10px!important;
  min-width:0!important;
}
body:not(.exercise-active) .next-option-button{
  min-height:52px!important;
  border-radius:16px!important;
  border:1px solid rgba(116,231,255,.20)!important;
  background:rgba(4,14,28,.48)!important;
  color:var(--next-text)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  padding:12px 14px!important;
  font-weight:900!important;
  min-width:0!important;
}
body:not(.exercise-active) .next-option-button.selected{
  border-color:var(--next-card-border-strong)!important;
  color:var(--next-accent)!important;
  background:linear-gradient(180deg,rgba(104,234,255,.16),rgba(5,16,32,.52))!important;
}
body:not(.exercise-active) .next-option-button span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body:not(.exercise-active) .next-sticky-actions{
  position:sticky!important;
  bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
  z-index:20!important;
  padding:10px!important;
  border-radius:22px!important;
  border:1px solid rgba(116,231,255,.18)!important;
  background:rgba(3,10,22,.88)!important;
  -webkit-backdrop-filter:blur(16px) saturate(125%)!important;
  backdrop-filter:blur(16px) saturate(125%)!important;
}

@media(max-width:760px){
  body:not(.exercise-active) .next-dashboard-grid,
  body:not(.exercise-active) .next-progress-summary,
  body:not(.exercise-active) .next-expand-actions,
  body:not(.exercise-active) .next-kpi-grid{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .next-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body:not(.exercise-active) .next-calendar-row-head{grid-template-columns:auto minmax(0,1fr) auto!important;}
  body:not(.exercise-active) .calendar-list-icon{display:none!important;}
  body:not(.exercise-active) .calendar-list-status{display:none!important;}
  body:not(.exercise-active) .next-calendar-copy b,
  body:not(.exercise-active) .next-calendar-copy small{white-space:normal!important;}
  body:not(.exercise-active) .next-overview-hero .next-page-title{font-size:clamp(44px,13vw,62px)!important;}
  body:not(.exercise-active) .next-overview-return-row .next-button,
  body:not(.exercise-active) .next-inline-back{width:100%!important;min-width:0!important;}
  body:not(.exercise-active) .next-action-row{grid-template-columns:1fr!important;}
  body:not(.exercise-active) .next-option-grid{grid-template-columns:1fr!important;}
}


/* =========================================================
   RC80 · Dashboard layout + overview/profile edit refinement
   Central system ownership only:
   - Dashboard hero/pass two-column top row
   - Progress/KPI meter grid restored
   - Overview width/centering normalized
   - Edit Profile program tail removed in markup; form rhythm guarded here
   ========================================================= */

body:not(.exercise-active) .next-dashboard-root{
  width:min(100%,var(--next-content-max,1040px))!important;
  margin-inline:auto!important;
  display:grid!important;
  gap:clamp(18px,3vw,30px)!important;
}
body:not(.exercise-active) .next-dashboard-hero-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(320px,.82fr)!important;
  gap:clamp(18px,4vw,36px)!important;
  align-items:end!important;
}
body:not(.exercise-active) .next-dashboard-hero-grid .next-dashboard-header{
  align-self:end!important;
  min-width:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body:not(.exercise-active) .next-dashboard-header .next-page-title{
  max-width:9.8ch!important;
  margin-block:0!important;
  font-size:clamp(58px,7.3vw,96px)!important;
  line-height:.86!important;
}
body:not(.exercise-active) .next-dashboard-header .next-page-subtitle{
  max-width:34ch!important;
  margin-top:10px!important;
  font-size:clamp(16px,1.8vw,22px)!important;
  font-weight:850!important;
}
body:not(.exercise-active) .next-dashboard-pass-card{
  align-self:end!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:14px!important;
  min-height:0!important;
  padding:clamp(18px,2.8vw,26px)!important;
}
body:not(.exercise-active) .next-dashboard-pass-card h2{
  margin:4px 0 6px!important;
  font-size:clamp(24px,3.2vw,36px)!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
body:not(.exercise-active) .next-dashboard-pass-card .next-card-content{
  display:grid!important;
  gap:10px!important;
  min-width:0!important;
}
body:not(.exercise-active) .next-dashboard-pass-card p{
  margin:0!important;
  max-width:38ch!important;
}
body:not(.exercise-active) .next-dashboard-pass-card .next-action-row{
  grid-template-columns:1fr 1fr!important;
  margin-top:4px!important;
}
body:not(.exercise-active) .next-dashboard-progress-card{
  display:grid!important;
  gap:18px!important;
  padding:clamp(20px,3vw,28px)!important;
  min-height:0!important;
}
body:not(.exercise-active) .next-progress-summary{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:clamp(18px,3vw,28px)!important;
}
body:not(.exercise-active) .next-progress-copy{
  display:grid!important;
  gap:8px!important;
}
body:not(.exercise-active) .next-progress-copy h2{
  margin:0!important;
  font-size:clamp(32px,4.4vw,56px)!important;
  line-height:.98!important;
  letter-spacing:-.045em!important;
}
body:not(.exercise-active) .next-progress-ring{
  --ring:132px;
  width:var(--ring)!important;
  height:var(--ring)!important;
  min-width:var(--ring)!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:
    radial-gradient(circle at 50% 50%,rgba(2,8,18,.96) 0 51%,transparent 52%),
    conic-gradient(var(--next-accent) calc(var(--p)*1%),rgba(5,30,58,.74) 0)!important;
  box-shadow:inset 0 0 0 12px rgba(0,22,46,.46),0 0 30px rgba(0,210,255,.10)!important;
}
body:not(.exercise-active) .next-progress-ring span{
  color:#fff!important;
  font-size:clamp(24px,3.2vw,34px)!important;
  font-weight:950!important;
}
body:not(.exercise-active) .next-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
body:not(.exercise-active) .next-kpi{
  min-height:78px!important;
  border:1px solid rgba(116,231,255,.18)!important;
  border-radius:18px!important;
  background:rgba(3,12,24,.38)!important;
  padding:12px!important;
  display:grid!important;
  align-items:center!important;
  gap:8px!important;
  color:var(--next-text)!important;
}
body:not(.exercise-active) .next-kpi-meter{
  grid-template-columns:auto minmax(0,1fr)!important;
}
body:not(.exercise-active) .next-mini-ring{
  --ring:54px;
  width:var(--ring)!important;
  height:var(--ring)!important;
  min-width:var(--ring)!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:
    radial-gradient(circle at 50% 50%,rgba(2,8,18,.98) 0 54%,transparent 55%),
    conic-gradient(var(--next-accent) calc(var(--p)*1%),rgba(5,30,58,.75) 0)!important;
  box-shadow:inset 0 0 0 7px rgba(0,22,46,.52)!important;
}
body:not(.exercise-active) .next-mini-ring span{
  font-size:13px!important;
  font-weight:950!important;
  color:#fff!important;
}
body:not(.exercise-active) .next-kpi b{
  display:block!important;
  margin:0!important;
  color:#fff!important;
  font-size:clamp(22px,2.6vw,32px)!important;
  line-height:1!important;
  letter-spacing:-.035em!important;
}
body:not(.exercise-active) .next-kpi span{
  display:block!important;
  color:var(--next-muted)!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-size:11px!important;
  font-weight:950!important;
}
body:not(.exercise-active) .next-kpi-button{
  grid-template-columns:auto minmax(0,1fr)!important;
  text-align:left!important;
  cursor:pointer!important;
}
body:not(.exercise-active) .next-kpi-icon{
  width:54px!important;
  height:54px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(116,231,255,.22)!important;
  color:var(--next-accent)!important;
  background:rgba(8,28,48,.55)!important;
}
body:not(.exercise-active) .next-kpi-icon svg{
  width:22px!important;
  height:22px!important;
}

/* Calendar-launched overview should align with the same content rail as dashboard/profile/program. */
body:not(.exercise-active) #overviewScreen .next-overview-root,
body:not(.exercise-active) #overviewScreen .next-overview-hero,
body:not(.exercise-active) #overviewScreen .next-overview-layout{
  width:min(100%,var(--next-content-max,1040px))!important;
  max-width:var(--next-content-max,1040px)!important;
  margin-inline:auto!important;
}
body:not(.exercise-active) #overviewScreen .next-overview-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:14px!important;
}
body:not(.exercise-active) #overviewScreen .next-overview-hero .next-equipment-panel{
  max-width:100%!important;
}
body:not(.exercise-active) #overviewScreen .next-overview-layout{
  display:grid!important;
  gap:14px!important;
}
body:not(.exercise-active) #overviewScreen .next-checklist-card{
  overflow:hidden!important;
}

/* Edit profile: no program tail; keep form sections as equal-width cards. */
body:not(.exercise-active) .next-profile-edit-page{
  width:min(100%,var(--next-content-max,1040px))!important;
  margin-inline:auto!important;
}
body:not(.exercise-active) .next-profile-edit-page .next-edit-card{
  width:100%!important;
}
body:not(.exercise-active) .next-profile-edit-page .next-sticky-actions{
  width:100%!important;
}

/* Slightly tighter action button icons after SVG registry pass. */
body:not(.exercise-active) .next-button svg{
  margin-inline-end:2px!important;
}

@media(max-width:760px){
  body:not(.exercise-active) .next-dashboard-hero-grid{
    grid-template-columns:1fr!important;
    align-items:start!important;
  }
  body:not(.exercise-active) .next-dashboard-header .next-page-title{
    max-width:10ch!important;
    font-size:clamp(52px,15vw,72px)!important;
  }
  body:not(.exercise-active) .next-dashboard-pass-card{
    grid-template-columns:1fr!important;
  }
  body:not(.exercise-active) .next-dashboard-pass-card .next-action-row{
    grid-template-columns:1fr 1fr!important;
  }
  body:not(.exercise-active) .next-progress-summary{
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:14px!important;
  }
  body:not(.exercise-active) .next-progress-ring{
    --ring:112px;
  }
  body:not(.exercise-active) .next-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body:not(.exercise-active) .next-kpi{
    min-height:74px!important;
  }
}
@media(max-width:430px){
  body:not(.exercise-active) .next-progress-summary{
    grid-template-columns:1fr!important;
  }
  body:not(.exercise-active) .next-dashboard-pass-card .next-action-row{
    grid-template-columns:1fr!important;
  }
  body:not(.exercise-active) .next-mini-ring{
    --ring:48px;
  }
}


/* =========================================================
   RC81 · Overview header alignment + per-screen background ownership
   Fixes:
   - Overview heading should align like other page headers, not feel inset.
   - Calendar background uses the proper calendar artwork, without a wrong overlay.
   - Program and Overview now receive explicit screen-appropriate background imagery.
   - Background ownership remains centralized in next-system.css.
   ========================================================= */

/* Extend shell background ownership to overview and program screens. */
body:not(.exercise-active)[data-screen="programScreen"] .next-program-shell,
body:not(.exercise-active)[data-screen="overviewScreen"] .next-overview-shell{
  position:relative!important;
  isolation:isolate!important;
}
body:not(.exercise-active)[data-screen="programScreen"] .next-program-shell::before,
body:not(.exercise-active)[data-screen="overviewScreen"] .next-overview-shell::before{
  content:""!important;
  position:fixed!important;
  inset:0!important;
  z-index:-1!important;
  pointer-events:none!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  filter:saturate(1.08) brightness(.86) contrast(1.05)!important;
}
body:not(.exercise-active)[data-screen="calendarScreen"] .next-calendar-shell::before{
  background-image:url('../img/v96/calendar/calendar-bg-coach-tactics.png')!important;
  background-position:center right!important;
  opacity:.22!important;
  filter:saturate(1.04) brightness(.66) contrast(1.06)!important;
}
body:not(.exercise-active)[data-screen="programScreen"] .next-program-shell::before{
  background-image:url('../img/v93/hero/hero-library.webp')!important;
  opacity:.18!important;
  background-position:center right!important;
}
body:not(.exercise-active)[data-screen="overviewScreen"] .next-overview-shell::before{
  background-image:url('../img/start/focused_player_in_icy_blue_arena.png')!important;
  opacity:.14!important;
  background-position:center right!important;
}

/* Overview hero should align like the other free page headers. */
body:not(.exercise-active) .next-overview-hero{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  gap:16px!important;
}
body:not(.exercise-active) .next-overview-return-row{
  margin-bottom:0!important;
}
body:not(.exercise-active) .next-overview-hero .next-page-title{
  max-width:11ch!important;
}
body:not(.exercise-active) .next-overview-hero .next-page-subtitle{
  max-width:42ch!important;
}
body:not(.exercise-active) .next-overview-hero .next-equipment-panel{
  margin-top:4px!important;
}
body:not(.exercise-active) .next-overview-hero .next-action-row{
  width:min(100%,1040px)!important;
}

/* Make sure legacy hidden img rules don't visually fight the shell-owned backgrounds. */
body:not(.exercise-active) #calendarScreen > .calendar-screen-bg,
body:not(.exercise-active) #profileScreen > .profile-screen-bg,
body:not(.exercise-active) > .dashboard-viewport-bg-img{
  display:none!important;
  opacity:0!important;
}
