@font-face{
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: optional;
  src: url("fonts/inter-latin-ext-300-900.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: optional;
  src: url("fonts/inter-latin-300-900.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  /* RepTotal: lime fills carry black text in both themes; --color-accent is
     the readable lime for text, links and focus (dark lime on light). */
  --color-brand: #B5F542;
  --color-brand-hover: #A6E62F;
  --color-on-brand: #0D0F0E;
  --color-bg-primary: #F5F5F5;
  --color-bg-secondary: #FFFFFF;
  --color-bg-elevated: #EDEFED;
  --color-text-primary: #0D0F0E;
  --color-text-secondary: #4B524E;
  --color-text-muted: #878E89;
  --color-border: #DFE3E0;
  --color-accent: #4D7C0F;
  --color-danger: #ef4444;
  --color-on-accent: #FFFFFF;
  /* Upgrade to Pro, here and on the RevenueCat paywall. */
  --color-upgrade: #f5b301;
  --color-upgrade-hover: #e0a200;
  --color-on-upgrade: #1a1a1a;

  /* Legacy aliases kept to prevent regressions in existing selectors */
  --bg: var(--color-bg-primary);
  --bg-2: var(--color-bg-elevated);
  --ink: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --brand: var(--color-brand);
  --brand-2: var(--color-accent);
  --violet: var(--color-accent);
  --accent: var(--color-accent);
  /* Session timers. The desktop ring painted itself with --accent (teal) while
     the mobile stopwatch and rest timer hardcoded indigo in JS, so the same
     timer wore two different colours depending on the width of the window.
     One definition, read by both. */
  --session-timer-fill: #7FB82A;
  --session-timer-track: #E5E8E5;
  --card: var(--color-bg-secondary);
  --soft: var(--color-bg-elevated);
  --border: var(--color-border);
  --shadow: 0 20px 40px rgba(13,15,14,.12);
  --shadow-soft: 0 12px 26px rgba(13,15,14,.08);
  --mobile-footer-offset: 88px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --ring: rgba(77,124,15,.22);
  --btn-radius: 11px;
  --back-btn-size: 2.8rem;
  --back-btn-radius: 16px;
  --btn-subtle-bg: #EDEFED;
  --btn-subtle-bg-hover: #E3E6E3;
  --btn-subtle-bg-active: #D8DCD9;
  --btn-subtle-fg: #0D0F0E;
  --btn-subtle-fg-muted: #5B625E;
  --btn-focus-ring: #4D7C0F;
}

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

html, body{
  margin: 0;
  padding: 0;
}

html{
  color-scheme: light;
}

html[data-theme="light"],
html.light{
  color-scheme: light;
}

html[data-theme="dark"],
html.dark{
  color-scheme: dark;
  --color-bg-primary: #0D0F0E;
  --color-bg-secondary: #1E2220;
  --color-bg-elevated: #272C29;
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #C2C7C4;
  --color-text-muted: #8E958F;
  --color-border: rgba(245,245,245,0.12);
  --color-accent: #B5F542;
  --color-on-accent: #0D0F0E;
  --color-brand-hover: #C4F865;
  --session-timer-fill: #B5F542;
  --session-timer-track: #272C29;
  --shadow: 0 20px 40px rgba(0,0,0,0.5);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.35);
  --ring: rgba(181,245,66,0.3);
  --ui-btn-glossy-surface-image:
    linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, #313432 0%, #262926 100%);
  --ui-btn-glossy-surface-image-hover:
    linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, #3a3d3b 0%, #2f3230 100%);
  --ui-btn-glossy-secondary-image:
    linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(49,52,50,.72) 0%, rgba(38,41,38,.78) 100%);
  --ui-btn-glossy-secondary-image-hover:
    linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(58,61,59,.8) 0%, rgba(47,50,48,.86) 100%);
  --bg: var(--color-bg-primary);
  --bg-2: #1E2220;
  --card: var(--color-bg-secondary);
  --soft: var(--color-bg-elevated);
  --muted: var(--color-text-secondary);
}

a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"]{
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body.app{
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  line-height: 1.55;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

/* Theme application layer limited to authenticated app UI */
body.app[data-authenticated="1"]{
  color: var(--color-text-primary);
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-elevated) 100%);
}

@media (min-width: 1024px){
  body.app{
    display: flex;
    flex-direction: column;
  }
}

button,
input,
select,
textarea{
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.pill-link,
.nav a,
.tab,
.header-nav-link,
.secondary,
.button,
button{
  font-size: 1rem;
}

.pill-link{
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.app-update-banner{
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, -1.5rem) scale(.98);
  width: min(640px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(104,153,1,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.96));
  color: var(--ink);
  box-shadow:
    0 20px 48px rgba(22,25,22,.18),
    0 1px 0 rgba(255,255,255,.72) inset;
  z-index: 4200;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .28s ease,
    transform .34s cubic-bezier(.22, 1, .36, 1);
}

.app-update-banner.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.app-update-banner-copy{
  display: grid;
  gap: .18rem;
  min-width: 0;
  flex: 1 1 auto;
}

.app-update-banner-copy strong{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1rem;
  letter-spacing: -.015em;
}

.app-update-banner-copy strong .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: #567f00;
}

.app-update-banner-copy > span{
  color: var(--muted-foreground, #9fa3a0);
}

.app-update-banner-actions{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}

.app-update-banner-btn{
  min-height: 2.85rem;
  min-width: 6.75rem;
  padding: .76rem 1.15rem;
  border-radius: var(--btn-radius) !important;
  border: 1px solid rgba(86,127,0,.28) !important;
  background: rgba(104,153,1,.12) !important;
  color: #496d02 !important;
  box-shadow: none !important;
}

.app-update-banner-dismiss{
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border-radius: 12px !important;
  border: 1px solid rgba(220,38,38,.22) !important;
  background: rgba(220,38,38,.08) !important;
  color: #b91c1c !important;
  box-shadow: none !important;
}

.app-update-banner-dismiss .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

a.back-link,
button.back-link,
.pill-link.admin-back,
.messages-back-btn,
.public-back-btn,
.messages-inbox-modern .messages-workspace-back,
.appbar-back{
  display: none !important;
}

a.back-link:not(.appbar-back),
button.back-link:not(.appbar-back),
.pill-link.admin-back.back-link,
.secondary.back-link,
a[role="button"].back-link,
.messages-back-btn,
.public-back-btn,
.messages-inbox-modern .messages-workspace-back,
.appbar-back{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--back-btn-size);
  height: var(--back-btn-size);
  width: var(--back-btn-size);
  min-width: var(--back-btn-size);
  padding: 0;
  font-size: 0;
  line-height: 1.1;
  box-sizing: border-box;
  position: relative;
  gap: 0;
  flex: 0 0 var(--back-btn-size);
  border-radius: var(--back-btn-radius);
  border: 1px solid rgba(22,25,22,.85);
  background: #161916;
  color: #f8fafc !important;
  box-shadow: none;
}

html[data-theme="dark"] a.back-link:not(.appbar-back),
html[data-theme="dark"] button.back-link:not(.appbar-back),
html[data-theme="dark"] .pill-link.admin-back.back-link,
html[data-theme="dark"] .secondary.back-link,
html[data-theme="dark"] a[role="button"].back-link,
html[data-theme="dark"] .messages-back-btn,
html[data-theme="dark"] .appbar-back{
  background: #262926;
  border-color: rgba(111,155,41,0.22);
  color: #f0f4f8 !important;
}

a.back-link:not(.appbar-back) > span,
button.back-link:not(.appbar-back) > span,
.pill-link.admin-back.back-link > span,
.secondary.back-link > span,
a[role="button"].back-link > span{
  display: none;
}

a.back-link .nav-icon-lucide,
button.back-link .nav-icon-lucide,
.pill-link.admin-back.back-link .nav-icon-lucide,
.secondary.back-link .nav-icon-lucide,
a[role="button"].back-link .nav-icon-lucide,
.messages-back-btn .nav-icon-lucide,
.messages-inbox-modern .messages-workspace-back .nav-icon-lucide,
.appbar-back .nav-icon-lucide{
  width: 24px;
  height: 24px;
  stroke-width: 2.6;
  color: currentColor !important;
}

a.back-link:not(.appbar-back):not(:has(.nav-icon-lucide))::before,
button.back-link:not(.appbar-back):not(:has(.nav-icon-lucide))::before,
.pill-link.admin-back.back-link:not(:has(.nav-icon-lucide))::before,
.secondary.back-link:not(:has(.nav-icon-lucide))::before,
a[role="button"].back-link:not(:has(.nav-icon-lucide))::before{
  content: "\2190";
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
}

/* Global rounded-rectangle buttons instead of full pills */
.pill-link,
.nav a,
.nav-dropdown .nav-link,
button.secondary,
a[role="button"].secondary,
a.secondary,
.secondary-button,
button.pill-link,
.page-actions .secondary,
.messages-tabs .pill-badge,
.messages-tabs a.pill-badge,
.coach-library-file-actions .pill-link.small,
.exercise-actions .pill-link.small{
  border-radius: var(--btn-radius) !important;
}

button > .nav-icon-lucide:not(:last-child),
a > .nav-icon-lucide:not(:last-child),
[role="button"] > .nav-icon-lucide:not(:last-child),
button > [data-lucide]:not(:last-child),
a > [data-lucide]:not(:last-child),
[role="button"] > [data-lucide]:not(:last-child){
  margin-right: .45rem;
}

body.is-frozen{
  overflow: hidden;
}

.dm-view{
  height: calc(100dvh - 140px);
}

@media (max-width: 820px){
  .dm-view{
    height: calc(100dvh - 120px);
  }
}

body.dm-lock{
  overflow: hidden;
}

.freeze-overlay{
  position: fixed;
  inset: 0;
  background: rgba(22,25,22,.55);
  display: grid;
  place-items: center;
  z-index: 99999;
  padding: 1.5rem;
}

.freeze-card{
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.3);
  box-shadow: 0 24px 50px rgba(22,25,22,.25);
  padding: 1.2rem 1.4rem;
  max-width: 420px;
  text-align: center;
}

.freeze-card h3{
  margin: 0 0 .35rem 0;
}

.freeze-card-actions{
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.freeze-logout-btn{
  min-width: 120px;
}

html[data-theme="dark"] .freeze-card{
  background: rgba(22,25,22,.95);
  border-color: rgba(159,163,160,.4);
  color: #f8fafc;
}

html[data-theme="dark"] .app-update-banner{
  background:
    linear-gradient(180deg, rgba(27,29,27,.98), rgba(17,20,18,.97));
  border-color: rgba(131,181,50,.2);
  color: #eff3f0;
  box-shadow:
    0 22px 52px rgba(0,0,0,.42),
    0 1px 0 rgba(255,255,255,.05) inset;
}

html[data-theme="dark"] .app-update-banner-copy > span{
  color: rgba(234,238,235,.72);
}

html[data-theme="dark"] .app-update-banner-copy strong .nav-icon-lucide{
  color: #a0dd3e;
}

html[data-theme="dark"] .app-update-banner-btn{
  border-color: rgba(131,181,50,.28) !important;
  background: rgba(104,153,1,.16) !important;
  color: #9bd73c !important;
}

html[data-theme="dark"] .app-update-banner-dismiss{
  border-color: rgba(248,113,113,.24) !important;
  background: rgba(127,29,29,.24) !important;
  color: #fca5a5 !important;
}

@media (min-width: 1024px){
  body.app[data-desktop-sidebar="1"] .app-update-banner{
    left: calc(50% + 110px);
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .app-update-banner{
    left: calc(50% + 36px);
  }
}
body.app::before{
  content: "";
  position: fixed;
  inset: -40% -20% auto -20%;
  height: 60%;
  background: radial-gradient(60% 60% at 20% 30%, rgba(123,172,44,.16) 0, rgba(123,172,44,0) 70%),
              radial-gradient(50% 60% at 75% 20%, rgba(128,178,46,.14) 0, rgba(128,178,46,0) 70%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] body.app::before{
  background: none;
}

.app-loader{
  position: fixed;
  inset: 0;
  --app-loader-color: #fff;
  background: #000;
  color: var(--app-loader-color);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

html[data-theme="dark"] .app-loader,
html.dark .app-loader{
  --app-loader-color: #fff;
  background: #000;
}

.app-loader.is-active{
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.app-loader[hidden]{
  display: none !important;
}

.app-loader-hidden{
  opacity: 0;
}

.fade-loader{
  position: relative;
  top: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  font-size: 0;
}

.fade-loader-bar{
  position: absolute;
  width: 5px;
  height: 15px;
  margin: 2px;
  background: var(--app-loader-color);
  border-radius: 2px;
  transition: 2s;
  animation: fade-loader 1.2s infinite ease-in-out;
  animation-fill-mode: both;
}

.fade-loader-bar-1{ top: 20px; left: 0; animation-delay: .12s; }
.fade-loader-bar-2{ top: 13.64px; left: 13.64px; transform: rotate(-45deg); animation-delay: .24s; }
.fade-loader-bar-3{ top: 0; left: 20px; transform: rotate(90deg); animation-delay: .36s; }
.fade-loader-bar-4{ top: -13.64px; left: 13.64px; transform: rotate(45deg); animation-delay: .48s; }
.fade-loader-bar-5{ top: -20px; left: 0; animation-delay: .6s; }
.fade-loader-bar-6{ top: -13.64px; left: -13.64px; transform: rotate(-45deg); animation-delay: .72s; }
.fade-loader-bar-7{ top: 0; left: -20px; transform: rotate(90deg); animation-delay: .84s; }
.fade-loader-bar-8{ top: 13.64px; left: -13.64px; transform: rotate(45deg); animation-delay: .96s; }

@keyframes fade-loader{
  50% { opacity: .3; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .fade-loader-bar{
    animation-duration: 1.8s;
  }
}
a{
  color: inherit;
  text-decoration: none;
}

a,
button,
.pill-link,
.nav a,
.header-nav-link{
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

img{
  max-width: 100%;
  display: block;
}

h1, h2, h3, .logo-text{
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .015em;
}

button,
.pill-link,
.nav a,
.tab{
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .015em;
  font-weight: 600;
}

button,
.pill-link,
a[role="button"],
a.secondary,
.secondary-button,
.appbar-icon-btn,
.header-nav-link{
  box-shadow: none !important;
}

button:hover,
button:focus,
button:focus-visible,
.pill-link:hover,
.pill-link:focus,
.pill-link:focus-visible,
a[role="button"]:hover,
a[role="button"]:focus,
a[role="button"]:focus-visible,
a.secondary:hover,
a.secondary:focus,
a.secondary:focus-visible,
.secondary-button:hover,
.secondary-button:focus,
.secondary-button:focus-visible,
.appbar-icon-btn:hover,
.appbar-icon-btn:focus,
.appbar-icon-btn:focus-visible,
.header-nav-link:hover,
.header-nav-link:focus,
.header-nav-link:focus-visible{
  box-shadow: none !important;
}

.auto-save-btn{
  border-color: rgba(21,128,61,.72) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.26), rgba(22,163,74,.18)) !important;
  color: #166534 !important;
  box-shadow: none !important;
}

.auto-save-btn:hover,
.auto-save-btn:focus,
.auto-save-btn:focus-visible,
.auto-save-btn:active{
  border-color: rgba(21,128,61,.72) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.22), rgba(22,163,74,.14)) !important;
  color: #166534 !important;
  box-shadow: none !important;
}

.auto-save-btn .nav-icon-lucide{
  color: currentColor !important;
}

html[data-theme="dark"] .auto-save-btn{
  border-color: rgba(74,222,128,.62) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.28), rgba(22,163,74,.2)) !important;
  color: #dcfce7 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .auto-save-btn:hover,
html[data-theme="dark"] .auto-save-btn:focus,
html[data-theme="dark"] .auto-save-btn:focus-visible,
html[data-theme="dark"] .auto-save-btn:active{
  border-color: rgba(74,222,128,.58) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.24), rgba(22,163,74,.16)) !important;
  color: #dcfce7 !important;
  box-shadow: none !important;
}

.auto-danger-btn{
  border-color: rgba(220,38,38,.5) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(220,38,38,.14)) !important;
  color: #991b1b !important;
  box-shadow: none !important;
}

.auto-danger-btn:hover,
.auto-danger-btn:focus,
.auto-danger-btn:focus-visible,
.auto-danger-btn:active{
  border-color: rgba(220,38,38,.48) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.18), rgba(220,38,38,.12)) !important;
  color: #991b1b !important;
  box-shadow: none !important;
}

.auto-danger-btn .nav-icon-lucide{
  color: currentColor !important;
}

html[data-theme="dark"] .auto-danger-btn{
  border-color: rgba(252,165,165,.42) !important;
  background: linear-gradient(180deg, rgba(153,27,27,.34), rgba(69,10,10,.28)) !important;
  color: #fee2e2 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .auto-danger-btn:hover,
html[data-theme="dark"] .auto-danger-btn:focus,
html[data-theme="dark"] .auto-danger-btn:focus-visible,
html[data-theme="dark"] .auto-danger-btn:active{
  border-color: rgba(252,165,165,.4) !important;
  background: linear-gradient(180deg, rgba(153,27,27,.34), rgba(69,10,10,.26)) !important;
  color: #fee2e2 !important;
  box-shadow: none !important;
}

h1{
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 .6rem 0;
}

h2{
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 .5rem 0;
}

h3{
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 .4rem 0;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.shell{
  padding: 2.25rem 0 5rem;
}

@media (min-width: 1024px){
  .shell{
    flex: 1 0 auto;
  }
}

/* Opaque, with no backdrop blur. Any alpha here let high-contrast dashed
   content scrolling underneath (the chart grid, goal and crosshair lines) read
   through as dots, and the blur that was meant to hide it could not be relied
   on: it is dropped where the unprefixed property is unsupported, and its
   backdrop root is defeated by ancestor compositing. At .98 the frosting was
   already not visible, so going solid costs nothing and removes the defect. */
.appbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.appbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem .35rem;
}

.appbar-actions{
  display: flex;
  align-items: center;
  gap: .6rem;
}

.appbar-workout-timer{
  display: none;
}

.appbar-icon-btn{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--card);
  margin-right: .4rem;
}

.nav-icon-lucide{
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-actions a[role="button"].secondary{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.page-actions a[role="button"].secondary.back-link,
.page-actions .secondary.back-link,
.page-head .page-actions a.back-link,
.page-head .page-actions button.back-link{
  gap: 0;
  font-size: 0 !important;
  width: var(--back-btn-size);
  min-width: var(--back-btn-size);
  height: var(--back-btn-size);
  min-height: var(--back-btn-size);
  padding: 0;
  flex: 0 0 var(--back-btn-size);
}

.appbar-icon-btn .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

html[data-theme="dark"] .appbar-icon-btn{
  background: rgba(111,155,41,0.09);
  border-color: rgba(111,155,41,0.2);
}

html[data-theme="dark"] .appbar-icon-btn .nav-icon-lucide{
  color: #f8fafc;
}

html[data-theme="dark"] .appbar-workout-timer.mobile-only{
  background: transparent;
  border-color: transparent;
}

.appbar-workout-timer-btn{
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}

.appbar-workout-timer-btn .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

html[data-theme="dark"] .appbar-workout-timer-value,
html[data-theme="dark"] .appbar-workout-timer-btn{
  color: #f8fafc;
}

html[data-theme="dark"] .appbar-workout-timer-label{
  color: #d1d5d2;
}

.feed-icon{
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: #161916;
}

html[data-theme="dark"] .feed-icon{
  color: #e5e9e5;
}

.feed-check{
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  margin-right: .35rem;
}

html[data-theme="dark"] .feed-check{
  filter: brightness(0) invert(1);
}

.feed-comment-btn{
  color: #161916;
  position: relative;
}

.feed-comment-badge{
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 .22rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .66rem;
  line-height: 1;
}

.feed-comment-btn:hover{
  color: var(--brand);
}

.feed-comment-btn:focus-visible{
  color: var(--brand);
}

.feed-comments{
  display: none;
  margin-top: .75rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  min-width: 0;
  overflow-x: clip;
}

.feed-comment-row{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  min-width: 0;
}

.feed-comment-avatar{
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(159,163,160,.25);
  font-size: .72rem;
  font-weight: 700;
}

.feed-comment-avatar img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-comment-main{
  flex: 1 1 auto;
  min-width: 0;
}

.feed-comment-head{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 8px;
  font-size: .875rem;
  line-height: 1.3;
}

.feed-comment-head strong{
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.feed-comment-head time{
  color: var(--muted);
  font-size: .75rem;
}

.feed-comment-body{
  margin-top: 2px;
  font-size: .9375rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feed-comment-actions{
  display: flex;
  gap: 16px;
  margin-top: 4px;
  align-items: center;
}

.feed-comment-actions .feed-comment-inline-icon,
.feed-comment-actions .feed-comment-inline-icon:hover,
.feed-comment-actions .feed-comment-inline-icon:focus,
.feed-comment-actions .feed-comment-inline-icon:focus-visible,
.feed-comment-actions .feed-comment-inline-icon:active{
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: .18rem;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.feed-comment-actions .feed-comment-inline-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #9fa3a0);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}

/* A comfortable tap area around the small text links. */
.feed-comment-actions .feed-comment-inline-icon::after{
  content: "";
  position: absolute;
  inset: -10px -6px;
}

.feed-comment-actions .feed-comment-inline-icon:hover,
.feed-comment-actions .feed-comment-inline-icon:focus-visible{
  color: var(--color-text-primary, #e5e9e5);
  transform: translateY(-1.5px);
}

.feed-comment-actions .feed-comment-delete.feed-comment-inline-icon:hover,
.feed-comment-actions .feed-comment-delete.feed-comment-inline-icon:focus-visible{
  color: #ef4444;
}

.feed-comment-actions .feed-comment-inline-icon:active{
  transform: scale(.86);
}

.feed-comment-edit-input{
  width: 100%;
  min-width: 0;
  resize: vertical;
  max-width: 100%;
  box-sizing: border-box;
  max-height: 10.5rem;
  overflow-y: auto;
}

.feed-medal{
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex: 0 0 14px;
  margin-left: .4rem;
  vertical-align: middle;
  color: #659306;
  stroke-width: 2;
}

html[data-theme="dark"] .feed-medal{
  color: #81b430;
}

.feed-medal.is-pb{
  color: #d97706;
}

html[data-theme="dark"] .feed-medal.is-pb{
  color: #fbbf24;
}

html[data-theme="dark"] .feed-kudos-btn,
html[data-theme="dark"] .feed-comment-btn{
  color: #e5e9e5;
}

html[data-theme="dark"] .feed-comment-btn:hover{
  color: #83b532;
  background: rgba(131,181,50,.12);
}

html[data-theme="dark"] .feed-comment-btn:focus-visible{
  color: #83b532;
  background: rgba(131,181,50,.16);
}

.feed-comment-form{
  position: relative;
  margin-top: 8px;
  min-width: 0;
}

.feed-comment-form input{
  min-width: 0;
}

.feed-comment-submit{
  cursor: pointer;
}

.logo{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.logo-copy{
  display: grid;
  line-height: 1.1;
}

.logo-tagline{
  font-size: .95rem;
  color: var(--muted);
  font-weight: 500;
}

.logo-mark{
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(123,172,44,.25);
}

.logo-dot{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
  box-shadow: 0 12px 24px rgba(123,172,44,.28);
}

.logo-text{
  font-size: 1.45rem;
  font-weight: 700;
}

.logo-tagline{
  line-height: 1.15;
}

.nav{
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nav-icon{
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
  flex: 0 0 auto;
}

.nav a > img,
.nav-dropdown .nav-link > img{
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
  flex: 0 0 auto;
}

.nav-label{
  min-width: 0;
}

.desktop-sidebar-toggle{
  display: none;
}

.desktop-sidebar{
  display: none;
}

.mobile-only{
  display: none !important;
}

@media (max-width: 640px){
  .app-update-banner{
    top: calc(.65rem + env(safe-area-inset-top, 0px));
    left: 50%;
    width: calc(100vw - 1rem);
    flex-direction: column;
    align-items: stretch;
    padding: .9rem;
    border-radius: 18px;
    gap: .8rem;
  }
  .app-update-banner-actions{
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
  }
  .app-update-banner-btn{
    min-height: 2.85rem;
    width: 100%;
    min-width: 0;
  }
  .app-update-banner-dismiss{
    width: 2.75rem;
    height: 2.75rem;
  }
  .mobile-only{
    display: flex !important;
  }
}


.nav-mobile{
  display: none;
  gap: .5rem;
  align-items: center;
}

.header-nav{
  display: none;
}

@media (min-width: 1024px){
  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"]{
    padding-left: 72px;
  }

  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar{
    width: 72px;
    padding-left: .35rem;
    padding-right: .35rem;
    overflow: hidden;
  }

  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo-copy,
  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a span,
  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle-label{
    display: none;
  }

  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo{
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a,
  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle{
    justify-content: center;
    padding-left: .3rem;
    padding-right: .3rem;
    overflow: hidden;
  }

  body.app[data-desktop-sidebar="1"]{
    padding-left: 220px;
  }

  body.app[data-desktop-sidebar="1"] .appbar{
    display: none;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar{
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: .75rem .55rem;
    border-right: 1px solid rgba(159,163,160,.22);
    background: linear-gradient(180deg, rgba(18,20,18,.98) 0%, rgba(14,17,15,.99) 100%);
    z-index: 42;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-top{
    display: grid;
    gap: .55rem;
    min-height: 0;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo{
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .1rem .3rem .6rem;
    border-bottom: 1px solid rgba(159,163,160,.2);
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo-mark{
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo-copy{
    display: grid;
    gap: .05rem;
    min-width: 0;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo-title{
    font-size: .9rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.1;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-logo-tag{
    font-size: .75rem;
    color: rgba(229,233,229,.8);
    line-height: 1.1;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav{
    display: grid;
    gap: .2rem;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a{
    min-height: 39px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    padding: .35rem .55rem;
    color: rgba(229,233,229,.94);
    background: transparent;
    font-size: .89rem;
    font-weight: 600;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a .nav-icon-lucide{
    width: 17px;
    height: 17px;
    opacity: .92;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a:hover{
    border-color: rgba(159,163,160,.28);
    background: rgba(159,163,160,.1);
    color: #ffffff;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a.active{
    background: rgba(95,140,1,.22);
    border-color: rgba(122,170,47,.45);
    color: #ffffff;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a .nav-badge-wrap{
    position: static;
    top: auto;
    right: auto;
    margin-left: auto;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a .nav-badge{
    margin-left: auto;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    margin-top: auto;
    width: 100%;
    min-height: 39px;
    border: 1px solid rgba(159,163,160,.24);
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    padding: .35rem .55rem;
    font-size: .88rem;
    font-weight: 600;
  }

  body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide{
    width: 16px;
    height: 16px;
    color: #ffffff;
    stroke: currentColor;
    transition: transform .2s ease;
  }

  body.app[data-desktop-sidebar="1"] .mobile-only{
    display: none !important;
  }

  body.app[data-desktop-sidebar="1"] .shell{
    padding-top: 1.65rem;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed{
    padding-left: 72px;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar{
    width: 72px;
    padding-left: .35rem;
    padding-right: .35rem;
    overflow: hidden;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-logo-copy,
  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-nav > a span,
  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-toggle-label{
    display: none;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-logo{
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-nav > a,
  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-toggle{
    justify-content: center;
    padding-left: .3rem;
    padding-right: .3rem;
    overflow: hidden;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .desktop-sidebar-toggle .nav-icon-lucide{
    transform: rotate(180deg);
  }
}

.header-nav-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .6rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #0e100e;
  min-width: 54px;
}

.header-nav-icon{
  width: 20px;
  height: 20px;
  stroke-width: 2;
  opacity: .95;
}

.header-nav-link:hover{
  background: rgba(22,25,22,.08);
}

.header-nav-link:active,
.header-nav-link.is-pressed{
  background: rgba(22,25,22,.12);
}

.header-nav-link.active{
  background: rgba(22,25,22,.12);
}

.header-nav-link .nav-badge{
  position: absolute;
  top: 2px;
  right: 6px;
}

.header-nav.is-hidden{
  display: none !important;
}

@media (max-width: 1023px){
  body.app[data-authenticated="1"] .appbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 40;
  }

  /* Until the bar is measured (first launch only; later loads reuse the last
     measurement), assume its real phone height: 65px plus the notch padding
     .appbar-inner adds. The old 72px guess made every page jump on load. */
  body.app[data-authenticated="1"] > .shell{
    margin-top: var(--appbar-height, calc(65px + env(safe-area-inset-top, 0px)));
  }

  .header-nav{
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    gap: .25rem;
    padding: .55rem .6rem calc(.75rem + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid rgba(22,25,22,.08);
    box-shadow: 0 -10px 24px rgba(22,25,22,.2);
    min-height: 72px;
  }

  body.messages-page #mobile-footer-nav{
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
  }

  body.messages-page #mobile-footer-nav.is-hidden{
    display: none !important;
  }

  /* Opaque, matching the light bar: this nav has no backdrop blur, so any
     alpha let dashed chart lines scrolling under it show through. */
  html[data-theme="dark"] .header-nav{
    background: #0d0f0d;
    border-top-color: rgba(111,155,41,0.12);
    box-shadow: 0 -8px 24px rgba(8,10,8,0.5);
  }
  .header-nav-link{
    flex: 1;
    min-width: 0;
    padding: .45rem .35rem;
  }
  .header-nav-icon{
    width: 22px;
    height: 22px;
  }
  .shell{
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
  }
  .mobile-dashboard-hide{
    display: none !important;
  }
}

.mobile-dashboard{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mobile-dashboard-page-head{
  display: none;
}

@media (max-width: 820px){
  .mobile-dashboard-page-head{
    display: none !important;
  }

  .mobile-dashboard-welcome{
    font-weight: 600;
    font-size: 1.05rem;
  }

  .mobile-dashboard-head{
    display: flex;
    flex-direction: column;
    gap: .45rem;
  }
  .mobile-dashboard-toggle{
    display: flex;
    justify-content: flex-end;
  }
  :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle{
    margin-right: .4rem;
  }
  :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle{
    display: inline-grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(159,163,160,.2);
    padding: .25rem;
    border-radius: 999px;
    gap: .25rem;
    align-items: center;
  }
  :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle-btn{
    width: 100%;
    min-height: 2rem;
    padding: 0 .9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .8rem;
    line-height: 1;
    color: #3e413e;
    background: transparent;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle-btn.active{
    background: var(--color-brand);
    color: var(--color-on-brand);
  }
  html[data-theme="dark"] :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle{
    background: rgba(159,163,160,.2);
  }
  html[data-theme="dark"] :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle-btn{
    color: rgba(229,233,229,.9);
  }
  html[data-theme="dark"] :is(.mobile-dashboard-toggle, .coach-dashboard-period, .coach-client-panel-head) .range-toggle-btn.active{
    background: var(--color-brand);
    color: var(--color-on-brand);
  }

  .mobile-dashboard-kicker{
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .65rem;
    color: var(--muted);
  }

  .mobile-dashboard-date{
    font-size: 1.25rem;
    font-weight: 600;
  }

  .mobile-dashboard-welcome{
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
  }

  .mobile-dashboard-date-block{
    order: 1;
  }
  .mobile-dashboard-date-block{
    display: flex;
    align-items: center;
    gap: .6rem;
  }
  .mobile-dashboard-date-text{
    display: flex;
    flex-direction: column;
  }
  .mobile-dashboard-toggle{
    margin-top: 0;
  }

  .mobile-dashboard-insight{
    padding: .65rem .75rem;
    border-radius: 14px;
    background: rgba(22,25,22,.08);
    border: 1px solid rgba(22,25,22,.08);
  }

  .mobile-dashboard-hide-insight{
    display: none;
  }

  .mobile-dashboard-insight .insight-title{
    font-weight: 600;
  }

  .mobile-card{
    padding: .9rem 1rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(22,25,22,.08);
    box-shadow: 0 18px 30px rgba(22,25,22,.12);
    display: flex;
    flex-direction: column;
    gap: .75rem;
  }

  .mobile-card.primary{
    background: linear-gradient(150deg, rgba(82,121,1,.18), rgba(25,40,1,.12));
    border-color: rgba(82,121,1,.2);
  }

  .mobile-card.compact{
    padding: .75rem 1rem;
  }

  .mobile-card-head{
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
  }

  .dashboard-complete-indicator{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: rgba(34,197,94,.18);
    border: 1px solid rgba(34,197,94,.4);
    color: #86efac;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    flex: 0 0 auto;
  }
  .dashboard-complete-indicator .nav-icon-lucide{
    width: .8rem;
    height: .8rem;
    stroke-width: 2.6;
  }

  .dashboard-complete-indicator[hidden]{
    display: none;
  }

  .mobile-card-body{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .mobile-card-body.stacked{
    flex-direction: column;
    align-items: stretch;
  }

  .mini-chart{
    display: grid;
    grid-auto-flow: column;
    align-items: end;
    gap: .3rem;
    margin-top: .5rem;
    height: 48px;
  }

  .mini-chart-bar{
    width: 10px;
    border-radius: 999px;
    background: rgba(82,121,1,.55);
  }

  .mini-chart-soft .mini-chart-bar{
    background: rgba(102,150,2,.45);
  }

  .progress-ring{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid rgba(82,121,1,.2);
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 600;
  }

  .progress-meta{
    text-align: right;
  }

.dashboard-workout-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .72rem;
  align-self: flex-start;
  min-height: 3rem;
  padding: .82rem 1.18rem;
  border-radius: 15px !important;
  border: 1px solid rgba(159,163,160,.22) !important;
  background: linear-gradient(180deg, rgba(82,85,82,.96), rgba(62,65,62,.98));
  color: #f8fafc !important;
  font-weight: 700;
  letter-spacing: -.01em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 24px rgba(22,25,22,.14);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.dashboard-workout-cta .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: currentColor !important;
}

  .dashboard-workout-cta span{
    display: inline-flex;
    align-items: center;
  }

.dashboard-workout-cta:hover,
.dashboard-workout-cta:focus-visible{
  transform: translateY(-1px);
  border-color: rgba(229,233,229,.28) !important;
  background: linear-gradient(180deg, rgba(98,101,98,.98), rgba(69,72,70,.99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 12px 28px rgba(22,25,22,.16);
}

.dashboard-workout-cta:active{
  transform: translateY(0);
  border-color: rgba(229,233,229,.28) !important;
  background: linear-gradient(180deg, rgba(98,101,98,.98), rgba(69,72,70,.99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 10px 20px rgba(22,25,22,.14);
}

  .stat-line{
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .day-dots{
    display: grid;
    grid-auto-flow: column;
    gap: .35rem;
    justify-content: space-between;
    margin-top: .35rem;
  }

  .day-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(22,25,22,.18);
  }

  .day-dot.active{
    background: rgba(82,121,1,.7);
  }

  .macro-bars{
    display: grid;
    gap: .45rem;
  }

  .macro-row{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
  }

  .macro-label{
    color: var(--muted);
    min-width: 60px;
  }

  .macro-value{
    color: var(--ink);
    font-weight: 600;
    min-width: 44px;
    text-align: right;
  }

  .macro-bar{
    height: 6px;
    border-radius: 999px;
    background: rgba(22,25,22,.1);
    position: relative;
    overflow: hidden;
  }

  .macro-bar::after{
    content: "";
    position: absolute;
    inset: 0;
    width: min(100%, calc(var(--bar, 0) * 1%));
    background: var(--macro-color, rgba(82,121,1,.65));
  }

  .macro-bar.protein{ --macro-color: #ff4d6d; }
  .macro-bar.carbs{ --macro-color: #22c55e; }
  .macro-bar.fat{ --macro-color: #f97316; }

}

@media (min-width: 821px){
  .mobile-dashboard{
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .mobile-card{
    background: #ffffff;
    border: 1px solid rgba(22,25,22,.08);
    box-shadow: 0 18px 30px rgba(22,25,22,.12);
  }

html[data-theme="dark"] .mobile-card{
    background: color-mix(in srgb, var(--card) 94%, transparent);
    border-color: rgba(111,155,41,0.13);
    box-shadow: 0 16px 36px rgba(8,10,8,0.45);
}
html[data-theme="dark"] .mobile-dashboard .mobile-card{
    background: var(--card);
    border-color: rgba(111,155,41,0.16);
    box-shadow: 0 20px 44px rgba(8,10,8,0.55);
}

  .mobile-dashboard-head{
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .mobile-dashboard-head > div:first-child{
    min-width: 260px;
  }

  .mobile-dashboard-head{
    align-items: flex-start;
  }

  .mobile-dashboard-welcome{
    order: 2;
  }

  .mobile-dashboard-date-block{
    order: 1;
  }

  .mobile-dashboard-insight{
    max-width: 520px;
  }

  #continue-card{
    grid-column: span 6;
  }

  #continue-card .mobile-card-body{
    gap: 1.35rem;
    margin-bottom: .1rem;
  }

  #continue-card .dashboard-workout-cta{
    margin-top: .1rem;
  }

  .mobile-dashboard > .mobile-card:nth-of-type(2){
    grid-column: span 6;
  }

  .mobile-dashboard > .mobile-card:nth-of-type(3){
    grid-column: span 6;
  }

  .mobile-dashboard > .mobile-card:nth-of-type(4){
    grid-column: span 6;
  }

  .mobile-dashboard > .mobile-card:nth-of-type(5){
    grid-column: span 6;
  }

  .mobile-card{
    padding: 1.1rem 1.2rem;
  }

  .progress-ring{
    width: 72px;
    height: 72px;
  }

  .macro-row{
    font-size: .9rem;
  }
}

@media (max-width: 820px){
  html[data-theme="dark"] .mobile-dashboard-insight{
    background: rgba(111,155,41,0.07);
    border-color: rgba(111,155,41,0.12);
  }
  html[data-theme="dark"] .mobile-card{
    background: rgba(18,20,18,.7);
    border-color: rgba(111,155,41,0.1);
    box-shadow: 0 14px 28px rgba(8,10,8,0.38);
  }
  html[data-theme="dark"] .mobile-card.primary{
    background: linear-gradient(150deg, rgba(86,127,0,.35), rgba(20,22,20,.75));
    border-color: rgba(102,150,2,.35);
  }
  html[data-theme="dark"] .day-dot{
    background: rgba(255,255,255,.25);
  }
  html[data-theme="dark"] .day-dot.active{
    background: rgba(102,150,2,.8);
  }
  html[data-theme="dark"] .macro-bar{
    background: rgba(111,155,41,0.14);
  }
  html[data-theme="dark"] .macro-bar::after{
    background: var(--macro-color, rgba(102,150,2,.8));
  }
}















html[data-theme="dark"] 
html[data-theme="dark"] 

@media (max-width: 1023px){
  .appbar-inner{
    padding: calc(.7rem + env(safe-area-inset-top)) 0 .55rem;
  }
  .logo{
    gap: .4rem;
    margin-left: .7rem;
    padding-top: .1rem;
  }
  .logo-mark{
    width: 28px;
    height: 28px;
  }
  .logo-text{
    font-size: 1.05rem;
  }
  .logo-tagline{
    font-size: .78rem;
  }

    }

/* legacy CTA/button theme removed in favor of the shared button system */

.plan-cta.plan-cta-wide{
  min-width: 180px;
}

@media (max-width: 720px){
  .plan-cta.plan-cta-wide{
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.plan-landing{
  display: grid;
  gap: 1.5rem;
}

.pricing-page{
  display: grid;
  gap: 1.5rem;
}

.pricing-hero{
  padding: 1.4rem 1.6rem;
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(123,172,44,.25), transparent 50%),
              linear-gradient(135deg, #172500, #496d02 45%, #7bac2c 100%);
  color: #f8fafc;
  box-shadow: 0 26px 56px rgba(22,25,22,.22);
}

.early-access-muted{
  color: #f8fafc;
  opacity: .9;
}

.pricing-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.pricing-card{
  border-radius: 22px;
  padding: 1.2rem 1.1rem 1.4rem;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(15,17,15,.92), rgba(9,12,10,.98));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 36px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.pricing-card h3{
  margin: 0;
  font-size: 1.25rem;
}

.pricing-card-head{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .6rem;
}

.pricing-icon{
  background: rgba(255,255,255,.12);
  padding: .35rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
}

.pricing-price{
  font-size: 2rem;
  font-weight: 700;
}

.pricing-price span{
  font-size: .95rem;
  font-weight: 600;
  opacity: .8;
  margin-left: .2rem;
}

.pricing-trial{
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .85rem;
  width: fit-content;
}

.pricing-features{
  list-style: none;
  padding: 0;
  margin: .2rem 0 0;
  display: grid;
  gap: .35rem;
  font-size: .95rem;
}

.pricing-features li::before{
  content: "-";
  margin-right: .45rem;
  color: #9bd73c;
}

/* legacy pricing CTA theme removed in favor of the shared button system */

.pricing-card.current{
  border-color: rgba(159,163,160,.7);
  box-shadow: 0 22px 46px rgba(22,25,22,.32);
}

.pricing-solo{ background: linear-gradient(160deg, #243801, #365101); }
.pricing-essential{ background: linear-gradient(160deg, #233600, #4a6d03); }
.pricing-growth{ background: linear-gradient(160deg, #2b4203, #83b632); }
.pricing-ultimate{ background: linear-gradient(160deg, #5b0f57, #db2777); }

html[data-theme="light"] .pricing-card{
  color: #161916;
  border-color: rgba(159,163,160,.22);
  box-shadow: 0 14px 30px rgba(22,25,22,.08);
}

html[data-theme="light"] .pricing-price{
  color: #060806;
}

html[data-theme="light"] .pricing-price span,
html[data-theme="light"] .pricing-features{
  color: #272a27;
}

html[data-theme="light"] .pricing-trial{
  background: rgba(22,25,22,.08);
  color: #161916;
}

html[data-theme="light"] .pricing-icon{
  background: rgba(22,25,22,.08);
  color: #161916;
}

.pricing-hotspot:focus,
.pricing-hotspot:hover{
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 0 0 3px rgba(255,255,255,.15);
}

.reflective-plan-card{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 21rem;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.22);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.22), rgba(255,255,255,0) 28%),
    radial-gradient(circle at bottom right, rgba(160,221,62,.18), rgba(160,221,62,0) 30%),
    linear-gradient(145deg, rgba(22,25,23,.96), rgba(30,48,1,.92) 58%, rgba(22,25,22,.96));
  box-shadow:
    0 26px 62px rgba(6,8,6,.28),
    inset 0 1px 0 rgba(255,255,255,.14);
}

.reflective-plan-card::before,
.reflective-plan-card::after{
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.reflective-plan-card::before{
  top: -18%;
  right: -6%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(131,181,50,.22) 0%, rgba(131,181,50,0) 70%);
}

.reflective-plan-card::after{
  bottom: -24%;
  left: -10%;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 72%);
}

.reflective-plan-card-noise,
.reflective-plan-card-sheen,
.reflective-plan-card-border,
.reflective-plan-card-overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reflective-plan-card-noise{
  z-index: 1;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.reflective-plan-card-sheen{
  z-index: 2;
  background:
    linear-gradient(128deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.08) 28%, rgba(255,255,255,0) 48%, rgba(255,255,255,.1) 72%, rgba(255,255,255,.28) 100%);
  mix-blend-mode: screen;
  opacity: .62;
}

.reflective-plan-card-border{
  z-index: 4;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.18) 46%, rgba(255,255,255,.55));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.reflective-plan-card-overlay{
  z-index: 3;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03) 38%, rgba(255,255,255,.08));
}

.reflective-plan-card-content{
  position: relative;
  z-index: 5;
  min-height: 21rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.5rem;
  color: #f8fbff;
}

.reflective-plan-card-head,
.reflective-plan-card-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reflective-plan-chip{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  min-height: 1.8rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.reflective-plan-chip .nav-icon-lucide,
.reflective-plan-card-head-icon,
.reflective-plan-fingerprint .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: inherit;
}

.reflective-plan-card-head-icon{
  opacity: .82;
}

.reflective-plan-card-body{
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 1.25rem;
  align-items: end;
  flex: 1;
}

.reflective-plan-card-copy{
  align-self: end;
}

.reflective-plan-kicker{
  display: inline-block;
  margin-bottom: .7rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(248,251,255,.74);
}

.reflective-plan-title{
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reflective-plan-subtitle{
  margin: .55rem 0 0;
  font-size: 1rem;
  color: rgba(248,251,255,.78);
}

.reflective-plan-price-block{
  display: grid;
  justify-items: end;
  gap: .35rem;
  text-align: right;
}

.reflective-plan-price{
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
}

.reflective-plan-price .price-main,
.reflective-plan-price .price-decimal,
.reflective-plan-price .price-currency{
  color: inherit;
}

.reflective-plan-period{
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(248,251,255,.72);
}

.reflective-plan-meta{
  display: grid;
  gap: .15rem;
}

.reflective-plan-meta-label{
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(248,251,255,.62);
}

.reflective-plan-meta-value{
  font-size: .96rem;
  font-weight: 700;
  color: #f8fbff;
}

.reflective-plan-meta-subvalue{
  font-size: .78rem;
  line-height: 1.25;
  color: rgba(248,251,255,.72);
  word-break: break-word;
}

.reflective-plan-fingerprint{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(248,251,255,.86);
}

html[data-theme="light"] .reflective-plan-card{
  border-color: rgba(22,25,22,.08);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.96), rgba(255,255,255,0) 32%),
    radial-gradient(circle at 88% 12%, rgba(131,181,50,.22), rgba(131,181,50,0) 28%),
    radial-gradient(circle at 15% 88%, rgba(160,221,62,.18), rgba(160,221,62,0) 34%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,247,251,.98) 40%, rgba(234,238,235,.96));
  box-shadow:
    0 18px 40px rgba(22,25,22,.09),
    0 6px 18px rgba(104,153,1,.06),
    inset 0 1px 0 rgba(255,255,255,.92);
}

html[data-theme="light"] .reflective-plan-card::before{
  background: radial-gradient(circle, rgba(86,127,0,.12) 0%, rgba(86,127,0,0) 72%);
}

html[data-theme="light"] .reflective-plan-card::after{
  background: radial-gradient(circle, rgba(123,172,44,.12) 0%, rgba(123,172,44,0) 72%);
}

html[data-theme="light"] .reflective-plan-card-noise{
  opacity: .09;
  mix-blend-mode: soft-light;
}

html[data-theme="light"] .reflective-plan-card-sheen{
  background:
    linear-gradient(128deg, rgba(255,255,255,.52) 0%, rgba(255,255,255,.22) 24%, rgba(255,255,255,0) 46%, rgba(255,255,255,.16) 70%, rgba(255,255,255,.38) 100%);
  opacity: .62;
  mix-blend-mode: screen;
}

html[data-theme="light"] .reflective-plan-card-border{
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(159,163,160,.16) 48%, rgba(214,217,214,.84));
}

html[data-theme="light"] .reflective-plan-card-overlay{
  background:
    linear-gradient(180deg, rgba(255,255,255,.46), rgba(255,255,255,.12) 36%, rgba(255,255,255,.34)),
    radial-gradient(circle at top left, rgba(255,255,255,.44), rgba(255,255,255,0) 36%);
}

html[data-theme="light"] .reflective-plan-card-content,
html[data-theme="light"] .reflective-plan-title,
html[data-theme="light"] .reflective-plan-meta-value{
  color: #161916;
}

html[data-theme="light"] .reflective-plan-meta-subvalue{
  color: rgba(62,65,62,.86);
}

html[data-theme="light"] .reflective-plan-chip{
  border-color: rgba(104,153,1,.12);
  background: rgba(255,255,255,.78);
  color: #2c410c;
  box-shadow: 0 6px 18px rgba(159,163,160,.08);
}

html[data-theme="light"] .reflective-plan-kicker,
html[data-theme="light"] .reflective-plan-subtitle,
html[data-theme="light"] .reflective-plan-period,
html[data-theme="light"] .reflective-plan-meta-label{
  color: rgba(39,42,39,.62);
}

html[data-theme="light"] .reflective-plan-price{
  color: #161916;
  text-shadow: 0 1px 0 rgba(255,255,255,.58);
}

html[data-theme="light"] .reflective-plan-fingerprint{
  border-color: rgba(104,153,1,.12);
  background: rgba(255,255,255,.74);
  color: #3e413e;
  box-shadow: 0 8px 22px rgba(159,163,160,.12);
}

@media (max-width: 860px){
  .reflective-plan-card{
    min-height: auto;
  }

  .reflective-plan-card-content{
    min-height: auto;
  }

  .reflective-plan-card-body{
    grid-template-columns: 1fr;
    align-items: start;
  }

  .reflective-plan-price-block{
    justify-items: start;
    text-align: left;
  }

  .reflective-plan-card-foot{
    align-items: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px){
  .reflective-plan-card{
    border-radius: 24px;
  }

  .reflective-plan-card-border{
    border-radius: 24px;
  }

  .reflective-plan-card-content{
    padding: 1.2rem;
  }

  .reflective-plan-card-foot{
    display: grid;
    grid-template-columns: 1fr auto;
  }
}

.plan-grid{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.plan-card{
  border-radius: 18px;
  padding: 1.4rem;
  border: 1px solid rgba(22,25,22,.15);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(22,25,22,.1);
  display: grid;
  gap: 1rem;
  min-height: 100%;
}

.plan-card.current{
  border-color: rgba(123,172,44,.7);
  box-shadow: 0 22px 46px rgba(123,172,44,.18);
}

.plan-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.plan-name{
  font-size: 1.15rem;
  font-weight: 700;
}

.plan-badge{
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(123,172,44,.15);
  color: #161916;
}

.plan-price{
  text-align: right;
}

.plan-amount{
  font-size: 1.9rem;
  font-weight: 800;
  display: block;
}

.plan-period{
  font-size: .85rem;
  color: var(--muted);
}

.plan-note{
  font-size: .9rem;
}

.plan-features{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .4rem;
}

.plan-features li{
  position: relative;
  padding-left: 1.4rem;
}

.plan-features li::before{
  content: "-";
  position: absolute;
  left: 0;
  color: #7bac2c;
  font-weight: 700;
}

/* legacy plan button theme removed in favor of the shared button system */

.plan-card.plan-essential{
  border: 1px solid rgba(95,140,1,.25);
  background: linear-gradient(135deg, #f0f4f0, #ffffff);
}

.plan-card.plan-growth{
  border: 1px solid rgba(123,172,44,.25);
  background: linear-gradient(135deg, #f7fbf8, #ffffff);
}

.plan-card.plan-ultimate{
  border: 1px solid rgba(236,72,153,.25);
  background: linear-gradient(135deg, #fdf2f8, #ffffff);
}

.plan-card.plan-solo{
  border: 1px solid rgba(104,153,1,.2);
  background: linear-gradient(135deg, #f3f6f3, #ffffff);
}

.plan-message{
  padding: 1.25rem 1.5rem;
}

.plan-store-links{
  display: flex;
  gap: .6rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

.plan-current{
  margin-top: .75rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(22,25,22,.12);
  background: rgba(255,255,255,.85);
  box-shadow: 0 12px 24px rgba(22,25,22,.08);
}

.plan-current-label{
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
}

.plan-current-name{
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: .2rem;
}

.plan-current-price{
  font-size: .95rem;
  font-weight: 600;
  color: #567f00;
  margin-top: .15rem;
}

.custom-foods-card{
  padding: 1.25rem;
  display: grid;
  gap: .9rem;
}

.custom-foods-list{
  display: grid;
  gap: 1rem;
}

.custom-food-row{
  border: 1px solid rgba(22,25,22,.1);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255,255,255,.85);
  display: grid;
  gap: .85rem;
}

.custom-food-row summary{
  list-style: none;
}

.custom-food-row summary::-webkit-details-marker{
  display: none;
}

.custom-food-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
  font-weight: 600;
}

.custom-food-summary span:first-child{
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.custom-food-body{
  display: grid;
  gap: .85rem;
  margin-top: .75rem;
}

.custom-food-main{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: .75rem;
}

.custom-food-macros{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .6rem;
}

.custom-food-portion{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .6rem;
}

.custom-food-input{
  width: 100%;
}

.custom-food-actions{
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

html[data-theme="dark"] .custom-food-row{
  background: rgba(22,25,22,.75);
  border-color: rgba(159,163,160,.2);
}

html[data-theme="dark"] .custom-food-import{
  border-bottom-color: rgba(159,163,160,.16);
}

html[data-theme="dark"] .custom-food-barcode-preview{
  background: linear-gradient(180deg, rgba(19,21,19,.92), rgba(22,25,22,.86));
  border-color: rgba(141,195,55,.18);
}

html[data-theme="dark"] .custom-food-barcode-preview-media{
  background: rgba(151,211,55,.1);
  border-color: rgba(151,211,55,.18);
}

html[data-theme="dark"] .custom-food-barcode-preview-note{
  color: #aaeb42;
}

html[data-theme="dark"] .custom-food-barcode-close{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.22);
  color: #eff3f0;
}

html[data-theme="dark"] .custom-food-barcode-hero-icon{
  background: rgba(22,25,22,.55);
  border-color: rgba(131,181,50,.24);
  color: #d1d5d2;
}

html[data-theme="dark"] .custom-food-grid select,
html[data-theme="dark"] .custom-food-portion select,
html[data-theme="dark"] .custom-food-input.unit{
  color: #161916;
  background: #f8fafc;
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] select.light-select{
  color: #161916;
  background: #f8fafc;
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] .plan-current{
  background: rgba(22,25,22,.85);
  border-color: rgba(159,163,160,.25);
  box-shadow: none;
}

html[data-theme="dark"] .plan-current-label{
  color: rgba(229,233,229,.65);
}

html[data-theme="dark"] .plan-current-price{
  color: #83b532;
}

@media (max-width: 720px){
  .custom-food-main{
    grid-template-columns: 1fr;
  }
}

.plan-cancel{
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.plan-confirm{
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--muted);
}

.plan-cancel-btn{
  margin-top: .75rem;
  border: 1px solid rgba(220,38,38,.4);
  background: rgba(239,68,68,.1);
  color: #b91c1c;
  font-weight: 700;
}

html[data-theme="dark"] .plan-card{
  background: #161916;
  border-color: rgba(159,163,160,.25);
  color: #e5e9e5;
}

html[data-theme="dark"] .plan-period,
html[data-theme="dark"] .plan-confirm{
  color: rgba(229,233,229,.7);
}

html[data-theme="dark"] .plan-cta-btn{
  background: linear-gradient(135deg, #8dc337, #567f00);
}

html[data-theme="dark"] .plan-cta:hover,
html[data-theme="dark"] .plan-cta:active,
html[data-theme="dark"] .plan-cta:focus,
html[data-theme="dark"] .plan-cta:focus-visible{
  color: #161917 !important;
  box-shadow: none !important;
}

@media (max-width: 720px){
  .pricing-grid{
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .plan-badge{
  background: rgba(123,172,44,.25);
  color: #e5e9e5;
}

@media (max-width: 720px){
  .plan-grid{
    grid-template-columns: 1fr;
  }
}

.points-pill{
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
  font-size: .9rem;
}

.day-timer{
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .95rem;
}

.day-timer-label{
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}

.day-timer-controls{
  display: inline-flex;
  align-items: center;
  gap: .2rem;
}

.day-timer-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

html:not([data-theme="dark"]) .day-timer-btn{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.day-timer-btn:hover{
  background: rgba(80,118,1,.1);
}

.day-timer-btn:active{
  background: rgba(80,118,1,.16);
  transform: translateY(1px);
}

.day-timer-btn:focus-visible{
  outline: 2px solid rgba(95,140,1,.55);
  outline-offset: 2px;
}

html:not([data-theme="dark"]) .day-timer-btn:hover,
html:not([data-theme="dark"]) .day-timer-btn:focus-visible,
html:not([data-theme="dark"]) .day-timer-btn:active{
  border: 0 !important;
  box-shadow: none !important;
}

.pill-link:hover{
  background: var(--soft);
}

.pill-link:active{
  background: rgba(95,140,1,.18);
  transform: translateY(1px);
}

.pill-link:focus-visible{
  outline: 2px solid rgba(95,140,1,.55);
  outline-offset: 2px;
}



.nav-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  margin-left: .35rem;
  transition:opacity .18s ease,transform .18s ease;
  transform-origin:center;
}
.nav-badge.is-count-updating{opacity:.58;transform:scale(.86)}
.nav-badge.is-clearing{opacity:0;transform:scale(.7);pointer-events:none}
@media(prefers-reduced-motion:reduce){.nav-badge{transition:none}}

.nav a{
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: all .2s ease;
}

.nav a:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.7);
  color: var(--ink);
}

.nav a:active{
  border-color: var(--border);
  background: rgba(95,140,1,.18);
  color: var(--ink);
  transform: translateY(1px);
}

.nav a:focus-visible{
  outline: 2px solid rgba(95,140,1,.55);
  outline-offset: 2px;
}

.nav a.active{
  background: linear-gradient(135deg, var(--violet), var(--brand-2));
  color: #fff;
}

.coach-badge{
  margin-left: .45rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .6rem;
  letter-spacing: .08em;
  font-weight: 700;
  color: #fff;
  background: rgba(95,140,1,.7);
}

.nav-dropdown{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown .nav-link{
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  padding: .5rem .9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  line-height: inherit;
  white-space: nowrap;
  box-shadow: none;
}

.nav-dropdown .nav-link.open,
.nav-dropdown .nav-link:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.7);
  color: var(--ink);
}

.nav-dropdown .nav-link.active{
  background: linear-gradient(135deg, var(--violet), var(--brand-2));
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

.dropdown-panel{
  position: absolute;
  top: calc(100% + .6rem);
  left: 0;
  width: 320px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(22,25,22,.15);
  border: 1px solid rgba(159,163,160,.2);
  padding: .85rem;
  display: none;
  z-index: 20;
}

.dropdown-panel[aria-hidden="false"]{
  display: block;
}

.dropdown-header{
  display: flex;
  justify-content: space-between;
  margin-bottom: .6rem;
}

.dropdown-panel input[type="search"]{
  width: 100%;
  padding: .5rem .7rem;
  border-radius: 10px;
  border: 1px solid rgba(159,163,160,.35);
  margin-bottom: .6rem;
}

.dropdown-list{
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: .5rem;
}

.dropdown-row{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.dropdown-item{
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .35rem;
  border-radius: 14px;
}
.dropdown-item:hover{
  background: rgba(159,163,160,.08);
}
.dropdown-row .row-meta{
  min-width: 0;
}
.dropdown-row .row-title,
.dropdown-row .row-sub{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-row .row-sub{
  font-size: .85rem;
  color: #696c69;
}

.dropdown-row:hover{
  background: rgba(159,163,160,.15);
}

.dropdown-row .avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(95,140,1,.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #426301;
}

.row-meta{
  flex: 1;
}

.row-title{
  font-weight: 600;
}

.status-pill{
  display: inline-flex;
  align-items: center;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-left: .35rem;
}

.status-pill-frozen{
  background: rgba(104,153,1,.18);
  color: #567f00;
  border: 1px solid rgba(104,153,1,.35);
}

html[data-theme="dark"] .status-pill-frozen{
  background: rgba(104,153,1,.28);
  color: #d6d9d6;
  border-color: rgba(104,153,1,.45);
}

.row-actions{
  display: flex;
  gap: .3rem;
}
html[data-theme="dark"] .dropdown-item:hover{
  background: rgba(111,155,41,0.1);
}

.icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(159,163,160,.2);
  font-size: .75rem;
  text-decoration: none;
  color: inherit;
}

html[data-theme="dark"] .dropdown-panel{
  background: rgba(13,15,13,.98);
  border-color: rgba(111,155,41,0.15);
  box-shadow: 0 20px 44px rgba(8,10,8,0.6);
}

html[data-theme="dark"] .dropdown-panel input[type="search"]{
  background: rgba(111,155,41,0.06);
  border-color: rgba(111,155,41,0.18);
  color: #f0f4f8;
}

html[data-theme="dark"] .dropdown-row:hover{
  background: rgba(111,155,41,0.1);
}
html[data-theme="dark"] .dropdown-row .row-sub{
  color: #c5c9c6;
}

html[data-theme="dark"] .icon-btn{
  background: rgba(111,155,41,0.14);
}

.page-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.page-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.settings-page-head{
  align-items: flex-start;
}

.settings-page-head > div:first-child{
  flex: 1 1 240px;
  min-width: 0;
}

.settings-head-actions{
  margin-left: auto;
}

.page-actions .small,
.page-actions a[role="button"].small,
.page-actions button.small{
  padding: .4rem .8rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-actions input[type="date"]{
  min-height: 36px;
}

.coach-context{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.coach-context + .coach-tabs{
  margin-top: .35rem;
}

.context-metrics{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

.context-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.coach-tabs{
  display: flex;
  gap: .6rem;
  margin: .5rem 0 .75rem;
  flex-wrap: wrap;
}

.page-actions .coach-tabs{
  margin: 0;
}

.page-actions.page-actions-tabs{
  align-items: center;
  gap: .75rem;
}

.coach-tabs a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: .45rem 1rem;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(159,163,160,.3);
  text-decoration: none;
  color: inherit;
  background: #ffffff;
}

.coach-tabs a.active{
  background: linear-gradient(135deg, var(--violet), var(--brand-2));
  color: #ffffff;
  border-color: transparent;
}

html[data-theme="dark"] .coach-tabs a{
  background: rgba(19,22,20,.75);
  border-color: rgba(159,163,160,.25);
}

.coach-client-manage{
  display: grid;
  gap: 1.1rem;
}

.coach-client-manage-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.coach-client-manage-head h2{
  margin: 0 0 .25rem;
}

.coach-client-manage-back{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.7rem;
  padding: .7rem 1rem;
  border-radius: 14px;
}

.coach-client-hero,
.coach-client-panel,
.coach-client-placeholder{
  border: 1px solid rgba(86,127,0,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  box-shadow: none;
}

.coach-client-hero{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.coach-client-hero-main{
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}

.coach-client-avatar{
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 2.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(131,182,50,.24), rgba(86,127,0,.28));
  color: #aaeb42;
  font-weight: 800;
  letter-spacing: .03em;
}

.coach-client-hero-copy{
  min-width: 0;
}

.coach-client-hero-name-row{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .12rem;
}

.coach-client-badge{
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 .55rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

.coach-client-badge.is-active{
  background: rgba(22,163,74,.18);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.18);
}

.coach-client-badge.is-paid{
  background: rgba(22,163,74,.18);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.18);
}

.coach-client-badge.is-frozen{
  background: rgba(239,68,68,.14);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.2);
}

.coach-client-badge.is-outline{
  background: rgba(131,182,50,.12);
  color: #aaeb42;
  border: 1px solid rgba(151,211,55,.16);
}

.coach-client-hero-meta{
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.coach-client-panel{
  padding: 1.15rem;
}

.coach-client-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.coach-client-content-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.coach-client-stat-grid{
  margin-top: .2rem;
}

.coach-client-stat-card,
.coach-client-alert-card,
.coach-client-payment-item{
  border: 1px solid rgba(159,163,160,.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
}

.coach-client-stat-card{
  display: grid;
  gap: .45rem;
  padding: 1rem;
}

.coach-client-stat-card strong{
  font-size: 1.05rem;
}

.coach-client-stat-card strong:not(:only-child){
  font-size: 2.05rem;
  line-height: 1.05;
}

.coach-client-stat-label{
  font-size: .86rem;
  font-weight: 700;
  color: #e3e7e4;
}

.coach-client-section-title{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .9rem;
}

.coach-client-section-title .nav-icon-lucide{
  color: #fbbf24;
}

.coach-client-alert-card{
  overflow: hidden;
}

.coach-client-alert-card summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem;
}

.coach-client-alert-card summary::-webkit-details-marker{
  display: none;
}

.coach-client-alert-body{
  display: grid;
  gap: .35rem;
  padding: 0 1rem 1rem;
}

.coach-client-payment-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.coach-client-payment-item{
  display: grid;
  gap: .35rem;
  padding: 1rem;
}

.coach-client-payment-item strong{
  font-size: 1.05rem;
}

.coach-client-payments-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.coach-client-payments-panel{
  position: relative;
  overflow: hidden;
}

.coach-client-payments-panel::before{
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 14rem;
  height: 14rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(151,211,55,.16) 0%, rgba(151,211,55,0) 72%);
  pointer-events: none;
}

.coach-client-payments-panel > *{
  position: relative;
  z-index: 1;
}

.coach-client-payments-head-actions,
.coach-client-payments-actions{
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.coach-client-payments-actions form{
  margin: 0;
}

.coach-client-payments-head-actions > .pill-link,
.coach-client-payments-actions > .pill-link,
.coach-client-payments-actions form > .pill-link{
  min-height: 2.8rem;
  min-width: 10.75rem;
  justify-content: center;
  padding: .72rem 1rem;
}

.coach-client-payments-cta,
.coach-client-payment-action-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.22);
  box-shadow: 0 12px 28px rgba(6,8,6,.14);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.coach-client-payments-cta:hover,
.coach-client-payments-cta:focus,
.coach-client-payment-action-btn:hover,
.coach-client-payment-action-btn:focus{
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(6,8,6,.18);
}

.coach-client-payments-cta .nav-icon-lucide,
.coach-client-payment-action-btn .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.coach-client-payments-cta.is-primary,
.coach-client-payment-action-btn.is-primary{
  border-color: rgba(151,211,55,.2);
}

html[data-theme="dark"] .coach-client-payments-panel{
  border-color: rgba(82,85,82,.34);
  background:
    radial-gradient(circle at top left, rgba(151,211,55,.12), rgba(151,211,55,0) 28%),
    linear-gradient(180deg, rgba(14,17,14,.96), rgba(8,10,8,.98));
  box-shadow:
    0 24px 48px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.03);
}

html[data-theme="dark"] .coach-client-payments-panel::before{
  background: radial-gradient(circle, rgba(151,211,55,.24) 0%, rgba(151,211,55,0) 72%);
}

html[data-theme="dark"] .coach-client-payments-head > div:first-child strong,
html[data-theme="dark"] .coach-client-section-title strong{
  color: #f8fbff;
}

html[data-theme="dark"] .coach-client-payments-cta,
html[data-theme="dark"] .coach-client-payment-action-btn{
  border-color: rgba(159,163,160,.2);
  background: linear-gradient(180deg, rgba(29,31,29,.92), rgba(16,18,16,.96));
  color: #eef2ef;
  box-shadow:
    0 16px 34px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.04);
}

html[data-theme="dark"] .coach-client-payments-cta.is-primary,
html[data-theme="dark"] .coach-client-payment-action-btn.is-primary{
  border-color: rgba(151,211,55,.24);
  background: linear-gradient(135deg, rgba(104,146,36,.92), rgba(78,111,24,.96));
  color: #f7fbf8;
}

html[data-theme="dark"] .coach-client-payments-cta.is-primary:hover,
html[data-theme="dark"] .coach-client-payments-cta.is-primary:focus,
html[data-theme="dark"] .coach-client-payment-action-btn.is-primary:hover,
html[data-theme="dark"] .coach-client-payment-action-btn.is-primary:focus{
  border-color: rgba(170,235,66,.34);
}

.coach-client-history-toggle.is-active{
  border-color: rgba(151,211,55,.28);
  color: #aaeb42;
}

.coach-client-payment-plan-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.coach-client-payment-plan-item{
  display: grid;
  gap: .35rem;
  padding: 1.1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(18,21,19,.9), rgba(11,14,11,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.coach-client-payment-plan-item strong{
  font-size: 1.1rem;
  color: #eef2ef;
}

html[data-theme="dark"] .coach-client-payment-plan-item{
  border-color: rgba(82,85,82,.28);
  background:
    linear-gradient(180deg, rgba(23,25,23,.92), rgba(11,13,11,.96));
  box-shadow:
    0 16px 30px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.coach-client-payment-history-panel{
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(159,163,160,.12);
}

.coach-client-payment-history-list{
  display: grid;
  gap: .65rem;
  margin-top: .75rem;
}

.coach-client-payment-history-row{
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(160px, 220px) minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
}

html[data-theme="dark"] .coach-client-payment-history-row,
html[data-theme="dark"] .coach-client-payment-mobile-card{
  border-color: rgba(82,85,82,.24);
  background: linear-gradient(180deg, rgba(20,22,20,.92), rgba(11,13,11,.96));
}

.coach-client-payment-table-wrap{
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(9,11,9,.34);
}

html[data-theme="dark"] .coach-client-payment-table-wrap{
  border-color: rgba(82,85,82,.28);
  background: linear-gradient(180deg, rgba(13,16,14,.82), rgba(8,10,8,.9));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(0,0,0,.2);
}

.coach-client-payment-table{
  width: 100%;
  border-collapse: collapse;
}

.coach-client-payment-table th,
.coach-client-payment-table td{
  padding: .95rem .75rem;
  text-align: left;
  border-bottom: 1px solid rgba(159,163,160,.12);
}

.coach-client-payment-table th{
  font-size: .82rem;
  font-weight: 700;
  color: #b0b4b1;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(255,255,255,.02);
}

.coach-client-payment-table tbody tr{
  transition: background .18s ease;
}

.coach-client-payment-table tbody tr:hover{
  background: rgba(255,255,255,.03);
}

html[data-theme="dark"] .coach-client-payment-table th{
  color: #b0b4b1;
  background: rgba(255,255,255,.025);
}

html[data-theme="dark"] .coach-client-payment-table td{
  color: #e3e7e4;
}

html[data-theme="dark"] .coach-client-payment-table tbody tr:hover{
  background: rgba(123,172,44,.06);
}

.coach-client-payment-status{
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.coach-client-payment-status.is-paid{
  background: rgba(22,163,74,.18);
  color: #86efac;
  border-color: rgba(34,197,94,.2);
}

.coach-client-payment-status.is-partial{
  background: rgba(245,158,11,.16);
  color: #fcd34d;
  border-color: rgba(245,158,11,.2);
}

.coach-client-payment-status.is-overdue{
  background: rgba(239,68,68,.15);
  color: #fca5a5;
  border-color: rgba(239,68,68,.2);
}

.coach-client-payment-status.is-neutral{
  background: rgba(159,163,160,.14);
  color: #e3e7e4;
  border-color: rgba(159,163,160,.18);
}

.coach-client-payment-mobile-list{
  display: none;
}

.coach-client-payment-mobile-card{
  display: grid;
  gap: .75rem;
  padding: .95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
  box-shadow: 0 16px 30px rgba(6,8,6,.18);
}

.coach-client-payment-mobile-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.coach-client-payment-mobile-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.coach-client-payment-mobile-grid div{
  display: grid;
  gap: .2rem;
}

.coach-client-payment-row-actions{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: nowrap;
}

.coach-client-payment-row-actions form{
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.coach-client-payment-row-actions .hidden-submit{
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  display: block !important;
}

.coach-client-payment-row-btn{
  min-height: 1.6rem;
  min-width: 1.6rem;
  padding: .08rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #e3e7e4;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

.coach-client-payment-row-btn.is-edit{
  color: #facc15;
}

.coach-client-payment-row-btn.is-danger{
  color: #fecaca;
}

html[data-theme="dark"] .coach-client-payment-row-btn{
  border-color: transparent;
  background: transparent;
  color: #e3e7e4;
}

html[data-theme="dark"] .coach-client-payment-row-btn.is-danger{
  color: #fecaca;
}

html[data-theme="dark"] .coach-client-payment-row-btn.is-edit{
  color: #facc15;
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn{
  color: #525552;
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn.is-edit{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn.is-danger{
  color: #161916;
}

.coach-client-payment-row-btn:hover,
.coach-client-payment-row-btn:focus{
  background: transparent;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.coach-client-payment-row-btn.is-danger:hover,
.coach-client-payment-row-btn.is-danger:focus{
  border-color: rgba(248,113,113,.42);
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1));
  color: #fee2e2;
}

html[data-theme="dark"] .coach-client-payment-row-btn:hover,
html[data-theme="dark"] .coach-client-payment-row-btn:focus{
  border-color: rgba(170,235,66,.26);
  background: linear-gradient(180deg, rgba(34,37,34,.96), rgba(18,20,18,1));
}

.coach-client-payment-modal-card{
  width: min(100%, 520px);
}

.coach-client-payment-modal{
  padding: 1rem;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.coach-client-payment-modal .modal-backdrop{
  background: rgba(7,9,7,.74);
  backdrop-filter: blur(4px);
  z-index: 0;
}

.coach-client-payment-modal .modal-card{
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  border: 1px solid rgba(197,201,197,.44);
  background: linear-gradient(180deg, rgba(17,19,17,.98), rgba(10,13,11,.99));
  box-shadow: 0 26px 70px rgba(0,0,0,.42);
  z-index: 2;
}

.coach-client-payment-modal .modal-header{
  padding: 1rem 1.15rem .9rem;
}

.coach-client-payment-modal .modal-header [data-modal-close]{
  width: 2rem !important;
  min-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b91c1c !important;
}

.coach-client-payment-modal .modal-header [data-modal-close]:hover,
.coach-client-payment-modal .modal-header [data-modal-close]:focus,
.coach-client-payment-modal .modal-header [data-modal-close]:focus-visible{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #991b1b !important;
}

.coach-client-payment-modal .modal-body{
  padding: 0 1.15rem 1.15rem;
  overflow-y: auto;
}

.coach-client-payment-modal .modal-actions{
  justify-content: flex-end;
  gap: .85rem;
}

.coach-client-payment-action-btn{
  min-height: 2.7rem;
  padding: .72rem 1.15rem;
  border: 1px solid rgba(159,163,160,.34);
  background: rgba(255,255,255,.02);
  color: #f0f4f0;
  font-weight: 700;
}

.coach-client-payment-action-btn:hover,
.coach-client-payment-action-btn:focus{
  background: rgba(255,255,255,.05);
  border-color: rgba(197,201,197,.46);
}

.coach-client-payment-action-btn.is-primary{
  background: rgba(255,255,255,.02);
  color: #f0f4f0;
}

.coach-payment-automation-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 2200;
}

.coach-payment-automation-modal.is-open{
  display: flex;
}

.coach-payment-automation-modal .modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(9,11,9,.66);
  backdrop-filter: blur(6px);
  z-index: 0;
}

.coach-payment-automation-card{
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(88vh, 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border-color: rgba(159,163,160,.16);
  background: linear-gradient(180deg, rgba(17,20,17,.98), rgba(11,13,11,.98));
  box-shadow: 0 28px 72px rgba(6,8,6,.42);
}

.coach-payment-automation-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(159,163,160,.1);
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-automation-heading{
  display: grid;
  gap: .3rem;
  min-width: 0;
}

.coach-payment-automation-heading strong{
  display: block;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.coach-payment-automation-close{
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding-inline: 0;
}

.coach-payment-automation-close-btn,
.coach-payment-automation-cancel-btn{
  border-color: rgba(248,113,113,.28) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.coach-payment-automation-close-btn:hover,
.coach-payment-automation-close-btn:focus-visible,
.coach-payment-automation-cancel-btn:hover,
.coach-payment-automation-cancel-btn:focus-visible{
  border-color: rgba(248,113,113,.42) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1)) !important;
}

.coach-payment-automation-confirm-btn{
  border: 1px solid rgba(20,83,45,.72) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.24), rgba(21,128,61,.14)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.22),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 22px rgba(21,128,61,.16) !important;
}

.coach-payment-automation-confirm-btn:hover,
.coach-payment-automation-confirm-btn:focus-visible{
  border-color: rgba(22,163,74,.72) !important;
  color: #f0fdf4 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.3), rgba(21,128,61,.18)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.26),
    inset 0 1px 0 rgba(255,255,255,.12),
    0 14px 26px rgba(21,128,61,.2) !important;
}

.coach-payment-automation-body{
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-automation-client{
  padding: .95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(151,211,55,.16);
  background: linear-gradient(180deg, rgba(22,25,22,.78), rgba(14,16,14,.92));
  color: #e6eae6;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-automation-field{
  display: grid;
  gap: .55rem;
  min-width: 0;
}

.coach-payment-automation-field > span{
  font-size: .82rem;
  font-weight: 700;
  color: #e6eae6;
  letter-spacing: .01em;
}

.coach-payment-automation-field select{
  width: 100%;
  max-width: 100%;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.18);
  background: rgba(22,25,22,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  box-sizing: border-box;
}

.coach-payment-automation-field select:focus{
  border-color: rgba(151,211,55,.34);
  box-shadow: 0 0 0 3px rgba(151,211,55,.08);
}

.coach-payment-automation-confirm{
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,15,13,.74), rgba(8,10,8,.88));
  color: #d2d6d3;
  line-height: 1.55;
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-automation-actions{
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(159,163,160,.12);
  background: rgba(6,8,6,.2);
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-share-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 2200;
}

.coach-payment-share-modal.is-open{
  display: flex;
}

.coach-payment-share-modal .modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(9,11,9,.7);
  backdrop-filter: blur(6px);
  z-index: 0;
}

.coach-payment-share-card{
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: min(92vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(16,18,16,.98), rgba(10,12,10,.99));
  box-shadow: 0 28px 72px rgba(6,8,6,.44);
}

.coach-payment-share-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.05rem .85rem;
  border-bottom: 1px solid rgba(159,163,160,.1);
}

.coach-payment-share-heading strong{
  display: block;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.coach-payment-share-heading{
  display: grid;
  gap: 0;
}

.coach-payment-share-close{
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding-inline: 0;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
}

.coach-payment-share-close.subtle-danger-icon-btn,
.coach-payment-share-link-remove.subtle-danger-icon-btn,
.coach-payment-share-footer-actions .subtle-danger-btn{
  border: 0 !important;
  color: #fecaca !important;
  background: transparent !important;
  box-shadow: none !important;
}

.coach-payment-share-close.subtle-danger-icon-btn:hover,
.coach-payment-share-close.subtle-danger-icon-btn:focus-visible,
.coach-payment-share-link-remove.subtle-danger-icon-btn:hover,
.coach-payment-share-link-remove.subtle-danger-icon-btn:focus-visible,
.coach-payment-share-footer-actions .subtle-danger-btn:hover,
.coach-payment-share-footer-actions .subtle-danger-btn:focus-visible{
  color: #fee2e2 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.coach-payment-share-body{
  display: grid;
  gap: .9rem;
  padding: .95rem 1.05rem .85rem;
  overflow-y: auto;
}

.coach-payment-share-override{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .85rem .9rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.16);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.coach-payment-share-override strong{
  display: block;
  margin-bottom: .12rem;
  font-size: .92rem;
  line-height: 1.3;
}

.coach-payment-share-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.coach-payment-share-switch input{
  position: absolute;
  opacity: 0;
  inset: 0;
}

.coach-payment-share-switch-ui{
  position: relative;
  width: 2.7rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(62,65,62,.95);
  border: 1px solid rgba(159,163,160,.18);
  transition: background .18s ease, border-color .18s ease;
}

.coach-payment-share-switch-ui::after{
  content: "";
  position: absolute;
  top: 50%;
  left: .18rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #ffffff;
  transform: translateY(-50%);
  transition: transform .18s ease;
}

.coach-payment-share-switch input:checked + .coach-payment-share-switch-ui{
  background: rgba(131,182,50,.92);
  border-color: rgba(151,211,55,.28);
}

.coach-payment-share-switch input:checked + .coach-payment-share-switch-ui::after{
  transform: translate(1.08rem, -50%);
}

.coach-payment-share-form{
  display: grid;
  gap: .85rem;
}

.coach-payment-share-section{
  display: grid;
  gap: .75rem;
  padding: .2rem 0 0;
  min-width: 0;
}

.coach-payment-share-section + .coach-payment-share-section{
  padding-top: .8rem;
  border-top: 1px solid rgba(159,163,160,.12);
}

.coach-payment-share-section-title{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #9ea29f;
}

.coach-payment-share-grid{
  gap: .7rem;
  align-items: start;
  min-width: 0;
}

.coach-payment-share-grid > label,
.coach-payment-share-link-row > label{
  min-width: 0;
  font-size: .82rem;
}

.coach-payment-share-grid input,
.coach-payment-share-link-row input{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.coach-payment-share-delivery{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.coach-payment-share-footer-meta{
  display: grid;
  gap: .5rem;
  min-width: 0;
}

.coach-payment-share-delivery-option{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.35rem;
  width: 100%;
  padding: .6rem .75rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.18);
  background: rgba(255,255,255,.03);
  box-sizing: border-box;
  font-size: .88rem;
  font-weight: 700;
}

.coach-payment-share-delivery-option input{
  width: .9rem;
  height: .9rem;
  margin: 0;
}

.coach-payment-share-link-list{
  display: grid;
  gap: .65rem;
  min-width: 0;
}

.coach-payment-share-link-row{
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr) auto;
  gap: .65rem;
  align-items: end;
  padding: .75rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.1);
  background: rgba(255,255,255,.02);
}

.coach-payment-share-link-add,
.coach-payment-share-link-remove{
  min-height: 2.35rem;
}

.coach-payment-share-link-add{
  justify-content: center;
}

.coach-payment-share-link-remove{
  min-width: 1.5rem;
  width: 1.5rem;
  min-height: 1.5rem;
  padding: 0;
  justify-self: end;
  cursor: pointer;
}

.coach-payment-share-actions{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .8rem;
  padding: .85rem 1.05rem 1rem;
  border-top: 1px solid rgba(159,163,160,.12);
  background: rgba(6,8,6,.22);
}

.coach-payment-share-footer-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.coach-client-payment-form{
  display: grid;
  gap: .9rem;
}

.coach-client-payment-form label{
  display: grid;
  gap: .38rem;
}

.coach-client-payment-current{
  display: grid;
  gap: .3rem;
}

.coach-client-payment-current strong{
  font-size: 1.85rem;
}

.coach-client-subpanel{
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(10,12,10,.72), rgba(8,10,8,.82));
}

.coach-client-subpanel-title{
  font-weight: 700;
  color: #e3e7e4;
}

.coach-client-notes-form{
  display: grid;
  gap: .8rem;
}

.coach-client-notes-form textarea{
  min-height: 220px;
}

.coach-client-history-jump{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.coach-client-history-jump-controls{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.coach-client-history-jump input[type="date"]{
  min-width: 220px;
  height: 44px;
  padding: .7rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(244,248,245,.96));
  color: #161916;
  font: inherit;
  box-shadow: 0 10px 30px rgba(22,25,22,.06);
}

.coach-client-history-jump input[type="date"]:focus{
  outline: none;
  border-color: rgba(141,195,55,.45);
  box-shadow: 0 0 0 3px rgba(141,195,55,.14);
}

.coach-client-history-jump-submit{
  height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #97d337, #8dc337);
  color: #2a2d2b;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(151,211,55,.18);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.coach-client-history-jump-submit:hover,
.coach-client-history-jump-submit:focus-visible{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 14px 32px rgba(151,211,55,.22);
  outline: none;
}

.coach-client-history-jump-submit:active{
  transform: translateY(1px);
}

.coach-client-history-layout{
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.coach-client-history-sidebar{
  display: grid;
  gap: 1rem;
  align-content: start;
}

.coach-client-history-list{
  display: grid;
  gap: .6rem;
}

.coach-client-history-link{
  display: grid;
  gap: .18rem;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
  text-decoration: none;
  color: inherit;
}

.coach-client-history-link.is-active{
  border-color: rgba(151,211,55,.24);
  background: linear-gradient(180deg, rgba(24,26,24,.92), rgba(16,19,17,.95));
}

.coach-client-history-detail{
  min-width: 0;
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
}

.coach-client-history-checkin{
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(13,16,13,.88), rgba(9,12,9,.92));
}

.coach-client-history-checkin-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

body.theme-dark .coach-client-history-jump input[type="date"]{
  border-color: rgba(160,221,62,.16);
  background: linear-gradient(180deg, rgba(21,23,21,.92), rgba(13,15,13,.95));
  color: #e5e9e5;
  box-shadow: 0 10px 30px rgba(6,8,6,.28);
}

body.theme-dark .coach-client-history-jump input[type="date"]::-webkit-calendar-picker-indicator{
  filter: invert(1) brightness(1.3);
  cursor: pointer;
}

@media (max-width: 820px){
  .coach-client-history-jump{
    width: 100%;
    align-items: stretch;
  }

  .coach-client-history-jump-controls{
    width: 100%;
  }

  .coach-client-history-jump input[type="date"]{
    flex: 1 1 0;
    min-width: 0;
  }

  .coach-client-history-jump-submit{
    flex: 0 0 auto;
  }
}

.coach-client-history-checkin-grid div{
  display: grid;
  gap: .15rem;
}

.coach-client-history-checkin-notes{
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.04);
  white-space: pre-wrap;
}

.coach-client-history-detail-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.coach-client-history-notes{
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.04);
  white-space: pre-wrap;
}

.coach-client-history-table-wrap{
  overflow-x: auto;
}

.coach-client-history-table{
  width: 100%;
  border-collapse: collapse;
}

.coach-client-history-table th,
.coach-client-history-table td{
  padding: .72rem .5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(159,163,160,.12);
}

.coach-client-history-table th{
  font-size: .82rem;
  font-weight: 700;
  color: #b4b8b5;
}

.coach-client-empty-state{
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(159,163,160,.16);
  background: rgba(255,255,255,.03);
}

.coach-client-placeholder{
  margin-top: 1rem;
  padding: 1rem;
}

.coach-client-manage-page .card .muted,
.coach-client-manage .muted{
  color: #9ea29f;
}

.coach-client-manage-page .card,
.coach-client-manage-page .pill-link.secondary{
  color: #eaedea;
}




.coach-client-manage-page .coach-import-seed select,
.coach-client-manage-page textarea,
.coach-client-manage-page input,
.coach-client-manage-page select{
  background: rgba(8,10,8,.92);
  color: #f0f4f0;
  border: 1px solid rgba(86,127,0,.18);
}

html:not([data-theme="dark"]) .coach-client-hero,
html:not([data-theme="dark"]) .coach-client-panel,
html:not([data-theme="dark"]) .coach-client-placeholder{
  border-color: rgba(86,127,0,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html:not([data-theme="dark"]) .coach-client-avatar{
  background: linear-gradient(135deg, rgba(131,182,50,.14), rgba(86,127,0,.18));
  color: #385402;
}

html:not([data-theme="dark"]) .coach-client-badge.is-active{
  color: #166534;
}

html:not([data-theme="dark"]) .coach-client-badge.is-paid{
  color: #166534;
}

html:not([data-theme="dark"]) .coach-client-badge.is-frozen{
  color: #b91c1c;
}

html:not([data-theme="dark"]) .coach-client-badge.is-outline{
  color: #52731f;
}

html:not([data-theme="dark"]) .coach-client-stat-card,
html:not([data-theme="dark"]) .coach-client-alert-card,
html:not([data-theme="dark"]) .coach-client-payment-item,
html:not([data-theme="dark"]) .coach-client-history-link,
html:not([data-theme="dark"]) .coach-client-history-detail,
html:not([data-theme="dark"]) .coach-client-history-checkin,
html:not([data-theme="dark"]) .coach-client-subpanel{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.98));
}

html:not([data-theme="dark"]) .coach-client-stat-label,
html:not([data-theme="dark"]) .coach-client-subpanel-title{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-client-manage .muted,
html:not([data-theme="dark"]) .coach-client-manage-page .card .muted{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-client-manage-page .card,
html:not([data-theme="dark"]) .coach-client-manage-page .pill-link.secondary{
  color: #161916;
}




html:not([data-theme="dark"]) .coach-client-manage-page .coach-import-seed select,
html:not([data-theme="dark"]) .coach-client-manage-page textarea,
html:not([data-theme="dark"]) .coach-client-manage-page input,
html:not([data-theme="dark"]) .coach-client-manage-page select{
  background: rgba(255,255,255,.98);
  color: #161916;
  border: 1px solid rgba(159,163,160,.24);
}

html:not([data-theme="dark"]) .coach-client-history-link.is-active{
  border-color: rgba(131,182,50,.2);
  background: #f4f7f4;
}

html:not([data-theme="dark"]) .coach-client-history-notes{
  background: rgba(248,250,252,.9);
  border-color: rgba(159,163,160,.16);
}

html:not([data-theme="dark"]) .coach-client-history-checkin-notes{
  background: rgba(248,250,252,.9);
  border-color: rgba(159,163,160,.16);
}

html:not([data-theme="dark"]) .coach-client-history-toggle.is-active{
  color: #52731f;
  border-color: rgba(103,143,38,.26);
  background: #ecfdf5;
}

html:not([data-theme="dark"]) .coach-client-payment-plan-item strong{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-client-payments-panel{
  border-color: rgba(159,163,160,.18);
  background: #f8fafc;
  box-shadow: 0 20px 44px rgba(22,25,22,.08);
}

html:not([data-theme="dark"]) .coach-client-payments-panel::before{
  display: none;
}

html:not([data-theme="dark"]) .coach-client-payments-head{
  margin-bottom: 1.25rem;
}

html:not([data-theme="dark"]) .coach-client-payments-head > div:first-child strong,
html:not([data-theme="dark"]) .coach-client-section-title strong{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-client-payments-cta,
html:not([data-theme="dark"]) .coach-client-payment-action-btn{
  border-color: rgba(159,163,160,.2);
  background: #ffffff;
  color: #161916;
  box-shadow:
    0 14px 30px rgba(22,25,22,.08),
    inset 0 1px 0 rgba(255,255,255,.9);
}

html:not([data-theme="dark"]) .coach-client-payment-plan-item{
  border-color: rgba(159,163,160,.18);
  background: #ffffff;
  box-shadow:
    0 16px 32px rgba(22,25,22,.06),
    inset 0 1px 0 rgba(255,255,255,.9);
}

html:not([data-theme="dark"]) .coach-client-payment-history-panel{
  border-top-color: rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .coach-client-payment-history-row,
html:not([data-theme="dark"]) .coach-client-payment-mobile-card{
  border-color: rgba(159,163,160,.18);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(22,25,22,.06);
}

html:not([data-theme="dark"]) .coach-client-payment-table-wrap{
  border-color: rgba(159,163,160,.16);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

html:not([data-theme="dark"]) .coach-client-payment-modal .modal-backdrop{
  background: rgba(22,25,22,.28);
}

html:not([data-theme="dark"]) .coach-client-payment-modal .modal-card{
  border-color: rgba(159,163,160,.26);
  background: #ffffff;
}

html:not([data-theme="dark"]) .coach-client-payment-modal .modal-header [data-modal-close]{
  color: #b91c1c !important;
}

html:not([data-theme="dark"]) .coach-client-payment-modal .modal-header [data-modal-close]:hover,
html:not([data-theme="dark"]) .coach-client-payment-modal .modal-header [data-modal-close]:focus,
html:not([data-theme="dark"]) .coach-client-payment-modal .modal-header [data-modal-close]:focus-visible{
  color: #991b1b !important;
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn{
  border-color: rgba(159,163,160,.22);
  background: #ffffff;
  color: #3e413e;
  box-shadow:
    0 10px 20px rgba(22,25,22,.06),
    inset 0 1px 0 rgba(255,255,255,.88);
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn.is-danger{
  color: #b91c1c;
  border-color: rgba(239,68,68,.24);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08);
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn.is-danger:hover,
html:not([data-theme="dark"]) .coach-client-payment-row-btn.is-danger:focus{
  color: #991b1b;
  border-color: rgba(239,68,68,.32);
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94));
}

html:not([data-theme="dark"]) .coach-client-payment-row-btn:hover,
html:not([data-theme="dark"]) .coach-client-payment-row-btn:focus{
  border-color: rgba(83,118,29,.26);
  background: #f8fafc;
}

html:not([data-theme="dark"]) .coach-client-payment-action-btn{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-client-payment-action-btn:hover,
html:not([data-theme="dark"]) .coach-client-payment-action-btn:focus{
  border-color: rgba(83,118,29,.26);
}

html:not([data-theme="dark"]) .coach-payment-automation-confirm{
  background: #f8fafc;
  border-color: rgba(209,213,210,.82);
  color: #3e413e;
}

html:not([data-theme="dark"]) .coach-payment-automation-card{
  background: #ffffff;
  border-color: rgba(159,163,160,.22);
  box-shadow: 0 24px 60px rgba(22,25,22,.14);
}

html:not([data-theme="dark"]) .coach-payment-automation-header{
  border-bottom-color: rgba(159,163,160,.16);
}

html:not([data-theme="dark"]) .coach-payment-automation-client{
  background: #f5f9f5;
  border-color: rgba(123,172,44,.18);
  color: #161916;
}

html:not([data-theme="dark"]) .coach-payment-automation-field > span{
  color: #272a27;
}

html:not([data-theme="dark"]) .coach-payment-automation-field select{
  background: rgba(255,255,255,.92);
  border-color: rgba(159,163,160,.34);
}

html:not([data-theme="dark"]) .coach-payment-automation-actions{
  border-top-color: rgba(159,163,160,.18);
  background: rgba(248,250,252,.92);
}

html:not([data-theme="dark"]) .coach-payment-automation-close-btn,
html:not([data-theme="dark"]) .coach-payment-automation-cancel-btn{
  border-color: rgba(239,68,68,.24) !important;
  color: #b91c1c !important;
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08) !important;
}

html:not([data-theme="dark"]) .coach-payment-automation-close-btn:hover,
html:not([data-theme="dark"]) .coach-payment-automation-close-btn:focus-visible,
html:not([data-theme="dark"]) .coach-payment-automation-cancel-btn:hover,
html:not([data-theme="dark"]) .coach-payment-automation-cancel-btn:focus-visible{
  border-color: rgba(239,68,68,.32) !important;
  color: #991b1b !important;
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94)) !important;
}

html:not([data-theme="dark"]) .coach-payment-automation-confirm-btn{
  border-color: rgba(20,83,45,.58) !important;
  color: #166534 !important;
  background: linear-gradient(180deg, rgba(240,253,244,.98), rgba(220,252,231,.96)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.14),
    inset 0 1px 0 rgba(255,255,255,.96),
    0 10px 22px rgba(22,163,74,.08) !important;
}

html:not([data-theme="dark"]) .coach-payment-automation-confirm-btn:hover,
html:not([data-theme="dark"]) .coach-payment-automation-confirm-btn:focus-visible{
  border-color: rgba(20,83,45,.7) !important;
  color: #14532d !important;
  background: linear-gradient(180deg, rgba(220,252,231,.98), rgba(187,247,208,.96)) !important;
}

html:not([data-theme="dark"]) .coach-payment-share-card{
  background: #ffffff;
  border-color: rgba(159,163,160,.22);
  box-shadow: 0 24px 60px rgba(22,25,22,.14);
}

html:not([data-theme="dark"]) .coach-payment-share-close.subtle-danger-icon-btn,
html:not([data-theme="dark"]) .coach-payment-share-link-remove.subtle-danger-icon-btn,
html:not([data-theme="dark"]) .coach-payment-share-footer-actions .subtle-danger-btn{
  border: 0 !important;
  color: #b91c1c !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .coach-payment-share-close.subtle-danger-icon-btn:hover,
html:not([data-theme="dark"]) .coach-payment-share-close.subtle-danger-icon-btn:focus-visible,
html:not([data-theme="dark"]) .coach-payment-share-link-remove.subtle-danger-icon-btn:hover,
html:not([data-theme="dark"]) .coach-payment-share-link-remove.subtle-danger-icon-btn:focus-visible,
html:not([data-theme="dark"]) .coach-payment-share-footer-actions .subtle-danger-btn:hover,
html:not([data-theme="dark"]) .coach-payment-share-footer-actions .subtle-danger-btn:focus-visible{
  color: #991b1b !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .coach-payment-share-header{
  border-bottom-color: rgba(159,163,160,.16);
}

html:not([data-theme="dark"]) .coach-payment-share-override{
  border-color: rgba(159,163,160,.18);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}

html:not([data-theme="dark"]) .coach-payment-share-switch-ui{
  background: rgba(229,233,229,.96);
  border-color: rgba(159,163,160,.2);
}

html:not([data-theme="dark"]) .coach-payment-share-switch-ui::after{
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(22,25,22,.12);
}

html:not([data-theme="dark"]) .coach-payment-share-section-title{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-payment-share-section{
  background: transparent;
  box-shadow: none;
}

html:not([data-theme="dark"]) .coach-payment-share-delivery-option{
  background: #f8fafc;
  border-color: rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .coach-payment-share-link-row{
  border-color: rgba(159,163,160,.16);
  background: #f8fafc;
}

html:not([data-theme="dark"]) .coach-payment-share-actions{
  border-top-color: rgba(159,163,160,.18);
  background: rgba(248,250,252,.92);
}

html:not([data-theme="dark"]) .coach-client-payment-table th{
  color: #707471;
  background: rgba(241,245,249,.9);
}

html:not([data-theme="dark"]) .coach-client-payment-table td{
  color: #272a27;
}

html:not([data-theme="dark"]) .coach-client-payment-table tbody tr:hover{
  background: rgba(245,249,245,.84);
}

html:not([data-theme="dark"]) .coach-client-payment-status.is-neutral{
  color: #3e413e;
}

html:not([data-theme="dark"]) .coach-client-history-table th{
  color: #525552;
}

html:not([data-theme="dark"]) .coach-client-empty-state{
  border-color: rgba(159,163,160,.18);
  background: rgba(248,250,252,.72);
}

@media (max-width: 960px){
  .coach-client-manage-head,
  .coach-client-hero{
    flex-direction: column;
    align-items: flex-start;
  }

  .coach-client-hero-meta{
    justify-content: flex-start;
  }

  .coach-client-content-grid,
  .coach-client-payment-grid,
  .coach-client-history-layout,
  .coach-client-payment-plan-grid{
    grid-template-columns: 1fr;
  }

  .coach-client-payment-history-row{
    grid-template-columns: 1fr;
  }

  .coach-client-payments-head-actions > .pill-link,
  .coach-client-payments-actions > .pill-link,
  .coach-client-payments-actions form > .pill-link{
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 720px){
  .coach-client-manage-back{
    justify-content: center;
  }

  .coach-client-payments-head,
  .coach-client-payments-head-actions,
  .coach-client-payments-actions{
    display: grid;
    width: 100%;
  }

  .coach-client-panel-head{
    align-items: flex-start;
  }



  .coach-client-payments-panel{
    padding: 1rem;
    border-radius: 20px;
  }

  .coach-client-payment-plan-item,
  .coach-client-payment-mobile-card{
    padding: 1rem .95rem;
  }

  .coach-client-payment-mobile-top{
    align-items: flex-start;
    flex-direction: column;
  }

  .coach-client-payment-mobile-grid{
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  .coach-client-payment-row-actions{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .coach-client-payment-row-actions form{
    width: 100%;
  }

  .coach-client-payment-row-btn{
    width: auto;
    min-height: 1.8rem;
  }

  .coach-client-payment-table-wrap{
    display: none;
  }

  .coach-client-payment-mobile-list{
    display: grid;
    gap: .8rem;
  }

  .coach-client-payment-modal{
    padding: .8rem;
  }

  .coach-client-payment-modal .modal-card{
    width: min(100%, calc(100vw - 1.2rem));
    max-height: calc(100dvh - 1.2rem);
  }

  .coach-payment-automation-modal{
    padding: .9rem;
    align-items: flex-end;
  }

  .coach-payment-automation-card{
    width: min(100%, 34rem);
    max-height: 84vh;
    border-radius: 20px;
  }

  .coach-payment-automation-header,
  .coach-payment-automation-body,
  .coach-payment-automation-actions{
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .coach-payment-automation-heading strong{
    font-size: 1.15rem;
  }

  .coach-payment-automation-actions > .pill-link{
    width: 100%;
    justify-content: center;
  }

  .coach-payment-share-modal{
    padding: .9rem;
    align-items: flex-end;
  }

  .coach-payment-share-card{
    width: min(100%, 40rem);
    max-height: 86vh;
    border-radius: 20px;
  }

  .coach-payment-share-header,
  .coach-payment-share-body,
  .coach-payment-share-actions{
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .coach-payment-share-heading strong{
    font-size: 1.02rem;
  }

  .coach-payment-share-override,
  .coach-payment-share-grid,
  .coach-payment-share-link-row{
    grid-template-columns: 1fr;
  }

  .coach-payment-share-delivery{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .coach-payment-share-override{
    align-items: flex-start;
    padding: .75rem .8rem;
  }

  .coach-payment-share-link-row{
    align-items: stretch;
  }

  .coach-payment-share-section{
    padding: .2rem 0 0;
  }

  .coach-payment-share-link-remove,
  .coach-payment-share-footer-actions > .pill-link{
    width: 100%;
    justify-content: center;
  }

  .coach-payment-share-actions,
  .coach-payment-share-footer-actions{
    display: grid;
  }

  .coach-payment-share-actions{
    align-items: stretch;
    gap: .7rem;
  }
}

@media (max-width: 560px){
  .coach-payment-share-grid,
  .coach-payment-share-link-row{
    grid-template-columns: 1fr;
  }

  .coach-payment-share-link-row{
    align-items: stretch;
  }

  .coach-payment-share-link-remove,
  .coach-payment-share-footer-actions > .pill-link{
    width: 100%;
    justify-content: center;
  }

  .coach-payment-share-actions,
  .coach-payment-share-footer-actions{
    display: grid;
  }

  .coach-payment-share-delivery{
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
  }

  .coach-payment-share-delivery-option{
    min-height: 2.2rem;
    padding: .52rem .5rem;
    font-size: .82rem;
  }
}

.coach-directory-shell{
  display: grid;
  gap: 1.15rem;
}

.coach-payments-shell{
  display: grid;
  gap: 1.15rem;
}

.coach-dashboard-page .shell{
  background: transparent;
}

.coach-dashboard-shell{
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

.coach-dashboard-head{
  background: none !important;
  padding: 0;
}

.coach-dashboard-title{
  margin: 0 0 .25rem;
  font-size: clamp(1.9rem, 2.2vw, 2.8rem);
  letter-spacing: -.02em;
}

.coach-dashboard-panel{
  border-radius: 20px;
  padding: 1.25rem;
}

.coach-dashboard-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.coach-dashboard-panel-title{
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.coach-dashboard-panel-title strong{
  font-size: 1.05rem;
}

.coach-dashboard-icon-shell{
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(86,127,0,.14);
  background: rgba(86,127,0,.08);
  color: #567f00;
  flex: 0 0 auto;
}

.coach-dashboard-icon-shell .nav-icon-lucide{
  width: 1.38rem;
  height: 1.38rem;
}

.coach-dashboard-week-chip{
  display: inline-flex;
  align-items: center;
  gap: .46rem;
  min-height: 2.7rem;
  padding: .5rem .82rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(22,25,22,.04);
}

.coach-dashboard-week-chip .nav-icon-lucide{
  width: 15px;
  height: 15px;
}

.coach-dashboard-period.is-open .coach-dashboard-week-chip{
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.coach-dashboard-period{
  position: relative;
}

.coach-dashboard-period-menu{
  position: absolute;
  top: calc(100% + .42rem);
  right: 0;
  min-width: 11.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(22,25,22,.12);
  padding: .28rem;
  display: none;
  z-index: 60;
}

.coach-dashboard-period.is-open .coach-dashboard-period-menu{
  display: grid;
  gap: .12rem;
}

.coach-dashboard-period-item{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  padding: .52rem .62rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.coach-dashboard-period-item:hover,
.coach-dashboard-period-item:focus-visible{
  background: color-mix(in srgb, var(--soft) 86%, transparent);
  outline: none;
}

.coach-dashboard-period-item.is-active{
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: color-mix(in srgb, var(--brand) 78%, var(--text));
}

.coach-dashboard-period-item.is-active::after{
  content: "?";
  font-size: .8rem;
  font-weight: 800;
  color: inherit;
}

/* Force dashboard period control to use dropdown-menu styling (not global button pills). */
body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-week-chip{
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  background-image: none !important;
  color: var(--text) !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 0 rgba(22,25,22,.04) !important;
}

body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-menu{
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  background-image: none !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(22,25,22,.12) !important;
  padding: .26rem !important;
}

body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item{
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  min-height: 2.25rem !important;
}

body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item:hover,
body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item:focus,
body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item:focus-visible{
  border: 0 !important;
  background: color-mix(in srgb, var(--soft) 86%, transparent) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item.is-active{
  border: 0 !important;
  background: color-mix(in srgb, var(--soft) 86%, transparent) !important;
  color: var(--text) !important;
}

body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-item.is-active::after{
  content: "?";
  color: color-mix(in srgb, var(--brand) 78%, var(--text));
}

.coach-dashboard-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.coach-dashboard-grid .coach-dashboard-card{
  border-radius: 16px;
  padding: 1.15rem;
  border: 1px solid rgba(159,163,160,.22);
  box-shadow: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.coach-dashboard-card-head{
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}

.coach-dashboard-grow{
  flex: 1 1 auto;
  min-width: 0;
}

.coach-dashboard-label{
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
}

.coach-dashboard-value{
  margin-top: .12rem;
  font-size: clamp(1.75rem, 1.9vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
}

.coach-dashboard-card .muted{
  margin-top: .38rem;
}

.coach-dashboard-card p.muted{
  margin-bottom: 0;
}

.coach-dashboard-progress{
  --coach-progress: 0%;
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  background:
    radial-gradient(circle at center, var(--card) 66%, transparent 67%),
    conic-gradient(#567f00 var(--coach-progress), rgba(209,213,210,.92) 0);
}

.coach-dashboard-progress span{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
}

.coach-dashboard-actions{
  margin-top: .95rem;
}

.coach-dashboard-action{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.8rem;
  padding: .58rem 1rem;
  border-radius: 13px;
}

.coach-dashboard-card-action .coach-dashboard-card-head > div{
  flex: 1 1 auto;
  min-width: 0;
}

.coach-automations-shell{
  max-width: 72rem;
  display: grid;
  gap: 1.5rem;
  --automation-surface: #3b3e3c;
  --automation-surface-soft: rgba(255,255,255,.06);
  --automation-surface-soft-2: #484b48;
  --automation-border: rgba(206,210,207,.2);
  --automation-border-strong: rgba(206,210,207,.34);
  --automation-text: #f5f7fa;
  --automation-muted: #ced2cf;
  --automation-accent: #97d337;
  --automation-shadow: 0 16px 34px rgba(22,25,22,.24);
}

.coach-automations-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.coach-automations-head h2{
  margin: 0 0 .25rem;
  color: var(--automation-text);
}

.coach-automations-head .muted,
.coach-automations-empty .muted,
.coach-automation-switch-copy .muted,
.coach-automation-field .muted,
.coach-automation-brand-head .muted,
.coach-automation-message-head .muted,
.coach-automation-preview-subject .muted{
  color: var(--automation-muted);
}

.coach-automations-new-btn{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding-inline: 1.1rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #97d337, #83b632);
  color: #111412;
  box-shadow: 0 18px 36px rgba(151,211,55,.22);
}

.coach-automations-vars,
.coach-automation-card,
.coach-automations-empty{
  border-radius: 22px;
  border: 1px solid var(--automation-border);
  background: var(--automation-surface);
  box-shadow: var(--automation-shadow);
}

.coach-automations-vars{
  padding: 1.15rem 1.2rem;
}

.coach-automations-card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
  color: var(--automation-text);
}

.coach-automation-badges{
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.coach-automation-code-badge{
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .35rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(151,211,55,.22);
  background: rgba(151,211,55,.08);
  color: #b0f347;
  font-size: .88rem;
}

.coach-automations-list{
  display: grid;
  gap: 1rem;
}

.coach-automations-section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.coach-automation-card{
  padding: 1.35rem;
  display: grid;
  gap: 1rem;
  opacity: 1;
  animation: coachAutomationFade .34s ease both;
  animation-delay: var(--automation-delay, 0ms);
}

.coach-automation-card.is-stock{
  border-color: rgba(151,211,55,.18);
}

.coach-automation-card.is-inactive{
  opacity: .62;
}

.coach-automation-card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.coach-automation-card-main{
  display: grid;
  gap: .65rem;
  min-width: 0;
}

.coach-automation-card-main strong{
  font-size: 1.1rem;
  color: var(--automation-text);
}

.coach-automation-badge-row{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.coach-automation-pill{
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 1.85rem;
  padding: 0 .68rem;
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.2);
  background: rgba(255,255,255,.04);
  color: #e3e7e4;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.coach-automation-pill.is-channel,
.coach-automation-pill.is-primary{
  background: rgba(131,182,50,.12);
  border-color: rgba(151,211,55,.24);
  color: #a2e13c;
}

.coach-automation-pill.is-warning{
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.26);
  color: #fcd34d;
}

.coach-automation-pill.is-destructive{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.24);
  color: #fca5a5;
}

.coach-automation-pill.is-success{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.24);
  color: #86efac;
}

.coach-automation-pill.is-muted,
.coach-automation-pill.is-disabled{
  background: rgba(159,163,160,.12);
  border-color: rgba(159,163,160,.22);
  color: #d1d5d2;
}

.coach-automation-pill.is-recurring,
.coach-automation-pill.is-days{
  background: rgba(95,140,1,.14);
  border-color: rgba(122,170,47,.22);
  color: #d1d5d2;
}

.coach-automation-actions{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.coach-automation-use-btn{
  min-height: 2.5rem;
  padding: .65rem .9rem;
  border-radius: 14px;
  border: 1px solid rgba(151,211,55,.22);
  background: rgba(151,211,55,.1);
  color: #bcfd5e;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
}

.coach-automation-icon-btn{
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #e3e7e4;
  box-shadow: none;
}

.coach-automation-icon-btn.is-success{
  color: #4ade80;
}

.coach-automation-icon-btn.is-danger{
  color: #f87171;
}

.coach-automation-copy{
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.coach-automation-subject{
  font-weight: 700;
  color: #acb0ad;
  font-size: 1.08rem;
}

.coach-automation-body-preview{
  color: var(--automation-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}

.coach-automation-modal{
  padding: 1rem;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.coach-automation-modal .modal-backdrop{
  background: rgba(6,8,6,.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 0;
}

.coach-automation-modal-card,
.coach-automation-preview-card{
  width: min(708px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  border: 1px solid rgba(169,173,170,.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(16,18,16,.985), rgba(10,12,10,.995)),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  box-shadow:
    0 24px 70px rgba(6,8,6,.42),
    0 8px 24px rgba(6,8,6,.26);
  z-index: 2;
  opacity: 1;
  filter: none;
  backdrop-filter: none;
  padding: 0;
  overflow: hidden;
}

.coach-automation-preview-card{
  width: min(680px, calc(100vw - 2rem));
}

.coach-automation-editor-header{
  padding: 1.55rem 1.6rem 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(159,163,160,.08);
}

.coach-automation-editor-header strong{
  color: var(--automation-text);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.coach-automation-close-btn{
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.24);
  background: rgba(255,255,255,.02);
  color: #c9cdca;
  box-shadow: none;
  padding: 0;
}

.coach-automation-modal-body,
.coach-automation-preview-body{
  display: grid;
  gap: 1.5rem;
  padding: 1.1rem 1.6rem 1.4rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.coach-automation-tabs{
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  padding: .34rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(42,45,42,.88), rgba(36,39,37,.92));
  border: 1px solid rgba(159,163,160,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}

.coach-automation-tabs .coach-automation-tab{
  appearance: none;
  min-height: 2.65rem;
  padding: .6rem .95rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #9b9f9c;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
  text-shadow: none;
  transition: background .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0;
  background-image: none;
  box-shadow: none;
  font-size: .98rem;
}

.coach-automation-tabs .coach-automation-tab.is-active{
  background: linear-gradient(180deg, rgba(12,14,12,.98), rgba(10,12,10,.98));
  color: #f8fbff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 0 1px rgba(81,85,82,.38);
}

.coach-automation-tabs .coach-automation-tab:not(.is-active):hover,
.coach-automation-tabs .coach-automation-tab:not(.is-active):focus-visible{
  color: #cccfcc;
  background: rgba(255,255,255,.025);
  transform: none;
}

.coach-automation-tabs .coach-automation-tab:focus-visible{
  outline: none;
}

.coach-automation-form,
.coach-automation-panel{
  display: grid;
  gap: 1.25rem;
}

.coach-automation-content-panel{
  gap: 1.4rem;
}

.coach-automation-settings-panel{
  gap: 1.35rem;
}

.coach-automation-branding-panel{
  gap: 1.35rem;
}

.coach-automation-grid2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.coach-automation-panel{
  display: none;
}

.coach-automation-panel.is-active{
  display: grid;
}

.coach-automation-field{
  gap: .55rem;
}

.coach-automation-field-label{
  color: var(--automation-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.coach-automation-field-help{
  margin-top: .1rem;
  color: var(--automation-muted);
  font-size: .92rem;
  line-height: 1.5;
}

.coach-automation-content-body-block{
  display: grid;
  gap: .9rem;
  min-width: 0;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(19,21,19,.7), rgba(14,17,15,.86));
  border: 1px solid rgba(159,163,160,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.coach-automation-form input,
.coach-automation-form select,
.coach-automation-form textarea{
  min-height: 3.05rem;
  border-radius: 16px;
  border: 1px solid rgba(137,140,137,.16);
  background: linear-gradient(180deg, rgba(13,16,14,.9), rgba(12,14,12,.96));
  color: #f3f6f3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  padding: .8rem .95rem;
}

.coach-automation-form textarea{
  min-height: 11.75rem;
  resize: vertical;
  background: linear-gradient(180deg, rgba(10,13,11,.96), rgba(8,11,9,.99));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    inset 0 0 0 1px rgba(21,24,21,.18);
}

.coach-automation-form #automation-body{
  min-height: 9.5rem;
}

.coach-automation-form input::placeholder,
.coach-automation-form textarea::placeholder{
  color: #838784;
}

.coach-automation-form input:focus,
.coach-automation-form select:focus,
.coach-automation-form textarea:focus{
  border-color: rgba(133,184,52,.34);
  box-shadow: 0 0 0 3px rgba(151,211,55,.08);
}

.coach-automation-toolbar-card,
.coach-automation-switch-card,
.coach-automation-recurring-grid{
  border-radius: 20px;
  border: 1px solid rgba(159,163,160,.1);
  background: linear-gradient(180deg, rgba(23,26,23,.66), rgba(18,20,18,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.coach-automation-toolbar-card{
  padding: .8rem;
  gap: .8rem;
  display: grid;
}

.coach-automation-toolbar-row,
.coach-automation-variable-buttons,
.coach-automation-accent-row{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-width: 0;
}

.coach-automation-content-body-block .coach-automation-toolbar-row{
  gap: .5rem;
  align-items: center;
}

.coach-automation-variable-buttons{
  padding-top: 0;
  gap: .65rem;
  align-items: flex-start;
}

.coach-automation-variable-note{
  margin: .2rem 0 .15rem;
  line-height: 1.5;
}

.coach-automation-toolbar-btn,
.coach-automation-variable-btn,
.coach-automation-emoji-picker > summary{
  min-height: 2.2rem;
  padding: .5rem .76rem;
  border-radius: 12px;
  border: 1px solid rgba(135,138,135,.18);
  background: rgba(19,21,19,.72);
  color: #edf1ee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  box-shadow: none;
}

.coach-automation-content-body-block .coach-automation-toolbar-btn,
.coach-automation-content-body-block .coach-automation-emoji-picker > summary{
  appearance: none;
  width: 2.2rem;
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0;
  border-radius: 10px;
  border-color: rgba(135,138,135,.2);
  background: rgba(16,18,16,.78);
}

.coach-automation-toolbar-divider{
  width: 1px;
  height: 1.4rem;
  background: rgba(159,163,160,.16);
  margin: 0 .15rem;
}

.coach-automation-variable-btn{
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.05rem;
  padding: 0 .78rem;
  border: 1px solid rgba(151,211,55,.1);
  border-radius: 999px;
  background: rgba(151,211,55,.08);
  color: #aaeb43;
  font-size: .84rem;
  font-weight: 700;
  box-shadow: none;
  white-space: nowrap;
  text-decoration: none;
}

.coach-automation-variable-btn:hover,
.coach-automation-variable-btn:focus-visible{
  color: #b5fc44;
  background: rgba(151,211,55,.12);
  transform: none;
}

.coach-automation-emoji-picker{
  position: relative;
  flex: 0 0 auto;
}

.coach-automation-emoji-picker > summary{
  list-style: none;
  cursor: pointer;
}

.coach-automation-emoji-picker > summary::-webkit-details-marker{
  display: none;
}

.coach-automation-emoji-grid{
  position: absolute;
  top: calc(100% + .45rem);
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .42rem;
  padding: .7rem;
  width: 188px;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.22);
  background: linear-gradient(180deg, rgba(16,18,16,.98), rgba(12,14,12,.99));
  box-shadow: 0 18px 44px rgba(6,8,6,.42);
  max-width: min(220px, calc(100vw - 3rem));
}

.coach-automation-emoji-btn{
  min-height: 2.3rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.14);
  background: rgba(255,255,255,.03);
  font-size: 1rem;
  padding: 0;
  box-shadow: none;
}

.coach-automation-conditional,
.coach-automation-recurring-grid{
  padding: .9rem;
}

.coach-automation-conditional{
  display: grid;
  gap: .4rem;
}

.coach-automation-conditional[hidden],
.coach-automation-trigger-card[hidden],
.coach-automation-switch-card[hidden],
.coach-automation-recurring-grid[hidden],
#automation-schedule-weekday-wrap[hidden],
#automation-schedule-day-of-month-wrap[hidden]{
  display: none !important;
}

.coach-automation-trigger-card{
  gap: 1rem;
  padding: 1rem 1rem 1.05rem;
}

.coach-automation-trigger-card-head{
  display: flex;
  align-items: center;
  gap: .55rem;
}

.coach-automation-trigger-card-head .nav-icon-lucide{
  color: #9dd93f;
}

.coach-automation-trigger-card-head strong{
  color: var(--automation-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.015em;
}

.coach-automation-plain-section{
  padding: 0;
}

.coach-automation-switch-card{
  padding: 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 20px;
  border-color: rgba(159,163,160,.1);
  background: linear-gradient(180deg, rgba(20,22,20,.74), rgba(14,17,15,.9));
  min-height: 5rem;
}

.coach-automation-switch-copy{
  display: grid;
  gap: .2rem;
}

.coach-automation-switch-copy strong{
  color: var(--automation-text);
  font-size: 1rem;
}

.coach-automation-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  cursor: pointer;
}

.coach-automation-switch input{
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  min-height: auto;
}

.coach-automation-switch-track{
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(45,48,46,.95);
  transition: background .2s ease, box-shadow .2s ease;
}

.coach-automation-switch-track::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #111412;
  box-shadow: 0 3px 8px rgba(6,8,6,.35);
  transition: transform .2s ease, background .2s ease;
}

.coach-automation-switch input:checked + .coach-automation-switch-track{
  background: linear-gradient(135deg, #97d337, #83b632);
}

.coach-automation-switch input:checked + .coach-automation-switch-track::after{
  transform: translateX(20px);
  background: #0f1210;
}

.coach-automation-switch input:focus-visible + .coach-automation-switch-track{
  box-shadow: 0 0 0 3px rgba(151,211,55,.18);
}

.coach-automation-recurring-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(159,163,160,.1);
  background: linear-gradient(180deg, rgba(20,22,20,.74), rgba(14,17,15,.9));
  box-shadow: none;
}

.coach-automation-accent-label{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--automation-text);
  margin-bottom: .05rem;
  font-size: 1rem;
}

.coach-automation-branding-stack{
  display: grid;
  gap: 1.1rem;
}

.coach-automation-accent-btn{
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.14);
  background: var(--automation-accent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: none;
}

.coach-automation-accent-btn.is-selected{
  transform: scale(1.02);
  border-color: rgba(255,255,255,.94);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}

.coach-automation-brand-preview,
.coach-automation-message-card{
  --automation-live-accent: hsl(190 95% 52%);
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.16);
  background: rgba(255,255,255,.03);
  overflow: hidden;
}

.coach-automation-brand-stripe,
.coach-automation-message-stripe{
  height: 8px;
  background: var(--automation-live-accent);
}

.coach-automation-brand-preview{
  display: grid;
  background: linear-gradient(180deg, rgba(22,25,23,.92), rgba(19,21,19,.96));
}

.coach-automation-brand-head,
.coach-automation-message-head{
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.15rem 1rem 1.1rem;
}

.coach-automation-message-copy{
  padding: 0 1rem 1rem;
  color: #e3e6e3;
  line-height: 1.6;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.coach-automation-brand-avatar,
.coach-automation-message-avatar,
.coach-automation-brand-logo,
.coach-automation-message-logo{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
}

.coach-automation-brand-avatar,
.coach-automation-message-avatar{
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--automation-live-accent) 22%, transparent);
  color: var(--automation-live-accent);
  font-weight: 800;
}

.coach-automation-brand-logo,
.coach-automation-message-logo{
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(159,163,160,.2);
}

.coach-automation-brand-avatar[hidden],
.coach-automation-message-avatar[hidden],
.coach-automation-brand-logo[hidden],
.coach-automation-message-logo[hidden]{
  display: none !important;
}

.coach-automation-brand-head strong,
.coach-automation-message-head strong{
  color: #ffffff;
}

.coach-automation-accent-row{
  gap: .55rem;
}

.coach-automation-branding-panel .coach-automation-switch-card{
  min-height: 4.85rem;
}

.coach-automation-preview-subject{
  display: grid;
  gap: .35rem;
  color: var(--automation-text);
}

.coach-automation-preview-note{
  line-height: 1.5;
  margin-top: -.25rem;
}

.coach-automation-modal-actions{
  padding: 1.1rem 1.6rem 1.6rem;
  border-top: 1px solid rgba(159,163,160,.08);
  justify-content: flex-end;
  gap: .7rem;
  background: linear-gradient(180deg, rgba(13,15,13,.08), rgba(13,15,13,.36));
}

.coach-automation-action-btn{
  min-height: 3rem;
  padding: .82rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.2);
  background: rgba(255,255,255,.015);
  color: #f8fbff;
  font-weight: 700;
  box-shadow: none;
}

.coach-automation-action-btn:hover,
.coach-automation-action-btn:focus-visible{
  background: rgba(255,255,255,.03);
  border-color: rgba(197,201,197,.3);
  transform: none;
}

.coach-automation-action-btn.is-primary{
  border-color: rgba(151,211,55,.1);
  background: linear-gradient(135deg, #97d337, #83b632);
  color: #111412;
}

.coach-automation-action-btn.is-primary:hover,
.coach-automation-action-btn.is-primary:focus-visible{
  background: linear-gradient(135deg, #9fdd3e, #8ec634);
}

html:not([data-theme="dark"]) .coach-automations-vars,
html:not([data-theme="dark"]) .coach-automation-card,
html:not([data-theme="dark"]) .coach-automations-empty,
html:not([data-theme="dark"]) .coach-automation-modal-card,
html:not([data-theme="dark"]) .coach-automation-preview-card{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  border-color: rgba(209,213,210,.9);
  box-shadow: 0 24px 52px rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .coach-automations-shell{
  --automation-surface: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  --automation-surface-soft: rgba(22,25,22,.03);
  --automation-border: rgba(209,213,210,.88);
  --automation-border-strong: rgba(159,163,160,.5);
  --automation-text: #161916;
  --automation-muted: #707471;
  --automation-shadow: 0 24px 52px rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .coach-automation-code-badge,
html:not([data-theme="dark"]) .coach-automation-pill.is-channel,
html:not([data-theme="dark"]) .coach-automation-pill.is-primary{
  color: #4e6f18;
}

html:not([data-theme="dark"]) .coach-automation-pill,
html:not([data-theme="dark"]) .coach-automation-tab,
html:not([data-theme="dark"]) .coach-automation-toolbar-btn,
html:not([data-theme="dark"]) .coach-automation-variable-btn,
html:not([data-theme="dark"]) .coach-automation-emoji-picker > summary,
html:not([data-theme="dark"]) .coach-automation-toolbar-card,
html:not([data-theme="dark"]) .coach-automation-switch-card,
html:not([data-theme="dark"]) .coach-automation-recurring-grid,
html:not([data-theme="dark"]) .coach-automation-brand-preview,
html:not([data-theme="dark"]) .coach-automation-message-card{
  background: rgba(248,250,252,.96);
  color: #272a27;
  border-color: rgba(209,213,210,.9);
}

html:not([data-theme="dark"]) .coach-automation-pill.is-channel,
html:not([data-theme="dark"]) .coach-automation-pill.is-primary{
  background: rgba(131,182,50,.12);
  border-color: rgba(151,211,55,.24);
  color: #689224;
}

html:not([data-theme="dark"]) .coach-automation-pill.is-warning{
  background: rgba(245,158,11,.14);
  border-color: rgba(245,158,11,.24);
  color: #b45309;
}

html:not([data-theme="dark"]) .coach-automation-pill.is-destructive{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.2);
  color: #dc2626;
}

html:not([data-theme="dark"]) .coach-automation-pill.is-success{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.22);
  color: #15803d;
}

html:not([data-theme="dark"]) .coach-automation-pill.is-recurring,
html:not([data-theme="dark"]) .coach-automation-pill.is-days{
  background: rgba(95,140,1,.12);
  border-color: rgba(122,170,47,.2);
  color: #4e7402;
}

html:not([data-theme="dark"]) .coach-automation-pill.is-muted,
html:not([data-theme="dark"]) .coach-automation-pill.is-disabled{
  background: rgba(159,163,160,.12);
  border-color: rgba(159,163,160,.22);
  color: #525552;
}

html:not([data-theme="dark"]) .coach-automation-subject{
  color: #3e413e;
}

html:not([data-theme="dark"]) .coach-automation-tabs{
  background: linear-gradient(180deg, rgba(229,233,229,.98), rgba(223,226,223,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), inset 0 -1px 0 rgba(159,163,160,.08);
}

html:not([data-theme="dark"]) .coach-automation-tabs .coach-automation-tab.is-active{
  background: rgba(255,255,255,.96);
  color: #161916;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

html:not([data-theme="dark"]) .coach-automation-tabs .coach-automation-tab{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-automation-close-btn{
  color: #3e413e;
  background: transparent;
  border-color: transparent;
}

html:not([data-theme="dark"]) .coach-automation-use-btn{
  color: #425e15;
  background: rgba(123,172,44,.1);
  border-color: rgba(123,172,44,.2);
}

html:not([data-theme="dark"]) .coach-automation-body-preview{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-automation-emoji-grid{
  background: rgba(255,255,255,.98);
}

html:not([data-theme="dark"]) .coach-automation-form input,
html:not([data-theme="dark"]) .coach-automation-form select,
html:not([data-theme="dark"]) .coach-automation-form textarea{
  background: rgba(255,255,255,.98);
  color: #161916;
  border-color: rgba(209,213,210,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

html:not([data-theme="dark"]) .coach-automation-variable-btn,
html:not([data-theme="dark"]) .coach-automation-toolbar-btn,
html:not([data-theme="dark"]) .coach-automation-emoji-picker > summary{
  background: rgba(255,255,255,.98);
  border-color: rgba(209,213,210,.88);
  color: #161916;
}

html:not([data-theme="dark"]) .coach-automation-icon-btn{
  background: transparent;
  border-color: transparent;
  color: #3e413e;
  box-shadow: none;
}

html:not([data-theme="dark"]) .coach-automation-icon-btn.is-success{
  color: #16a34a;
}

html:not([data-theme="dark"]) .coach-automation-icon-btn.is-danger{
  color: #dc2626;
}

html:not([data-theme="dark"]) .coach-automation-content-body-block .coach-automation-toolbar-btn,
html:not([data-theme="dark"]) .coach-automation-content-body-block .coach-automation-emoji-picker > summary{
  background: rgba(255,255,255,.98);
}

html:not([data-theme="dark"]) .coach-automation-variable-btn{
  color: #638c21;
  background: rgba(123,172,44,.08);
  border-color: rgba(123,172,44,.1);
}

html:not([data-theme="dark"]) .coach-automation-content-body-block{
  background: linear-gradient(180deg, rgba(249,250,251,.98), rgba(244,246,248,.96));
  border-color: rgba(209,213,210,.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}

html:not([data-theme="dark"]) .coach-automation-toolbar-divider{
  background: rgba(159,163,160,.3);
}

html:not([data-theme="dark"]) .coach-automation-toolbar-card,
html:not([data-theme="dark"]) .coach-automation-switch-card,
html:not([data-theme="dark"]) .coach-automation-recurring-grid{
  background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(241,245,249,.96));
}

html:not([data-theme="dark"]) .coach-automation-switch-card,
html:not([data-theme="dark"]) .coach-automation-recurring-grid{
  border-color: rgba(209,213,210,.82);
}

html:not([data-theme="dark"]) .coach-automation-brand-preview{
  background: rgba(241,245,249,.98);
}

html:not([data-theme="dark"]) .coach-automation-brand-head strong,
html:not([data-theme="dark"]) .coach-automation-message-head strong{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-automation-switch-track{
  background: rgba(209,213,210,.95);
}

html:not([data-theme="dark"]) .coach-automation-switch-track::after{
  background: #ffffff;
}

html:not([data-theme="dark"]) .coach-automation-message-copy{
  color: #3e413e;
}

html:not([data-theme="dark"]) .coach-automation-action-btn{
  color: #161916;
  border-color: rgba(209,213,210,.88);
}

html:not([data-theme="dark"]) .coach-automation-action-btn:hover,
html:not([data-theme="dark"]) .coach-automation-action-btn:focus-visible{
  background: rgba(248,250,252,.95);
  border-color: rgba(159,163,160,.58);
}

html:not([data-theme="dark"]) .coach-automation-action-btn.is-primary{
  border-color: rgba(123,172,44,.18);
  color: #1b1e1c;
}

@keyframes coachAutomationFade{
  from{
    opacity: 0;
    transform: translateY(8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.coach-payments-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.coach-payments-head h2{
  margin: 0 0 .25rem;
}

.coach-payments-dashboard-currency{
  display: inline-flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}

.coach-payments-dashboard-currency label{
  display: grid;
  gap: .35rem;
}

.coach-payments-dashboard-currency select{
  min-width: 7rem;
}

.coach-payments-save-btn{
  border: 1px solid rgba(20,83,45,.72) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.24), rgba(21,128,61,.14)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.22),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 22px rgba(21,128,61,.16) !important;
}

.coach-payments-save-btn:hover,
.coach-payments-save-btn:focus-visible{
  border-color: rgba(22,163,74,.72) !important;
  color: #f0fdf4 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.3), rgba(21,128,61,.18)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.26),
    inset 0 1px 0 rgba(255,255,255,.12),
    0 14px 26px rgba(21,128,61,.2) !important;
}

html[data-theme="light"] .coach-payments-save-btn{
  background: linear-gradient(135deg, rgba(220,252,231,.98), rgba(240,253,244,.96)) !important;
  color: #166534 !important;
  border: 1px solid rgba(21,128,61,.58) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.12),
    inset 0 1px 0 rgba(255,255,255,.9),
    0 10px 22px rgba(34,197,94,.08) !important;
}

html[data-theme="light"] .coach-payments-save-btn:hover,
html[data-theme="light"] .coach-payments-save-btn:focus-visible{
  background: linear-gradient(135deg, rgba(187,247,208,.98), rgba(220,252,231,.96)) !important;
  color: #14532d !important;
  border-color: rgba(21,128,61,.68) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.14),
    inset 0 1px 0 rgba(255,255,255,.92),
    0 14px 26px rgba(34,197,94,.12) !important;
}

.coach-payments-metrics{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.coach-payments-metric-card,
.coach-payments-table-card,
.coach-payments-mobile-card{
  border: 1px solid rgba(86,127,0,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
}

.coach-payments-metric-card{
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.15rem 1.1rem;
  min-height: 114px;
  height: 100%;
}

.coach-payments-metric-card > div:last-child{
  display: grid;
  align-content: center;
  gap: .14rem;
  min-height: 72px;
}

.coach-payments-metric-icon{
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159,163,160,.14);
  background: rgba(255,255,255,.04);
}

.coach-payments-metric-card.is-expected .coach-payments-metric-icon{
  color: #97d337;
  background: rgba(151,211,55,.12);
}

.coach-payments-metric-card.is-collected .coach-payments-metric-icon{
  color: #22c55e;
  background: rgba(34,197,94,.12);
}

.coach-payments-metric-card.is-outstanding .coach-payments-metric-icon{
  color: #f59e0b;
  background: rgba(245,158,11,.12);
}

.coach-payments-metric-card.is-overdue .coach-payments-metric-icon{
  color: #ef4444;
  background: rgba(239,68,68,.12);
}

.coach-payments-metric-label{
  display: block;
  color: #9ea29f;
  font-size: .92rem;
  margin-bottom: .2rem;
}

.coach-payments-metric-card strong{
  font-size: 1.15rem;
}

.coach-payments-table-card{
  overflow: hidden;
}

.coach-payments-table-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(159,163,160,.12);
}

.coach-payments-table-wrap{
  overflow-x: auto;
}

.coach-payments-table{
  width: 100%;
  border-collapse: collapse;
}

.coach-payments-table th,
.coach-payments-table td{
  padding: .95rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(159,163,160,.1);
  vertical-align: middle;
}

.coach-payments-table th{
  color: #9ea29f;
  font-size: .85rem;
  font-weight: 700;
}

.coach-payments-client-cell{
  display: grid;
  gap: .18rem;
}

.coach-payments-actions-row{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.coach-payments-actions-row form{
  margin: 0;
}

.coach-payments-icon-btn{
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #d2d6d3;
  text-decoration: none;
  box-shadow: none;
}

.coach-payments-icon-btn.is-success{
  color: #22c55e;
}

.coach-payments-icon-btn.is-warning{
  color: #fbbf24;
}

.coach-payments-icon-btn:hover{
  background: rgba(255,255,255,.05);
}

.coach-payments-mobile-list{
  display: none;
  gap: .85rem;
  padding: 1rem;
}

.settings-mobile-shortcut{
  margin-bottom: .9rem;
}

.settings-mobile-shortcut-link{
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  text-decoration: none;
  color: inherit;
}

.settings-mobile-shortcut-icon{
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(151,211,55,.12);
  color: #97d337;
}

.coach-directory-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.coach-directory-head h2{
  margin: 0 0 .25rem;
}

.coach-directory-add{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.8rem;
  padding: .72rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #97d337, #83b632);
  color: #0f1210;
}

.coach-directory-invite{
  position: relative;
}

.coach-directory-invite > summary{
  list-style: none;
  cursor: pointer;
}

.coach-directory-invite > summary::-webkit-details-marker{
  display: none;
}

.coach-directory-invite-panel{
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  display: grid;
  gap: .8rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(197,201,197,.42);
  background: linear-gradient(180deg, rgba(17,19,17,.96), rgba(12,15,13,.98));
  box-shadow: 0 18px 48px rgba(0,0,0,.3);
  z-index: 40;
}

.coach-directory-invite-code{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.6rem;
  padding: .7rem .9rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.16);
  background: rgba(255,255,255,.04);
  font-weight: 700;
  letter-spacing: .08em;
}

.coach-directory-invite-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.coach-directory-invite-actions form{
  margin: 0;
  grid-column: 1 / -1;
}

.coach-directory-invite-actions button{
  width: 100%;
  min-height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  white-space: nowrap;
  font-size: .92rem;
  padding-inline: .78rem;
}

.coach-directory-stats{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.coach-directory-stat{
  display: grid;
  place-items: center;
  gap: .15rem;
  min-height: 4.5rem;
  padding: .95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  height: 100%;
}

.coach-directory-stat.is-highlighted{
  border-color: rgba(151,211,55,.55);
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.22);
}

.coach-directory-stat strong{
  font-size: 2rem;
  line-height: 1;
}

.coach-directory-stat span{
  color: #9ea29f;
  font-size: .92rem;
}

.coach-directory-search{
  display: grid;
  gap: .9rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
}

.coach-directory-search-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.coach-directory-search-title{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.coach-directory-search-title .nav-icon-lucide{
  color: #97d337;
}

.coach-directory-search-form{
  margin: 0;
}

.coach-directory-search-input{
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 3rem;
  padding: 0 .9rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.04);
}

.coach-directory-search-input .nav-icon-lucide{
  color: #919592;
  flex: 0 0 auto;
}

.coach-directory-search-input input{
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.coach-directory-search-input input:focus{
  outline: none;
  box-shadow: none;
}

.coach-directory-list{
  display: grid;
  gap: .8rem;
}

.coach-directory-card{
  border-radius: 18px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  overflow: hidden;
}

.coach-directory-card > summary{
  list-style: none;
  cursor: pointer;
}

.coach-directory-card > summary::-webkit-details-marker{
  display: none;
}

.coach-directory-card-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1rem;
}

.coach-directory-card-main{
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.coach-directory-avatar{
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(131,182,50,.2), rgba(86,127,0,.28));
  color: #aaeb42;
  font-weight: 800;
  letter-spacing: .03em;
}

.coach-directory-card-copy{
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.coach-directory-card-title-row{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.coach-directory-card-title-row strong,
.coach-directory-card-copy .muted{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-directory-status{
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 .62rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.coach-directory-status.is-active{
  background: rgba(22,163,74,.18);
  color: #86efac;
  border-color: rgba(34,197,94,.18);
}

.coach-directory-status.is-paid{
  background: rgba(22,163,74,.18);
  color: #86efac;
  border-color: rgba(34,197,94,.18);
}

.coach-directory-status.is-inactive{
  background: rgba(159,163,160,.14);
  color: #d1d5d2;
  border-color: rgba(159,163,160,.22);
}

.coach-directory-status.is-paused{
  background: rgba(245,158,11,.16);
  color: #fcd34d;
  border-color: rgba(245,158,11,.22);
}

.coach-directory-card-right{
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  flex: 0 0 auto;
}

.coach-directory-plan{
  color: #9ea29f;
  font-size: .92rem;
  font-weight: 500;
}

.coach-directory-dashboard,
.coach-directory-message{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #97d337;
  text-decoration: none;
}

.coach-directory-caret{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ea29f;
  transition: transform .2s ease;
}

.coach-directory-card[open] .coach-directory-caret{
  transform: rotate(180deg);
}

.coach-directory-card-body{
  display: grid;
  gap: .85rem;
  padding: .95rem 1rem 1rem;
  border-top: 1px solid rgba(159,163,160,.08);
}

.coach-directory-meta-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.coach-directory-meta-item{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #9ea29f;
  min-width: 0;
}

.coach-directory-meta-item .nav-icon-lucide{
  color: #919592;
  flex: 0 0 auto;
}

.coach-directory-meta-item span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-directory-payment{
  font-size: .92rem;
}

.coach-directory-card-actions{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem;
}

.coach-directory-primary-actions{
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.coach-directory-more{
  position: relative;
}

.coach-directory-more > summary{
  list-style: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e3e7e4;
  background: rgba(255,255,255,.03);
}

.coach-directory-more > summary::-webkit-details-marker{
  display: none;
}

.coach-directory-more-menu{
  position: absolute;
  right: 0;
  bottom: calc(100% + .55rem);
  min-width: 176px;
  padding: .5rem;
  border-radius: 16px;
  border: 1px solid rgba(197,201,197,.42);
  background: linear-gradient(180deg, rgba(17,19,17,.96), rgba(12,15,13,.98));
  box-shadow: 0 18px 48px rgba(0,0,0,.3);
  display: grid;
  gap: .3rem;
  z-index: 30;
}

.coach-directory-menu-item{
  width: 100%;
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  align-items: center;
  column-gap: .6rem;
  justify-content: flex-start;
  min-height: 2.9rem;
  padding: .62rem .78rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #eaedea;
  font-weight: 600;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color .16s ease, transform .16s ease;
}

.coach-directory-menu-item:hover{
  background: transparent;
  transform: translateY(-1px);
}

.coach-directory-menu-item:focus,
.coach-directory-menu-item:focus-visible{
  outline: none;
  box-shadow: none;
  background: transparent;
  transform: translateY(-1px);
}

.coach-directory-menu-item:active,
.coach-directory-menu-item.is-pressed{
  transform: translateY(1px) scale(.98);
}

.coach-directory-menu-item .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.coach-directory-menu-item span:last-child{
  display: block;
  line-height: 1.15;
}

.coach-directory-menu-item.is-danger{
  color: #fca5a5;
}

.coach-directory-pagination{
  margin-top: .25rem;
}

.coach-directory-empty{
  display: grid;
  gap: .35rem;
  padding: 1rem 1.1rem;
}

html:not([data-theme="dark"]) .coach-directory-add{
  color: #1c1f1d;
}

html:not([data-theme="dark"]) .coach-payments-metric-card,
html:not([data-theme="dark"]) .coach-payments-table-card,
html:not([data-theme="dark"]) .coach-payments-mobile-card,
html:not([data-theme="dark"]) .settings-mobile-shortcut-link{
  border-color: rgba(86,127,0,.12);
  background: var(--card);
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html:not([data-theme="dark"]) .coach-dashboard-panel{
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-color: rgba(159,163,160,.18);
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html:not([data-theme="dark"]) .coach-dashboard-grid .coach-dashboard-card{
  background: var(--card);
  border-color: rgba(159,163,160,.18);
  box-shadow: 0 8px 20px rgba(22,25,22,.05);
}

html:not([data-theme="dark"]) .coach-dashboard-grid .coach-dashboard-card::before{
  display: none;
}

html:not([data-theme="dark"]) .coach-dashboard-week-chip{
  background: rgba(255,255,255,.88);
  border-color: rgba(159,163,160,.34);
}

html:not([data-theme="dark"]) .coach-dashboard-icon-shell{
  color: #567f00;
  border-color: rgba(86,127,0,.14);
  background: rgba(86,127,0,.08);
}

html[data-theme="dark"] .coach-dashboard-panel{
  border-color: rgba(111,155,41,0.14);
}

html[data-theme="dark"] .coach-dashboard-grid .coach-dashboard-card{
  border-color: rgba(111,155,41,0.14);
  background: rgba(15,18,15,.92);
}

html[data-theme="dark"] .coach-dashboard-week-chip{
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.02);
}

html[data-theme="dark"] .coach-dashboard-period-menu{
  border-color: var(--border);
  background: var(--card);
  box-shadow: 0 16px 30px rgba(0,0,0,.45);
}

html[data-theme="dark"] .coach-dashboard-period.is-open .coach-dashboard-week-chip{
  border-color: color-mix(in srgb, #8dc337 38%, var(--border));
  box-shadow: 0 0 0 3px rgba(141,195,55,.18);
}

html[data-theme="dark"] .coach-dashboard-period-item:hover,
html[data-theme="dark"] .coach-dashboard-period-item:focus-visible{
  background: color-mix(in srgb, var(--soft) 70%, transparent);
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-week-chip{
  box-shadow: 0 1px 0 rgba(255,255,255,.02) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-dashboard-period .coach-dashboard-period-menu{
  box-shadow: 0 14px 30px rgba(6,8,6,.52) !important;
}

html[data-theme="dark"] .coach-dashboard-icon-shell{
  color: #a0dd3e;
  border-color: rgba(141,195,55,.25);
  background: rgba(42,45,43,.44);
}

html[data-theme="dark"] .coach-dashboard-progress{
  background:
    radial-gradient(circle at center, var(--card) 66%, transparent 67%),
    conic-gradient(#8dc337 var(--coach-progress), rgba(62,65,62,.9) 0);
}

html:not([data-theme="dark"]) .coach-payments-metric-label,
html:not([data-theme="dark"]) .coach-payments-table th{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-payments-table-head{
  border-bottom-color: rgba(159,163,160,.16);
}

html:not([data-theme="dark"]) .coach-payments-table th,
html:not([data-theme="dark"]) .coach-payments-table td{
  border-bottom-color: rgba(159,163,160,.14);
}

html:not([data-theme="dark"]) .coach-payments-icon-btn{
  background: transparent;
  color: #3e413e;
}

html:not([data-theme="dark"]) .coach-payments-icon-btn.is-warning{
  color: #fbbf24;
}

html:not([data-theme="dark"]) .settings-mobile-shortcut-icon{
  color: #689224;
  background: rgba(131,182,50,.12);
}

html:not([data-theme="dark"]) .coach-directory-invite-panel{
  border-color: rgba(159,163,160,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  box-shadow: 0 18px 42px rgba(22,25,22,.14);
}

html:not([data-theme="dark"]) .coach-directory-invite-code{
  border-color: rgba(159,163,160,.2);
  background: rgba(248,250,252,.9);
}

html:not([data-theme="dark"]) .coach-directory-stat,
html:not([data-theme="dark"]) .coach-directory-search,
html:not([data-theme="dark"]) .coach-directory-card,
html:not([data-theme="dark"]) .coach-directory-empty{
  border-color: rgba(86,127,0,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html:not([data-theme="dark"]) .coach-directory-stat span,
html:not([data-theme="dark"]) .coach-directory-plan,
html:not([data-theme="dark"]) .coach-directory-meta-item,
html:not([data-theme="dark"]) .coach-directory-search .muted,
html:not([data-theme="dark"]) .coach-directory-shell .muted{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-directory-search-input{
  border-color: rgba(159,163,160,.2);
  background: rgba(248,250,252,.9);
}

html:not([data-theme="dark"]) .coach-directory-search-input .nav-icon-lucide,
html:not([data-theme="dark"]) .coach-directory-meta-item .nav-icon-lucide,
html:not([data-theme="dark"]) .coach-directory-caret{
  color: #707471;
}

html:not([data-theme="dark"]) .coach-directory-avatar{
  background: linear-gradient(135deg, rgba(131,182,50,.14), rgba(86,127,0,.18));
  color: #385402;
}

html:not([data-theme="dark"]) .coach-directory-status.is-paid{
  color: #166534;
}

html:not([data-theme="dark"]) .coach-directory-more > summary{
  border-color: rgba(159,163,160,.18);
  background: rgba(248,250,252,.92);
  color: #161916;
}

html:not([data-theme="dark"]) .coach-directory-more-menu{
  border-color: rgba(159,163,160,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  box-shadow: 0 18px 42px rgba(22,25,22,.14);
}

html:not([data-theme="dark"]) .coach-directory-menu-item{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-directory-menu-item:hover{
  background: transparent;
}

html:not([data-theme="dark"]) .coach-directory-menu-item.is-danger{
  color: #dc2626;
}

@media (max-width: 960px){
  .coach-payments-metrics{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-directory-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-directory-meta-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .coach-automations-head,
  .coach-automation-card-top,
  .coach-automation-switch-card{
    flex-direction: column;
    align-items: stretch;
  }

  .coach-automations-new-btn{
    width: 100%;
    justify-content: center;
  }

  .coach-automation-actions{
    justify-content: flex-start;
  }

  .coach-automation-card{
    padding: 1.1rem;
  }

  .coach-automation-grid2{
    grid-template-columns: 1fr;
  }

  .coach-automation-tabs{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    gap: .18rem;
    padding: .18rem;
    border-radius: 12px;
    position: sticky;
    top: 0;
    z-index: 3;
    margin-top: 0;
    margin-bottom: .9rem;
    align-self: start;
  }

  .coach-automation-tabs .coach-automation-tab{
    min-height: 2rem;
    padding: .38rem .52rem;
    white-space: nowrap;
    font-size: .88rem;
  }

  .coach-automation-content-body-block{
    gap: .75rem;
    padding: .85rem;
  }

  .coach-automation-content-body-block .coach-automation-toolbar-row{
    gap: .42rem;
  }

  .coach-automation-variable-buttons{
    gap: .5rem;
  }

  .coach-automation-recurring-grid{
    grid-template-columns: 1fr;
  }

  .coach-automation-modal-actions{
    flex-direction: column-reverse;
  }

  .coach-automation-modal-actions > *{
    width: 100%;
  }

  .coach-automation-modal-card,
  .coach-automation-preview-card{
    width: min(100vw - 1rem, 840px);
    max-height: calc(100dvh - 1rem);
  }

  .coach-automation-modal{
    padding: .5rem;
    align-items: flex-end;
  }

  .coach-automation-modal-card,
  .coach-automation-preview-card{
    width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 22px 22px 18px 18px;
    overflow: hidden;
  }

  .coach-automation-modal-card,
  .coach-automation-preview-card{
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .coach-automation-preview-card{
    display: flex;
    flex-direction: column;
    height: min(92dvh, calc(100dvh - 1rem));
  }

  .coach-automation-editor-header,
  .coach-automation-modal-body,
  .coach-automation-preview-body,
  .coach-automation-modal-actions{
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .coach-automation-editor-header{
    padding-top: 1rem;
    padding-bottom: .8rem;
  }

  .coach-automation-editor-header strong{
    font-size: 1.08rem;
    line-height: 1.25;
    max-width: calc(100% - 3rem);
  }

  .coach-automation-modal-actions{
    padding-top: .85rem;
    padding-bottom: 1rem;
    flex-shrink: 0;
  }

  .coach-automation-preview-body{
    flex: 1 1 auto;
    gap: 1rem;
    padding-top: .9rem;
    padding-bottom: 1.25rem;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .coach-automation-modal-body{
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-top: .75rem;
    padding-bottom: 1rem;
  }

  .coach-automation-badge-row{
    gap: .45rem;
    flex-wrap: wrap;
  }

  .coach-automation-pill{
    font-size: .84rem;
    padding: .42rem .78rem;
  }

  .coach-automation-preview-note{
    margin-top: 0;
    font-size: .92rem;
    line-height: 1.45;
  }

  .coach-automation-preview-subject{
    gap: .28rem;
  }

  .coach-automation-preview-subject strong{
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .coach-automation-message-card{
    border-radius: 16px;
    margin-bottom: .25rem;
    display: flex;
    flex-direction: column;
    max-height: min(38dvh, 19rem);
  }

  .coach-automation-message-head{
    align-items: flex-start;
    gap: .7rem;
    padding: .95rem .9rem .85rem;
  }

  .coach-automation-message-head > div{
    min-width: 0;
  }

  .coach-automation-message-head strong{
    display: block;
    font-size: .98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .coach-automation-message-copy{
    padding: 0 .9rem .95rem;
    font-size: .95rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .coach-automation-trigger-card{
    gap: .8rem;
    padding: .9rem;
    border-radius: 16px;
  }

  .coach-automation-trigger-card-head{
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .coach-automation-trigger-card-head strong{
    font-size: .98rem;
    line-height: 1.3;
  }

  .coach-automation-field{
    gap: .32rem;
  }

  .coach-automation-field-label{
    font-size: .9rem;
    line-height: 1.25;
  }

  .coach-automation-field-help{
    line-height: 1.4;
  }

  .coach-automation-form input,
  .coach-automation-form select,
  .coach-automation-form textarea{
    min-width: 0;
  }

  .coach-automation-emoji-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(188px, calc(100vw - 4rem));
    padding: .6rem;
  }

  .coach-dashboard-panel{
    padding: 1rem;
  }

  .coach-dashboard-panel-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .coach-dashboard-period-menu{
    left: 0;
    right: auto;
  }

  .coach-dashboard-grid{
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .coach-dashboard-card-head{
    gap: .72rem;
  }

  .coach-dashboard-progress{
    width: 5.15rem;
    height: 5.15rem;
  }

  .coach-dashboard-progress span{
    font-size: 1.2rem;
  }

  .coach-dashboard-action{
    width: 100%;
    justify-content: center;
  }

  .coach-payments-metrics{
    grid-template-columns: 1fr;
  }

  .coach-payments-table-wrap{
    display: none;
  }

  .coach-payments-mobile-list{
    display: grid;
  }

  .coach-payments-actions-row{
    justify-content: flex-start;
  }

  .coach-directory-head{
    flex-direction: column;
    align-items: stretch;
  }

  .coach-directory-invite{
    width: 100%;
  }

  .coach-directory-add{
    justify-content: center;
    width: 100%;
  }

  .coach-directory-invite-panel{
    left: 0;
    right: auto;
    width: 100%;
  }

  .coach-directory-invite-actions{
    grid-template-columns: 1fr;
  }

  .coach-directory-invite-actions form{
    grid-column: auto;
  }

  .coach-directory-card-summary,
  .coach-directory-card-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .coach-directory-card-right{
    justify-content: flex-end;
    align-self: flex-end;
    width: auto;
    gap: .55rem;
  }

  .coach-directory-primary-actions{
    display: grid;
    grid-template-columns: 1fr;
  }

  .coach-directory-primary-actions > *{
    width: 100%;
  }

  .coach-directory-more{
    align-self: flex-end;
  }
}

@media (min-width: 901px){
  .coach-automation-modal{
    padding: 1.25rem;
    align-items: center;
  }

  .coach-automation-modal-card{
    width: min(940px, calc(100vw - 3rem));
    max-height: calc(100dvh - 2.5rem);
    border-radius: 24px;
  }

  .coach-automation-preview-card{
    width: min(800px, calc(100vw - 3rem));
    max-height: calc(100dvh - 2.5rem);
    border-radius: 24px;
  }

  .coach-automation-grid2{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-automation-tabs{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .coach-automation-tabs .coach-automation-tab{
    min-height: 2.55rem;
    font-size: .98rem;
  }

  .coach-automation-modal-actions{
    flex-direction: row;
    align-items: center;
  }

  .coach-automation-modal-actions > *{
    width: auto;
  }
}

@media (min-width: 641px) and (max-width: 900px){
  .coach-automation-modal{
    padding: .9rem;
    align-items: center;
  }

  .coach-automation-modal-card{
    width: min(760px, calc(100vw - 1.8rem));
    max-height: calc(100dvh - 1.8rem);
    border-radius: 22px;
  }

  .coach-automation-preview-card{
    width: min(700px, calc(100vw - 1.8rem));
    max-height: calc(100dvh - 1.8rem);
    border-radius: 22px;
  }

  .coach-automation-grid2{
    grid-template-columns: 1fr 1fr;
  }

  .coach-automation-modal-actions{
    flex-direction: row;
  }

  .coach-automation-modal-actions > *{
    width: auto;
  }
}

@media (min-width: 901px){
  .coach-automation-modal .coach-automation-modal-card{
    width: min(980px, calc(100vw - 3rem)) !important;
    max-width: min(980px, calc(100vw - 3rem)) !important;
    max-height: calc(100dvh - 2.5rem) !important;
  }

  .coach-automation-modal .coach-automation-preview-card{
    width: min(820px, calc(100vw - 3rem)) !important;
    max-width: min(820px, calc(100vw - 3rem)) !important;
    max-height: calc(100dvh - 2.5rem) !important;
  }

  .coach-automation-modal .coach-automation-modal-body,
  .coach-automation-modal .coach-automation-preview-body{
    overflow-y: auto;
    overflow-x: hidden;
  }

  .coach-automation-modal .coach-automation-tabs{
    min-height: 3.25rem;
  }
}

@media (min-width: 1024px){
  body.app[data-desktop-sidebar="1"] .coach-automation-modal{
    left: 220px;
    right: 0;
    width: auto;
    padding: clamp(1.5rem, 2vw, 2rem);
  }

  html.desktop-sidebar-collapsed-preload body.app[data-desktop-sidebar="1"] .coach-automation-modal,
  body.app[data-desktop-sidebar="1"].sidebar-collapsed .coach-automation-modal{
    left: 72px;
  }

  body.app[data-desktop-sidebar="1"] .coach-automation-modal .coach-automation-modal-card{
    width: min(980px, 100%) !important;
    max-width: min(980px, 100%) !important;
    max-height: calc(100dvh - 4rem) !important;
  }

  body.app[data-desktop-sidebar="1"] .coach-automation-modal .coach-automation-preview-card{
    width: min(820px, 100%) !important;
    max-width: min(820px, 100%) !important;
    max-height: calc(100dvh - 4rem) !important;
  }
}

@media (max-width: 900px){
  .coach-context{
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .context-actions{
    justify-content: flex-start;
  }
}

@media (max-width: 640px){
  .page-head{
    margin-bottom: .85rem;
  }
  .page-actions.nutrition-actions{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    width: 100%;
  }

  .page-actions.nutrition-actions > *{
    width: 100%;
  }

  .page-actions.nutrition-actions input[type="date"]{
    grid-column: 1 / -1;
  }

  /* Keep all nutrition action buttons the same size on mobile, including multi-line labels. */
  .page-actions.nutrition-actions > a.small.secondary:not(.back-link),
  .page-actions.nutrition-actions > button.small.secondary{
    height: 5rem;
    min-height: 5rem;
    max-height: 5rem;
    padding: .7rem .85rem !important;
    align-items: center !important;
    justify-content: center;
    gap: .45rem !important;
    font-size: clamp(.95rem, 3.35vw, 1.02rem);
    line-height: 1.15;
    text-align: left;
    white-space: normal !important;
  }

  .page-actions.nutrition-actions > a.small.secondary:not(.back-link) > span,
  .page-actions.nutrition-actions > button.small.secondary > span{
    display: block;
    overflow-wrap: anywhere;
  }
}

.dashboard-quick{
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.dashboard-quick .pill-link.primary{
  background: linear-gradient(135deg, var(--violet), var(--brand-2));
  color: #fff;
  border-color: transparent;
}
.admin-shell{
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.admin-shell::before{
  content: none;
}

.admin-shell::after{
  content: none;
}

.admin-shell > *{
  position: relative;
  z-index: 1;
}

.admin-shell .page-head{
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.admin-shell .page-head h2{
  font-size: 1.9rem;
}

.admin-shell .page-actions .pill-link{
  background: transparent;
  color: inherit;
  border-color: var(--border);
}

.admin-shell .page-actions .pill-link.admin-back{
  border-color: var(--border);
}

.admin-shell .grid2{
  gap: 1.5rem;
}

.admin-shell .admin-grid{
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.admin-shell .admin-ops-grid{
  display:grid;
  grid-template-columns:minmax(0, 760px);
  gap:1.5rem;
  max-width:760px;
}

.admin-shell .admin-ops-grid > .card{
  display:block;
  width:100%;
  height: auto;
  align-self: start;
  margin:0;
}

.admin-shell .card{
  min-width: 0;
}

/* ── Admin home landing polish ─────────────────────────────────── */
.admin-home-section-label{
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.75rem 0 .75rem;
}
.admin-home-stats{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .85rem;
  margin: .25rem 0 0;
}
.admin-home-stat{
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  background: var(--card);
  padding: .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  box-shadow: var(--shadow-soft);
}
.admin-home-stat .stat-value{
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.1;
}
.admin-home-stat .stat-label{
  font-size: .76rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-home-stat.is-accent .stat-value{ color: var(--brand-2); }
.admin-home-stat.is-warn .stat-value{ color: #b45309; }
.admin-home-breakdown{ margin-top: 1.25rem; }
.admin-home-table-wrap{ overflow-x: auto; }
.admin-home-table-wrap table{ width: 100%; }
.admin-home-table-wrap :is(th, td){ white-space:nowrap; }
.admin-auth-events-card .admin-home-table-wrap td:nth-child(2),
.admin-deleted-accounts-table td:nth-child(2){
  white-space:normal;
  min-width:12rem;
}
.admin-nav-card{
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.admin-nav-card .admin-nav-icon{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--brand-2) 12%, transparent);
  color: var(--brand-2);
  flex: 0 0 auto;
}
.admin-nav-card .admin-nav-title{
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.admin-nav-card .admin-nav-desc{
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}
.admin-nav-card .admin-nav-link{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  align-self: flex-start;
}
.admin-nav-card--health{
  grid-column: span 2;
}
.admin-health-summary{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin:.15rem 0 .25rem;
}
.admin-health-status{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  width:fit-content;
  padding:.28rem .58rem;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:.75rem;
  font-weight:700;
}
.admin-health-status::before{
  content:"";
  width:.48rem;
  height:.48rem;
  border-radius:50%;
  background:var(--muted);
}
.admin-health-status.is-healthy::before{ background:#16a34a; }
.admin-health-status.is-warning::before{ background:#d97706; }
.admin-health-status.is-error::before{ background:#dc2626; }
.admin-auth-events-card > header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.admin-auth-events-card > header > *{
  min-width:0;
}
.admin-auth-event{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:.24rem .5rem;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:.72rem;
  font-weight:700;
}
.admin-auth-event.is-login-success{
  color:#15803d;
}
.admin-auth-event.is-login-failed,
.admin-auth-event.is-login-blocked{
  color:#b91c1c;
}
html[data-theme="dark"] .admin-auth-event.is-login-success{
  color:#86efac;
}
html[data-theme="dark"] :is(.admin-auth-event.is-login-failed, .admin-auth-event.is-login-blocked){
  color:#fca5a5;
}
.admin-retention-banner{
  margin-bottom:1rem;
}
.admin-deleted-accounts-card > header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.admin-deleted-accounts-table td{
  vertical-align:top;
}
.admin-deleted-account-email{
  display:block;
  margin-top:.18rem;
  color:var(--muted);
  font-size:.82rem;
  overflow-wrap:anywhere;
}
.admin-retention-status{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:.28rem .58rem;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:.75rem;
  font-weight:700;
}
.admin-retention-status.is-ready{
  color:#15803d;
  border-color:color-mix(in srgb, #16a34a 35%, var(--border));
  background:color-mix(in srgb, #16a34a 8%, transparent);
}
.admin-retention-status.is-cooling{
  color:#b45309;
  border-color:color-mix(in srgb, #d97706 35%, var(--border));
  background:color-mix(in srgb, #d97706 8%, transparent);
}
.admin-retention-status.is-protected{
  color:var(--muted);
}
html[data-theme="dark"] .admin-retention-status.is-ready{
  color:#86efac;
}
html[data-theme="dark"] .admin-retention-status.is-cooling{
  color:#fcd34d;
}
.admin-delete-confirm{
  min-width:12rem;
}
.admin-delete-confirm > summary{
  cursor:pointer;
  color:#dc2626;
  font-weight:700;
}
.admin-delete-confirm form{
  margin-top:.65rem;
  min-width:12rem;
}
.admin-deleted-empty{
  display:grid;
  justify-items:center;
  gap:.45rem;
  padding:2rem 1rem;
  text-align:center;
}
.admin-deleted-empty .nav-icon-lucide{
  width:1.5rem;
  height:1.5rem;
  color:var(--brand-2);
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell input[type="file"]{
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px){
  .admin-shell .grid2{
    grid-template-columns: 1fr;
  }
  .admin-shell .admin-ops-grid{
    grid-template-columns:1fr;
    max-width:none;
  }
  .admin-ops-tabs{
    gap:.6rem;
  }
  .admin-ops-tab{
    flex:1 1 180px;
    justify-content:center;
  }
  .admin-nav-card--health{
    grid-column:auto;
  }
}

@media (max-width: 700px){
  .admin-shell{
    padding: 0;
  }
  .admin-ops-card{
    padding:.9rem;
    border-radius:18px;
  }
  .admin-card-toggle-copy{
    gap:.75rem;
  }
  .admin-card-toggle-badge{
    width:2.3rem;
    height:2.3rem;
    border-radius:14px;
  }
  .admin-card-toggle-copy strong{
    font-size:.98rem;
  }
  .admin-card-toggle-copy small{
    font-size:.82rem;
  }
  .admin-card-toggle-icon{
    width:2.1rem;
    height:2.1rem;
    border-radius:12px;
  }
  .admin-ops-card table{
    min-width:460px;
  }
  .admin-auth-events-card > header,
  .admin-deleted-accounts-card > header{
    align-items:flex-start;
    flex-direction:column;
    gap:.35rem;
  }
}

.admin-activity-events [data-activity-extra][hidden]{
  display: none !important;
}

.admin-activity-events [data-activity-extra]{
  scroll-margin-top: calc(var(--appbar-height, 4.5rem) + .75rem);
}

.admin-activity-events.is-expanded{
  max-height: min(36rem, 68dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-activity-footer{
  display: flex;
  justify-content: flex-start;
  margin-top: .85rem;
}

body.app[data-authenticated="1"] .admin-activity-toggle{
  width: auto !important;
  min-width: 0 !important;
}

@media (max-width: 700px){
  .admin-activity-events.is-expanded{
    max-height: min(34rem, 64dvh);
    padding-right: .25rem;
    overflow-y: auto !important;
  }

  body.app[data-authenticated="1"] .admin-activity-toggle{
    width: 100% !important;
  }
}

/* Admin home: restrained operational hierarchy in place of a card-heavy grid. */
.admin-home-shell .admin-home-head{
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-home-kicker{
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-home-role{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.admin-home-role .nav-icon-lucide{
  width: 15px;
  height: 15px;
}

.admin-home-shell .admin-home-stats{
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: none;
}

.admin-home-shell .admin-home-stat{
  min-height: 6.5rem;
  justify-content: center;
  padding: 1rem 1.15rem;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-home-shell .admin-home-stat:last-child{
  border-right: 0;
}

.admin-home-shell .admin-home-stat .stat-value{
  font-size: 1.8rem;
  font-weight: 700;
}

.admin-home-shell .admin-home-stat .stat-label{
  order: 2;
  margin-top: .3rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .035em;
}

.admin-home-shell .admin-home-section-label{
  margin: 2rem 0 .7rem;
  font-size: .72rem;
  letter-spacing: .1em;
}

.admin-home-shell .admin-auth-events-card,
.admin-home-shell .admin-home-breakdown{
  border-radius: 14px;
  box-shadow: none;
}

.admin-home-shell .admin-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.admin-home-shell .admin-nav-card,
.admin-home-shell .admin-nav-card:hover{
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: .8rem;
  row-gap: .3rem;
  min-height: 10.5rem;
  padding: 1.15rem;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-home-shell .admin-nav-card--health,
.admin-home-shell .admin-nav-card:nth-child(2n + 1){
  border-right: 0;
}

.admin-home-shell .admin-nav-card--health{
  grid-column: 1 / -1;
}

.admin-home-shell .admin-nav-icon{
  grid-column: 1;
  grid-row: 1;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-home-shell .admin-nav-icon .nav-icon-lucide{
  width: 19px;
  height: 19px;
}

.admin-home-shell .admin-nav-title{
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: 1rem;
}

.admin-home-shell .admin-nav-desc{
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  max-width: 46ch;
  font-size: .86rem;
}

.admin-home-shell .admin-health-summary,
.admin-home-shell .admin-nav-card > form{
  grid-column: 2;
}

body.app[data-authenticated="1"] .admin-home-shell .admin-nav-link{
  grid-column: 2;
  align-self: end;
  width: fit-content !important;
  margin-top: .8rem !important;
  --ui-btn-radius: 11px;
  --ui-btn-padding-y: 10px;
  --ui-btn-padding-x: 14px;
}

.admin-home-shell .admin-nav-link .nav-icon-lucide{
  width: 15px;
  height: 15px;
}

@media (max-width: 700px){
  .admin-home-shell .admin-home-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-home-shell .admin-home-stat{
    min-height: 5.75rem;
    border-bottom: 1px solid var(--border);
  }

  .admin-home-shell .admin-home-stat:nth-child(2n){
    border-right: 0;
  }

  .admin-home-shell .admin-home-stat:nth-last-child(-n + 2){
    border-bottom: 0;
  }

  .admin-home-shell .admin-grid{
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-home-shell .admin-nav-card,
  .admin-home-shell .admin-nav-card:hover{
    min-height: 0;
    border-right: 0;
  }

  .admin-home-shell .admin-nav-card--health{
    grid-column: auto;
  }

  .admin-home-shell .admin-nav-card:last-child{
    border-bottom: 0;
  }
}

.admin-shell .card{
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: none;
  animation: none;
}

.admin-shell .card:hover{
  transform: none;
  box-shadow: var(--shadow-soft);
  border-color: var(--border);
}

.admin-shell .card header{
  letter-spacing: normal;
  text-transform: none;
  font-size: inherit;
  color: inherit;
}

.admin-shell table{
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.admin-shell th{
  text-align: left;
  padding: .5rem 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .7rem;
  color: var(--muted);
}

.admin-shell td{
  padding: .5rem 0;
  border-bottom: 1px solid rgba(22,25,22,.06);
}

.admin-shell tbody tr:last-child td{
  border-bottom: none;
}

.admin-shell .admin-form-result{
  margin-top: .75rem;
}

.admin-shell .admin-section-gap{
  margin-top: 1.25rem;
}

.admin-shell .banner{
  background: rgba(22,25,22,.03);
  border: 1px dashed rgba(22,25,22,.2);
  box-shadow: none;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea{
  background: #fff;
  border: 1px solid rgba(22,25,22,.12);
  box-shadow: inset 0 1px 2px rgba(22,25,22,.04);
}

.admin-ops-shell .page-head{
  align-items:flex-end;
}

.admin-ops-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  margin:.35rem 0 1.35rem;
}

.admin-ops-tab{
  display:inline-flex;
  align-items:center;
  gap:.58rem;
  border:1px solid rgba(111,155,41,.22);
  background:rgba(31,34,32,.78);
  color:#e4e8e4;
  border-radius:14px;
  padding:.72rem 1rem;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.admin-ops-tab .nav-icon-lucide{
  width:1rem;
  height:1rem;
}

.admin-ops-tab:hover,
.admin-ops-tab:focus-visible{
  border-color:rgba(151,211,55,.4);
  background:rgba(86,127,0,.16);
  color:#ffffff;
  transform:translateY(-1px);
}

.admin-ops-tab.is-active{
  background:linear-gradient(135deg, #92ca39 0%, #86ba32 100%);
  border-color:rgba(151,211,55,.55);
  color:#101210;
}

.admin-ops-panel{
  display:none;
}

.admin-ops-panel.is-active{
  display:block;
  animation:adminFade .2s ease;
}

.admin-ops-card{
  overflow:hidden;
  padding:1.05rem;
  border-radius:18px;
}

.admin-ops-card-static .admin-card-body{
  display:block;
}

.admin-card-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0;
  margin:0;
  text-align:left;
}

.admin-card-toggle-copy{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:.9rem;
}

.admin-card-toggle-copy > span:last-child{
  display:flex;
  flex-direction:column;
  gap:.2rem;
  min-width:0;
}

.admin-card-toggle-copy strong{
  display:block;
  font-size:1.04rem;
  line-height:1.25;
  color:#f8fbff;
}

.admin-card-toggle-copy small{
  display:block;
  color:#bbbfbb;
  font-size:.88rem;
  line-height:1.4;
}

.admin-card-toggle-badge{
  flex:0 0 auto;
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: transparent;
  border: 0;
  color: var(--brand-2);
}

.admin-card-toggle-badge .nav-icon-lucide{
  width:20px;
  height:20px;
}

.admin-card-toggle-action{
  flex:0 0 auto;
  width:38px;
  height:38px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(159,163,160,.25);
  background:transparent;
  color:inherit;
  cursor:pointer;
  padding:0;
  margin:0;
}

.admin-card-toggle-icon{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
}

.admin-card-toggle-action:hover,
.admin-card-toggle-action:focus-visible,
.admin-ops-card.is-open .admin-card-toggle-action{
  border-color: rgba(123,172,44,.35);
  color: #aaeb42;
}

.admin-card-body{
  display:none;
  margin-top:1rem;
  padding-top:.85rem;
  border-top:1px solid rgba(111,155,41,.16);
}

.admin-ops-card.is-open .admin-card-body{
  display:block;
}

.admin-ops-card form{
  display:grid;
  gap:.88rem;
}

.admin-ops-card .table-wrap{
  margin-top:.35rem;
  border-radius:16px;
  overflow:auto;
  border:1px solid rgba(111,155,41,.14);
  background:rgba(22,25,22,.16);
}

.admin-ops-card table{
  min-width:560px;
}

.admin-ops-result-banner{
  border-radius:16px;
  padding:.95rem 1rem;
}

.admin-dashboard-card{
  border-radius:18px;
}

.admin-dashboard-card header{
  display:flex;
  align-items:center;
  gap:.55rem;
  margin-bottom:.8rem;
}

.admin-dashboard-detail{
  border-top:1px solid rgba(159,163,160,.18);
  padding-top:.85rem;
}

.admin-dashboard-detail > summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.6rem;
  cursor:pointer;
  font-weight:700;
}

.admin-dashboard-detail > summary strong{
  flex:1 1 auto;
}

.admin-dashboard-detail > summary::-webkit-details-marker{
  display:none;
}

.admin-dashboard-detail > summary::after{
  content:"";
  width:38px;
  height:38px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(159,163,160,.25);
  background:transparent;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e6edf7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:center;
  flex:0 0 auto;
}

.admin-dashboard-detail[open] > summary::after{
  transform:rotate(180deg);
}

@keyframes adminFade{
  from{
    opacity: 0;
    transform: translateY(6px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.table-wrap{
  overflow-x: auto;
}

.coach-compact{
  padding-bottom: 1rem;
}

.coach-actions{
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.coach-import{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.message-card{
  padding: .85rem 1rem;
}

.admin-announcement-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-announcement-date{
  font-size: .9rem;
}

.admin-announcement-body{
  margin-top: .4rem;
  white-space: pre-wrap;
}

.admin-announcement-audience{
  margin-top: .4rem;
  font-size: .9rem;
}

.messages-layout{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
}

.messages-sidebar{
  position: sticky;
  top: 84px;
  align-self: start;
}

.messages-list{
  display: grid;
  gap: .6rem;
  background: rgba(255,255,255,.6);
  border-radius: 18px;
  padding: .6rem;
  border: 1px solid rgba(159,163,160,.2);
}

.message-list-item{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(159,163,160,.2);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(22,25,22,.06);
  overflow: visible;
}

.message-list-item:hover{
  background: rgba(159,163,160,.15);
}

.message-list-link{
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.messages-list .avatar{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(95,140,1,.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #426301;
}

.message-list-meta{
  flex: 1;
  display: grid;
  gap: .2rem;
}

.message-list-title{
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
}

.message-list-snippet{
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-list-actions{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.message-list-actions button{
  white-space: nowrap;
}

.message-list-actions .nav-badge{
  background: var(--color-brand);
  color: var(--color-on-brand);
  padding: .15rem .45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .75rem;
}

.messages-panel .card{
  box-shadow: 0 12px 28px rgba(22,25,22,.08);
}

.message-thread{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(159,163,160,.2);
  box-shadow: 0 12px 28px rgba(22,25,22,.08);
}

.message-bubble{
  box-shadow: 0 10px 24px rgba(22,25,22,.08);
}

.pill-badge{
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  border: 1px solid rgba(159,163,160,.3);
  background: rgba(159,163,160,.12);
  color: #161916;
}

.blocked-badge{
  border-color: rgba(220,38,38,.5);
  background: rgba(220,38,38,.15);
  color: #dc2626;
}

.danger-btn{
  border-color: rgba(220,38,38,.6) !important;
  color: #dc2626 !important;
}

.subtle-danger-btn{
  border-color: rgba(248,113,113,.28) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.subtle-danger-btn:hover,
.subtle-danger-btn:focus-visible{
  border-color: rgba(248,113,113,.42) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1)) !important;
}

.subtle-danger-icon-btn{
  border-color: rgba(248,113,113,.28) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 20px rgba(127,29,29,.12) !important;
}

.subtle-danger-icon-btn:hover,
.subtle-danger-icon-btn:focus-visible{
  border-color: rgba(248,113,113,.42) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1)) !important;
}

button.subtle-danger-icon-btn:has([data-lucide="trash-2"]),
a.subtle-danger-icon-btn:has([data-lucide="trash-2"]),
.subtle-danger-icon-btn:has([data-lucide="trash-2"]){
  width:auto !important;
  min-width:2.5rem !important;
  height:2.25rem !important;
  min-height:2.25rem !important;
  padding:0 .72rem !important;
  border-radius:12px !important;
}

.subtle-save-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.9rem;
  padding: .72rem 1.05rem;
  border-radius: 14px !important;
  border: 1px solid rgba(20,83,45,.62) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.22), rgba(21,128,61,.14)) !important;
  box-shadow: none !important;
}

.subtle-save-btn:hover,
.subtle-save-btn:focus-visible{
  border-color: rgba(22,163,74,.72) !important;
  color: #f0fdf4 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.3), rgba(21,128,61,.18)) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] button,
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] .button,
html[data-theme="dark"] a.button,
html[data-theme="dark"] a[role="button"],
html[data-theme="dark"] .pill-link,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .subtle-edit-btn,
html[data-theme="dark"] .subtle-danger-btn,
html[data-theme="dark"] .subtle-danger-icon-btn,
html[data-theme="dark"] .subtle-save-btn{
  box-shadow:none !important;
  filter:none !important;
}

html[data-theme="dark"] button:hover,
html[data-theme="dark"] button:focus,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] button:active,
html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] input[type="submit"]:focus,
html[data-theme="dark"] input[type="submit"]:focus-visible,
html[data-theme="dark"] input[type="submit"]:active,
html[data-theme="dark"] input[type="button"]:hover,
html[data-theme="dark"] input[type="button"]:focus,
html[data-theme="dark"] input[type="button"]:focus-visible,
html[data-theme="dark"] input[type="button"]:active,
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .button:focus,
html[data-theme="dark"] .button:focus-visible,
html[data-theme="dark"] .button:active,
html[data-theme="dark"] a.button:hover,
html[data-theme="dark"] a.button:focus,
html[data-theme="dark"] a.button:focus-visible,
html[data-theme="dark"] a.button:active,
html[data-theme="dark"] a[role="button"]:hover,
html[data-theme="dark"] a[role="button"]:focus,
html[data-theme="dark"] a[role="button"]:focus-visible,
html[data-theme="dark"] a[role="button"]:active,
html[data-theme="dark"] .pill-link:hover,
html[data-theme="dark"] .pill-link:focus,
html[data-theme="dark"] .pill-link:focus-visible,
html[data-theme="dark"] .pill-link:active,
html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .secondary:focus,
html[data-theme="dark"] .secondary:focus-visible,
html[data-theme="dark"] .secondary:active,
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .secondary-button:focus,
html[data-theme="dark"] .secondary-button:focus-visible,
html[data-theme="dark"] .secondary-button:active,
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus,
html[data-theme="dark"] .btn-primary:focus-visible,
html[data-theme="dark"] .btn-primary:active,
html[data-theme="dark"] .subtle-edit-btn:hover,
html[data-theme="dark"] .subtle-edit-btn:focus,
html[data-theme="dark"] .subtle-edit-btn:focus-visible,
html[data-theme="dark"] .subtle-edit-btn:active,
html[data-theme="dark"] .subtle-danger-btn:hover,
html[data-theme="dark"] .subtle-danger-btn:focus,
html[data-theme="dark"] .subtle-danger-btn:focus-visible,
html[data-theme="dark"] .subtle-danger-btn:active,
html[data-theme="dark"] .subtle-danger-icon-btn:hover,
html[data-theme="dark"] .subtle-danger-icon-btn:focus,
html[data-theme="dark"] .subtle-danger-icon-btn:focus-visible,
html[data-theme="dark"] .subtle-danger-icon-btn:active,
html[data-theme="dark"] .subtle-save-btn:hover,
html[data-theme="dark"] .subtle-save-btn:focus,
html[data-theme="dark"] .subtle-save-btn:focus-visible,
html[data-theme="dark"] .subtle-save-btn:active{
  box-shadow:none !important;
  filter:none !important;
}

html[data-theme="dark"] .blocked-badge{
  color: #fca5a5;
  border-color: rgba(248,113,113,.6);
  background: rgba(248,113,113,.2);
}

.friend-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.friend-email{
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contacts-page input[type="email"],
.contacts-page input[type="text"]{
  width: 100%;
  box-sizing: border-box;
}

.contacts-page label{
  display: block;
  width: 100%;
}

.contacts-page input[type="email"],
.contacts-page input[type="text"]{
  max-width: 100%;
  min-width: 0;
}

.contacts-page .client-head{
  align-items: flex-start;
  min-width: 0;
}

.contacts-page .client-head > *{
  min-width: 0;
}

.contacts-page .friend-email{
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contacts-page .client-actions{
  flex-wrap: wrap;
  gap: .5rem;
}

@media (max-width: 900px){
  .contacts-page .grid2{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .contacts-page .dashboard-cards{
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .contacts-page .card{
    width: 100%;
  }
  .contacts-page .client-card{
    width: 100%;
  }
  .contacts-page .contacts-menu{
    margin-left: .5rem;
  }
  .contacts-page .contacts-menu summary{
    padding: .35rem .75rem;
  }
  .contacts-page .client-head{
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
  }
  .contacts-page .friend-card{
    align-items: flex-start;
  }
  .contacts-page .client-actions{
    width: 100%;
  }
}

.contacts-menu{
  position: relative;
}

.contacts-menu summary{
  list-style: none;
  cursor: pointer;
  padding: .3rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.contacts-menu summary::-webkit-details-marker{
  display: none;
}

.contacts-menu-panel{
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  border-radius: 12px;
  padding: .5rem;
  border: 1px solid rgba(159,163,160,.25);
  min-width: 160px;
  box-shadow: 0 12px 24px rgba(22,25,22,.12);
  display: grid;
  gap: .3rem;
  z-index: 5;
}

.contacts-menu-panel a{
  color: inherit;
  text-decoration: none;
  padding: .4rem .5rem;
  border-radius: 10px;
}

.contacts-menu-panel a:hover{
  background: rgba(159,163,160,.15);
}

html[data-theme="dark"] .contacts-menu summary,
html[data-theme="dark"] .contacts-menu-panel{
  background: rgba(13,16,13,.97);
  border-color: rgba(111,155,41,0.18);
  color: #f0f4f8;
}

@media (max-width: 700px){
  .friend-email{
    max-width: 180px;
  }
}

html[data-theme="dark"] .messages-list{
  background: rgba(13,15,13,.7);
  border-color: rgba(111,155,41,0.12);
}

html[data-theme="dark"] .message-list-item{
  background: rgba(18,20,18,.92);
  border-color: rgba(111,155,41,0.12);
  box-shadow: 0 8px 20px rgba(8,10,8,0.35);
}

html[data-theme="dark"] .message-list-item:hover{
  background: rgba(31,33,31,.88);
}

.messages-back-btn{
  border: 1px solid rgba(159,163,160,.32);
  background: #e5e7eb;
  color: #161917 !important;
  text-decoration: none;
  font-weight: 700;
  box-shadow: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.messages-back-btn span{
  display: none;
}

.messages-back-btn:hover{
  border-color: rgba(112,116,113,.42);
  background: #dee1de;
  color: #161917 !important;
}

.messages-back-btn:focus-visible{
  outline: none;
  border-color: rgba(112,116,113,.48);
  box-shadow: 0 0 0 3px rgba(159,163,160,.14);
}

/* Archived chats page refresh */
.messages-archived-shell{
  padding: .85rem .9rem 1rem;
}

.messages-archived-page{
  display: grid;
  gap: 1.05rem;
  max-width: 1080px;
  margin: 0 auto;
}

.messages-archived-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.messages-archived-hero-copy h1{
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.04;
  color: #f8fbff;
}

.messages-archived-hero-copy p{
  margin: .35rem 0 0;
  color: #8d908d;
  font-size: 1.02rem;
}

.messages-archived-panel{
  border-radius: 22px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(20,23,21,.985), rgba(11,14,12,.995));
  padding: 1.1rem;
  overflow: visible;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(6,8,6,.14);
}

.messages-archived-search{
  display: flex;
  align-items: center;
  gap: .72rem;
  margin-bottom: 1rem;
  padding: .88rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.03);
  color: #9ea29f;
}

.messages-archived-search .nav-icon-lucide{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.messages-archived-search input{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #eaedea;
  font-size: .98rem;
}

.messages-archived-search input::placeholder{
  color: #8d908d;
}

.messages-archived-list{
  display: grid;
  gap: .85rem;
  overflow: visible;
}

.messages-archived-item{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .9rem;
  padding: .72rem;
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  position: relative;
  overflow: visible;
  z-index: 1;
}

.messages-archived-item:has(.kebab-menu[open]){
  z-index: 320;
}

.messages-archived-link{
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .92rem .96rem;
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.12);
  background: rgba(255,255,255,.025);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.messages-archived-link:hover{
  border-color: rgba(141,195,55,.22);
  background: rgba(255,255,255,.045);
  box-shadow: 0 16px 30px rgba(6,8,6,.16);
  transform: translateY(-1px);
}

.messages-archived-avatar{
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  flex: 0 0 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9cd73d, #81b430);
  color: #2e4501;
  font-weight: 800;
}

.messages-archived-meta{
  min-width: 0;
  display: grid;
  gap: .18rem;
}

.messages-archived-title-row{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.messages-archived-title-row strong{
  color: #eaedea;
  font-size: 1rem;
  line-height: 1.2;
}

.messages-archived-kind{
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0 .48rem;
  border-radius: 999px;
  background: rgba(159,163,160,.16);
  color: #b2b6b3;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.messages-archived-snippet{
  color: #8d908d;
  font-size: .95rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-archived-link-icon{
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ea29f;
  background: rgba(255,255,255,.04);
  flex: 0 0 auto;
}

.messages-archived-link-icon .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-archived-action{
  flex: 0 0 auto;
}

.messages-archived-actions{
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex: 0 0 auto;
  position: relative;
}

.messages-archived-menu-trigger{
  color: #9ea29f;
}

.messages-archived-actions .kebab-panel{
  top: calc(100% + .3rem);
  width: min(16.4rem, calc(100vw - 2rem));
  padding: .95rem 1rem .9rem;
  border-radius: 10px;
  border: 0;
  background: #2b2b2e;
  box-shadow: 0 16px 30px rgba(0,0,0,.34);
  gap: 0;
}

.messages-archived-action{
  margin: 0;
  display: block;
  width: 100%;
}

.messages-archived-actions .kebab-panel .menu-item{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  border: none !important;
  background: transparent;
  background-color: transparent !important;
  background-image: none !important;
  color: #f3f4f6;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: start;
  gap: .7rem;
  padding: .4rem 0 !important;
  margin: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: none !important;
  text-align: left;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  transition: transform .14s ease, opacity .14s ease, color .14s ease;
}

.messages-archived-menu-item{
  justify-content: flex-start;
}

.messages-archived-action-trigger{
  user-select: none;
  -webkit-user-select: none;
}

.messages-archived-actions .kebab-panel .menu-item:hover,
.messages-archived-actions .kebab-panel .menu-item:focus,
.messages-archived-actions .kebab-panel .menu-item:focus-visible{
  background: transparent;
  opacity: 1;
  transform: translate3d(0, -1px, 0);
  outline: none;
}

.messages-archived-actions .kebab-panel .menu-item:active{
  transform: translate3d(0, 1px, 0);
}

.messages-archived-actions .kebab-panel .menu-item,
.messages-archived-actions .kebab-panel .menu-item:hover,
.messages-archived-actions .kebab-panel .menu-item:focus,
.messages-archived-actions .kebab-panel .menu-item:focus-visible,
.messages-archived-actions .kebab-panel .menu-item:active{
  border: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
}

.messages-archived-actions .kebab-panel .menu-item .nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: inherit;
}

.messages-archived-menu-item-icon{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  padding-top: 0;
}

.messages-archived-menu-item-copy{
  display: grid;
  gap: .1rem;
  min-width: 0;
  align-self: start;
  padding-top: .04rem;
}

.messages-archived-menu-item-icon .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.messages-archived-menu-item-copy strong{
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  color: #f3f4f6;
}

.messages-archived-menu-item-copy span{
  display: block;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.15;
  color: #a5a8a5;
}

.messages-archived-actions .kebab-panel .menu-item-danger{
  color: #f3f4f6 !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.messages-archived-actions .kebab-panel .menu-item-danger:hover,
.messages-archived-actions .kebab-panel .menu-item-danger:focus,
.messages-archived-actions .kebab-panel .menu-item-danger:focus-visible,
.messages-archived-actions .kebab-panel .menu-item-danger:active{
  color: #f3f4f6 !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .messages-archived-actions .kebab-panel .menu-item,
html[data-theme="dark"] .messages-archived-actions .kebab-panel .menu-item-danger,
html[data-theme="dark"] .messages-archived-actions .kebab-panel .menu-item:hover,
html[data-theme="dark"] .messages-archived-actions .kebab-panel .menu-item-danger:hover,
html[data-theme="light"] .messages-archived-actions .kebab-panel .menu-item,
html[data-theme="light"] .messages-archived-actions .kebab-panel .menu-item-danger,
html[data-theme="light"] .messages-archived-actions .kebab-panel .menu-item:hover,
html[data-theme="light"] .messages-archived-actions .kebab-panel .menu-item-danger:hover{
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.messages-archived-unarchive-btn{
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(141,195,55,.18);
  background: rgba(123,172,44,.12);
  color: #edf1ee;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 10px 24px rgba(6,8,6,.12);
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.messages-archived-unarchive-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
}

.messages-archived-unarchive-btn:hover{
  border-color: rgba(151,211,55,.28);
  background: rgba(123,172,44,.18);
  color: #f8fdff;
  transform: translateY(-1px);
}

.messages-archived-unarchive-btn:focus-visible{
  outline: none;
  border-color: rgba(151,211,55,.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 0 3px rgba(123,172,44,.1),
    0 10px 24px rgba(6,8,6,.12);
}

.messages-archived-remove-btn{
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(248,113,113,.18);
  background: rgba(239,68,68,.1);
  color: #ffd5d5;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 10px 24px rgba(6,8,6,.12);
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.messages-archived-remove-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
}

.messages-archived-remove-btn:hover{
  border-color: rgba(248,113,113,.3);
  background: rgba(239,68,68,.16);
  color: #fff1f2;
  transform: translateY(-1px);
}

.messages-archived-remove-btn:focus-visible{
  outline: none;
  border-color: rgba(248,113,113,.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 0 3px rgba(239,68,68,.1),
    0 10px 24px rgba(6,8,6,.12);
}

.messages-archived-empty{
  min-height: 15rem;
  display: grid;
  place-items: center;
  gap: .75rem;
  padding: 2rem 1.2rem;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(141,195,55,.2);
  background: rgba(255,255,255,.02);
  color: #8d908d;
}
.messages-archived-empty-search{
  margin-top: 1rem;
}

.messages-archived-empty strong{
  color: #eaedea;
  font-size: 1.05rem;
}

.messages-archived-empty p{
  margin: 0;
  max-width: 32rem;
}

.messages-archived-empty-icon{
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.14);
  background: linear-gradient(135deg, rgba(123,172,44,.18), rgba(131,182,50,.1));
  color: #97d337;
}

.messages-archived-empty-icon .nav-icon-lucide{
  width: 20px;
  height: 20px;
}

html[data-theme="light"] .messages-archived-hero-copy h1,
html[data-theme="light"] .messages-archived-title-row strong,
html[data-theme="light"] .messages-archived-empty strong{
  color: #1f221f;
}

html[data-theme="light"] .messages-archived-hero-copy p,
html[data-theme="light"] .messages-archived-snippet,
html[data-theme="light"] .messages-archived-empty{
  color: #747875;
}

html[data-theme="light"] .messages-archived-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-archived-search{
  background: rgba(255,255,255,.8);
  border-color: rgba(159,163,160,.16);
  color: #707471;
}

html[data-theme="light"] .messages-archived-search input{
  color: #161916;
}

html[data-theme="light"] .messages-archived-search input::placeholder{
  color: #707471;
}

html[data-theme="light"] .messages-archived-item,
html[data-theme="light"] .messages-archived-link{
  background: rgba(255,255,255,.78);
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-archived-link:hover{
  border-color: rgba(141,195,55,.22);
  background: rgba(248,251,255,.98);
}

html[data-theme="light"] .messages-archived-kind{
  background: rgba(159,163,160,.14);
  color: #707471;
}

html[data-theme="light"] .messages-archived-link-icon{
  background: rgba(22,25,22,.05);
  color: #707471;
}

html[data-theme="light"] .messages-archived-menu-trigger{
  color: #707471;
}

html[data-theme="light"] .messages-archived-unarchive-btn{
  background: rgba(123,172,44,.12);
  border-color: rgba(123,172,44,.16);
  color: #283a0c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 12px 28px rgba(22,25,22,.07);
}

html[data-theme="light"] .messages-archived-unarchive-btn:hover{
  background: rgba(123,172,44,.18);
  border-color: rgba(123,172,44,.24);
  color: #242724;
}

html[data-theme="light"] .messages-archived-remove-btn{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.16);
  color: #b91c1c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 12px 28px rgba(22,25,22,.07);
}

html[data-theme="light"] .messages-archived-remove-btn:hover{
  background: rgba(239,68,68,.13);
  border-color: rgba(239,68,68,.22);
  color: #991b1b;
}

html[data-theme="light"] .messages-archived-empty{
  background: rgba(255,255,255,.76);
  border-color: rgba(141,195,55,.16);
}

@media (max-width: 900px){
  .messages-archived-hero{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .messages-archived-back{
    align-self: flex-start;
    width: var(--back-btn-size);
    min-width: var(--back-btn-size);
  }

  .messages-archived-item{
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  .messages-archived-actions{
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px){
  .messages-archived-shell{
    padding: .65rem .72rem calc(var(--mobile-nav-height, 0px) + .9rem);
  }

  .messages-archived-page{
    gap: .85rem;
  }

  .messages-archived-hero-copy h1{
    font-size: 1.8rem;
  }

  .messages-archived-panel{
    padding: .95rem .9rem;
    border-radius: 20px;
  }

  .messages-archived-item{
    padding: .68rem;
    border-radius: 16px;
  }

  .messages-archived-link{
    padding: .82rem .85rem;
  }

  .messages-archived-search{
    padding: .8rem .88rem;
    margin-bottom: .88rem;
  }

  .messages-archived-link-icon{
    display: none;
  }

  .messages-archived-empty{
    min-height: 12rem;
    padding: 1.4rem 1rem;
  }

  .messages-archived-empty-search{
    margin-top: 1.1rem;
  }

  .messages-archived-back{
    width: var(--back-btn-size);
    min-width: var(--back-btn-size);
  }
}

/* New message page refresh */
.messages-new-shell{
  padding: .85rem .9rem 1rem;
}

.messages-new-page{
  display: grid;
  gap: 1.05rem;
  max-width: 1080px;
  margin: 0 auto;
}

.messages-new-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.messages-new-back{
  width: var(--back-btn-size);
  min-width: var(--back-btn-size);
  height: var(--back-btn-size);
  min-height: var(--back-btn-size);
  padding: 0;
  border-radius: var(--back-btn-radius);
  flex: 0 0 var(--back-btn-size);
  align-self: flex-start;
}

.messages-new-hero-copy h1{
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.04;
  color: #f8fbff;
}

.messages-new-hero-copy p{
  margin: .35rem 0 0;
  color: #8d908d;
  font-size: 1.02rem;
}

.messages-new-panel{
  border-radius: 22px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(20,23,21,.985), rgba(11,14,12,.995));
  padding: 1.1rem 1.1rem 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(6,8,6,.14);
  display: grid;
  gap: .95rem;
}

.messages-new-panel-intro{
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.16);
  background: rgba(255,255,255,.03);
}

.messages-new-panel-icon{
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 14px;
  flex: 0 0 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.14);
  background: linear-gradient(135deg, rgba(123,172,44,.22), rgba(131,182,50,.1));
  color: #97d337;
}

.messages-new-panel-icon .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.messages-new-panel-copy{
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.messages-new-panel-copy strong{
  color: #eaedea;
  font-size: 1rem;
}

.messages-new-panel-copy span{
  color: #8d908d;
  font-size: .95rem;
}

.messages-new-search{
  display: grid;
  gap: .55rem;
}

.messages-new-search > span{
  color: #eaedea;
  font-weight: 700;
}

.messages-new-search-field{
  position: relative;
}

.messages-new-search-field .nav-icon-lucide{
  position: absolute;
  left: .95rem;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #8d908d;
}

.messages-new-search-field input{
  width: 100%;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.035);
  color: #eaedea;
  padding: .78rem 1rem .78rem 2.7rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.messages-new-search-field input::placeholder{
  color: #8d908d;
}

.messages-new-search-field input:hover{
  border-color: rgba(141,195,55,.2);
}

.messages-new-search-field input:focus{
  outline: none;
  border-color: rgba(141,195,55,.32);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(123,172,44,.08);
}

.messages-new-list{
  display: grid;
  gap: .6rem;
  padding: .8rem;
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.02);
}

.messages-new-item{
  border-radius: 16px;
}

.messages-new-link{
  display: flex;
  align-items: center;
  gap: .82rem;
  padding: .92rem .95rem;
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.12);
  background: rgba(255,255,255,.025);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.messages-new-link:hover{
  border-color: rgba(141,195,55,.2);
  background: rgba(255,255,255,.04);
  box-shadow: 0 16px 30px rgba(6,8,6,.16);
  transform: translateY(-1px);
}

.messages-new-avatar{
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  flex: 0 0 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
  font-weight: 800;
}

.messages-new-meta{
  min-width: 0;
  display: grid;
  gap: .14rem;
}

.messages-new-meta strong{
  color: #eaedea;
  font-size: 1rem;
  line-height: 1.2;
}

.messages-new-meta span{
  color: #8d908d;
  font-size: .94rem;
  line-height: 1.3;
}

.messages-new-link-icon{
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ea29f;
  background: rgba(255,255,255,.04);
  flex: 0 0 auto;
}

.messages-new-link-icon .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-new-empty{
  padding: .3rem .15rem;
}

html[data-theme="light"] .messages-new-hero-copy h1,
html[data-theme="light"] .messages-new-search > span,
html[data-theme="light"] .messages-new-panel-copy strong,
html[data-theme="light"] .messages-new-meta strong{
  color: #1f221f;
}

html[data-theme="light"] .messages-new-hero-copy p,
html[data-theme="light"] .messages-new-panel-copy span,
html[data-theme="light"] .messages-new-meta span,
html[data-theme="light"] .messages-new-empty{
  color: #747875;
}

html[data-theme="light"] .messages-new-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-new-panel-intro,
html[data-theme="light"] .messages-new-list,
html[data-theme="light"] .messages-new-link{
  background: rgba(255,255,255,.78);
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-new-search-field input{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.16);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

html[data-theme="light"] .messages-new-search-field input::placeholder{
  color: #969a97;
}

html[data-theme="light"] .messages-new-search-field input:hover,
html[data-theme="light"] .messages-new-link:hover{
  border-color: rgba(141,195,55,.22);
  background: rgba(248,251,255,.98);
}

html[data-theme="light"] .messages-new-search-field input:focus{
  background: rgba(255,255,255,.99);
  box-shadow: 0 0 0 3px rgba(123,172,44,.1);
}

html[data-theme="light"] .messages-new-link-icon{
  background: rgba(22,25,22,.05);
  color: #707471;
}

@media (max-width: 900px){
  .messages-new-hero{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .messages-new-back{
    align-self: flex-start;
  }
}

@media (max-width: 640px){
  .messages-new-shell{
    padding: .65rem .72rem calc(var(--mobile-nav-height, 0px) + .9rem);
  }

  .messages-new-page{
    gap: .85rem;
  }

  .messages-new-hero-copy h1{
    font-size: 1.8rem;
  }

  .messages-new-panel{
    padding: 1rem .9rem .92rem;
    border-radius: 20px;
  }

  .messages-new-panel-intro,
  .messages-new-list{
    padding: .82rem;
  }

  .messages-new-link{
    padding: .82rem .85rem;
  }

  .messages-new-back{
    width: auto;
    align-self: flex-start;
  }
}

/* Contacts page refresh */
.contacts-shell{
  padding: .85rem .9rem 1rem;
  min-width: 0;
  overflow-x: clip;
}

.contacts-page{
  display: grid;
  gap: 1.05rem;
  max-width: 1080px;
  margin: 0 auto;
  min-width: 0;
  overflow-x: clip;
}

/* Wrapper for the HTMX-swappable sections: keep the panels as direct grid
   children of .contacts-page so each constrains its own width (and the
   suggestion carousel scrolls instead of widening the page). */
#contacts-sections{
  display: contents;
}

.contacts-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.contacts-hero-copy h1{
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.04;
  color: #f8fbff;
}

.contacts-hero-copy p{
  margin: .35rem 0 0;
  color: #8d908d;
  font-size: 1.02rem;
}

.contacts-back{
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: 0 1rem;
  border-radius: 16px;
  border: 1px solid rgba(170,235,66,.22);
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  text-decoration: none;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18);
}

.contacts-back .nav-icon-lucide{
  width: 17px;
  height: 17px;
}

.contacts-panel{
  border-radius: 22px;
  border: 1px solid rgba(59,89,2,.18);
  background:
    linear-gradient(180deg, rgba(20,23,21,.985), rgba(11,14,12,.995));
  padding: 1.1rem 1.1rem 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(6,8,6,.14);
  min-width: 0;
  overflow-x: clip;
}

/* Dark mode: match the neutral grey of the dashboard cards, not the old navy. */
html[data-theme="dark"] .contacts-panel{
  border-color: var(--border);
  background: var(--card);
}
html[data-theme="dark"] .contacts-suggest-card{
  border-color: var(--border);
  background: var(--color-bg-elevated, #484b48);
}

.contacts-panel-head,
.contacts-section-head{
  margin-bottom: .9rem;
}
.contacts-collapsible{
  display:block;
}
.contacts-section-summary{
  margin:0;
  list-style:none;
}
.contacts-section-summary::-webkit-details-marker{
  display:none;
}
.contacts-section-summary::marker{
  content:"";
}
.contacts-collapsible-body{
  margin-top:.9rem;
  min-width: 0;
  overflow-x: clip;
}
.contacts-search-hidden{
  display:none !important;
}

.contacts-panel-head strong,
.contacts-title-row strong{
  color: #eaedea;
  font-size: 1rem;
}

.contacts-title-row{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.contacts-count{
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(123,172,44,.12);
  border: 1px solid rgba(123,172,44,.16);
  color: #a0dd3e;
  font-size: .8rem;
  font-weight: 800;
}

.contacts-add-form{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
}

.contacts-input-wrap{
  display: block;
}

.contacts-input-wrap input,
.contacts-search-wrap input{
  width: 100%;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.035);
  color: #eaedea;
  padding: .78rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.contacts-input-wrap input::placeholder,
.contacts-search-wrap input::placeholder{
  color: #8d908d;
}

.contacts-primary-btn,
.contacts-secondary-btn,
.contacts-message-btn{
  appearance: none;
  -webkit-appearance: none;
  min-height: 2.8rem;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.contacts-primary-btn{
  border: 0;
  background: linear-gradient(180deg, #97d13c, #8ac033);
  color: #0e110f;
  box-shadow: 0 12px 26px rgba(125,174,47,.18);
}

.contacts-secondary-btn,
.contacts-message-btn{
  border: 1px solid rgba(82,85,82,.42);
  background: rgba(15,17,15,.74);
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.contacts-message-btn{
  border-color: rgba(170,235,66,.22);
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18);
}

.contacts-primary-btn .nav-icon-lucide,
.contacts-message-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
}

.contacts-compact-btn{
  min-height: 2.45rem;
  border-radius: 13px;
  padding: 0 1rem;
}

.contacts-stack,
.contacts-list{
  display: grid;
  gap: .72rem;
  min-width: 0;
}

.contacts-search-wrap{
  position: relative;
  display: block;
  margin-bottom: .9rem;
}

.contacts-search-wrap .nav-icon-lucide{
  position: absolute;
  left: .9rem;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #8d908d;
}

.contacts-search-wrap input{
  padding-left: 2.55rem;
}

.contacts-input-wrap input:hover,
.contacts-search-wrap input:hover{
  border-color: rgba(141,195,55,.2);
}

.contacts-input-wrap input:focus,
.contacts-search-wrap input:focus{
  outline: none;
  border-color: rgba(141,195,55,.32);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(123,172,44,.08);
}

.contacts-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.12);
  background: rgba(255,255,255,.025);
  padding: .88rem .95rem;
}

.contacts-friend-row{
  position: relative;
  background: transparent;
  border-color: transparent;
  padding: .62rem 3.1rem .62rem .3rem;
}

.contacts-friend-row--compact{
  padding-right: .3rem;
}

.contacts-person{
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.contacts-avatar{
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.8rem;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
  font-weight: 800;
}

/* Discover-followers carousel */
.contacts-suggest-scroll{
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: .25rem;
  margin: 0 -1.1rem;
  padding-inline: 1.1rem;
}
.contacts-suggest-scroll::-webkit-scrollbar{
  display: none;
}

.contacts-suggest-card{
  position: relative;
  flex: 0 0 9rem;
  width: 9rem;
  scroll-snap-align: start;
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding: 1rem .75rem .85rem;
  border-radius: 18px;
  border: 1px solid rgba(170,235,66,.16);
  background: rgba(15,17,15,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: opacity .2s ease, transform .2s ease;
}
/* htmx tags the card with .htmx-swapping during the swap delay: fade it out. */
.contacts-suggest-card.htmx-swapping{
  opacity: 0;
  transform: scale(.94);
}
@media (prefers-reduced-motion: reduce){
  .contacts-suggest-card,
  .contacts-suggest-card.htmx-swapping{
    transition: none;
    transform: none;
  }
}

.contacts-suggest-hide{
  position: absolute;
  top: .35rem;
  right: .35rem;
  margin: 0;
  line-height: 0;
}

.contacts-suggest-dismiss{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(229,233,229,.55);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.contacts-suggest-dismiss:hover,
.contacts-suggest-dismiss:focus-visible{
  color: #eaedea;
  background: rgba(159,163,160,.16);
}
.contacts-suggest-dismiss .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.contacts-suggest-avatar{
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
  font-weight: 800;
  font-size: 1.25rem;
}
.contacts-suggest-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contacts-suggest-name{
  max-width: 100%;
  color: #eaedea;
  font-weight: 700;
  font-size: .92rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-suggest-meta{
  color: rgba(159,163,160,.85);
  font-size: .78rem;
  text-align: center;
}

.contacts-suggest-follow-form{
  width: 100%;
  margin: .15rem 0 0;
}
.contacts-suggest-follow{
  width: 100%;
  min-height: 2.3rem;
  border-radius: 12px;
  justify-content: center;
  padding: .5rem .6rem;
  font-size: .88rem;
}

.contacts-person-copy{
  min-width: 0;
  display: grid;
  gap: .16rem;
}

.contacts-person-copy strong{
  color: #eaedea;
  font-size: 1rem;
  line-height: 1.2;
}

.contacts-person-copy span{
  color: #8d908d;
  font-size: .95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.contacts-person-name{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.contacts-status-badge,
.contacts-pending-tag{
  min-height: 1.6rem;
  padding: 0 .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.14);
  color: #fda4af;
  font-size: .76rem;
  font-weight: 700;
}

.contacts-pending-tag{
  background: rgba(123,172,44,.12);
  border-color: rgba(123,172,44,.16);
  color: #a0dd3e;
}

.contacts-actions{
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contacts-actions-inline{
  flex-wrap: nowrap;
}

.contacts-friend-row .contacts-actions-inline{
  width: 100%;
  justify-content: flex-start;
}

.contacts-friend-menu{
  position: absolute;
  top: .45rem;
  right: .1rem;
  z-index: 7;
}

.contacts-name-menu{
  position: relative;
  top: auto;
  right: auto;
  flex: 0 0 auto;
}

.contacts-friend-menu summary{
  width: 2.1rem;
  height: 2.1rem;
}

.contacts-primary-btn:hover,
.contacts-primary-btn:focus-visible{
  background: linear-gradient(180deg, #9dd83f, #90c836);
  box-shadow: 0 14px 28px rgba(125,174,47,.22);
}

.contacts-secondary-btn:hover,
.contacts-message-btn:hover,
.contacts-row-menu summary:hover{
  border-color: rgba(141,195,55,.24);
  background: rgba(20,22,20,.92);
}

.contacts-secondary-btn:focus-visible,
.contacts-message-btn:focus-visible,
.contacts-row-menu summary:focus-visible{
  outline: none;
  border-color: rgba(141,195,55,.3);
  background: rgba(20,22,20,.94);
  box-shadow: 0 0 0 3px rgba(123,172,44,.08);
}

.contacts-row-menu{
  position: relative;
}

.contacts-row-menu summary{
  list-style: none;
  cursor: pointer;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #8d908d;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.contacts-row-menu summary::-webkit-details-marker{
  display: none;
}

.contacts-row-menu .nav-icon-lucide{
  width: 17px;
  height: 17px;
}

.contacts-row-menu-panel{
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  z-index: 6;
  display: grid;
  gap: .22rem;
  min-width: 152px;
  padding: .45rem;
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(17,19,17,.992), rgba(13,16,14,.998));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 16px 34px rgba(6,8,6,.24);
  max-width: min(20rem, calc(100vw - 1.4rem));
  box-sizing: border-box;
  overflow-x: clip;
}

.contacts-row-menu-panel form{
  margin: 0;
  display: block;
}

.contacts-row-menu-btn{
  width: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #eaedea;
  text-align: left;
  padding: .58rem .65rem;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transform: translateY(0) scale(1);
  transition: color .16s ease, transform .16s ease;
  white-space: nowrap;
}

.contacts-row-menu-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
  flex: 0 0 auto;
  justify-self: center;
  transform: translateY(0) scale(1);
  transition: transform .18s ease, color .16s ease;
}

.contacts-row-menu-btn span:last-child{
  display: block;
  transform: translateY(0) scale(1);
  transform-origin: left center;
  transition: transform .18s ease, color .16s ease;
}

.contacts-row-menu-btn:hover,
.contacts-row-menu-btn:focus,
.contacts-row-menu-btn:focus-visible{
  background: transparent;
  box-shadow: none;
  outline: none;
  transform: translateY(-1px) scale(1.02);
}

.contacts-row-menu-btn:hover .nav-icon-lucide,
.contacts-row-menu-btn:focus .nav-icon-lucide,
.contacts-row-menu-btn:focus-visible .nav-icon-lucide,
.contacts-row-menu-btn:hover span:last-child,
.contacts-row-menu-btn:focus span:last-child,
.contacts-row-menu-btn:focus-visible span:last-child{
  transform: translateY(-1px) scale(1.03);
}

.contacts-row-menu-btn:active{
  transform: translateY(1px) scale(.98);
}

.contacts-row-menu-btn.is-danger{
  color: #ff5d5d;
}

.contacts-empty{
  padding: .2rem 0;
}

html[data-theme="light"] .contacts-hero-copy h1,
html[data-theme="light"] .contacts-panel-head strong,
html[data-theme="light"] .contacts-title-row strong,
html[data-theme="light"] .contacts-person-copy strong{
  color: #1f221f;
}

html[data-theme="light"] .contacts-hero-copy p,
html[data-theme="light"] .contacts-person-copy span,
html[data-theme="light"] .contacts-empty{
  color: #747875;
}

html[data-theme="light"] .contacts-back,
html[data-theme="light"] .contacts-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .contacts-back{
  border-color: rgba(170,235,66,.22);
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18);
}

html[data-theme="light"] .contacts-input-wrap input,
html[data-theme="light"] .contacts-search-wrap input{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.14);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

html[data-theme="light"] .contacts-secondary-btn,
html[data-theme="light"] .contacts-message-btn{
  background: rgba(255,255,255,.92);
  border-color: rgba(159,163,160,.22);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

html[data-theme="light"] .contacts-message-btn{
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  border-color: rgba(170,235,66,.22);
  color: #0e110f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.16);
}

html[data-theme="light"] .contacts-row{
  background: rgba(255,255,255,.66);
  border-color: rgba(159,163,160,.12);
}

html[data-theme="light"] .contacts-friend-row{
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] .contacts-row-menu-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,248,245,.98));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 16px 34px rgba(22,25,22,.08);
}

html[data-theme="light"] .contacts-row-menu-btn{
  color: #1f221f;
}

html[data-theme="light"] .contacts-input-wrap input:hover,
html[data-theme="light"] .contacts-search-wrap input:hover,
html[data-theme="light"] .contacts-secondary-btn:hover,
html[data-theme="light"] .contacts-message-btn:hover,
html[data-theme="light"] .contacts-row-menu summary:hover{
  border-color: rgba(141,195,55,.26);
  background: rgba(248,251,255,.98);
}

html[data-theme="light"] .contacts-message-btn:hover{
  border-color: rgba(185,253,82,.3);
  background: linear-gradient(135deg, #aaeb42, #97d337);
  color: #0e110f;
}

html[data-theme="light"] .contacts-input-wrap input:focus,
html[data-theme="light"] .contacts-search-wrap input:focus,
html[data-theme="light"] .contacts-secondary-btn:focus-visible,
html[data-theme="light"] .contacts-message-btn:focus-visible,
html[data-theme="light"] .contacts-row-menu summary:focus-visible{
  border-color: rgba(141,195,55,.3);
  background: rgba(255,255,255,.99);
  box-shadow: 0 0 0 3px rgba(123,172,44,.1);
}

html[data-theme="light"] .contacts-message-btn:focus-visible{
  border-color: rgba(141,195,55,.3);
  background: linear-gradient(135deg, #90c837, #7bac2c);
  color: #0e110f;
}

@media (max-width: 900px){
  .contacts-hero{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .contacts-back{
    align-self: flex-start;
  }

  .contacts-add-form{
    grid-template-columns: 1fr;
  }

  .contacts-add-form .contacts-primary-btn{
    justify-self: end;
    min-height: 2.4rem;
    padding: 0 1.1rem;
  }

  .contacts-row{
    flex-direction: column;
    align-items: stretch;
  }

  .contacts-actions,
  .contacts-actions-inline{
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
  }

  .contacts-message-btn{
    min-width: 9rem;
  }

  .contacts-row-menu-panel{
    right: auto;
    left: 0;
  }

  .contacts-friend-row{
    padding-right: 3rem;
  }

  .contacts-friend-row--compact{
    padding-right: .3rem;
  }

  .contacts-friend-menu{
    top: .4rem;
    right: .2rem;
  }

  .contacts-friend-menu .contacts-row-menu-panel{
    left: 0 !important;
    right: auto !important;
    transform: none;
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
  }

  .contacts-name-menu{
    position: relative;
    top: auto;
    right: auto;
  }

  .contacts-name-menu .contacts-row-menu-panel{
    left: auto !important;
    right: 0 !important;
  }
}

@media (max-width: 640px){
  .contacts-shell{
    padding: .65rem .72rem calc(var(--mobile-nav-height, 0px) + .9rem);
  }

  .contacts-page{
    gap: .85rem;
  }

  .contacts-hero-copy h1{
    font-size: 1.8rem;
  }

  .contacts-panel{
    padding: 1rem .9rem .92rem;
    border-radius: 20px;
  }

  .contacts-row{
    padding: .8rem .85rem;
  }

  .contacts-primary-btn,
  .contacts-secondary-btn,
  .contacts-message-btn{
    width: 100%;
  }

  .contacts-actions-inline{
    gap: .45rem;
  }

  .contacts-row-menu{
    flex: 1 1 100%;
  }

  .contacts-row-menu summary{
    width: 100%;
    justify-content: center;
  }

  .contacts-row-menu-panel{
    left: 0;
    right: 0;
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 1.44rem);
  }

  .contacts-friend-row{
    padding-top: .7rem;
    padding-right: 3.35rem;
  }

  .contacts-friend-row--compact{
    padding-right: .3rem;
  }

  .contacts-friend-row .contacts-actions-inline{
    padding-top: .18rem;
  }

  .contacts-friend-menu{
    top: .52rem;
    right: .18rem;
    flex: 0 0 auto;
  }

  .contacts-friend-menu summary{
    width: 2.15rem;
    height: 2.15rem;
  }

  .contacts-friend-menu .contacts-row-menu-panel{
    left: auto;
    right: 0;
  }

  .contacts-name-menu{
    position: relative;
    top: auto;
    right: auto;
  }

  .contacts-avatar{
    width: 2.55rem;
    height: 2.55rem;
    flex-basis: 2.55rem;
  }
}

@media (max-width: 900px){
  html,
  body{
    max-width: 100vw;
    overflow-x: hidden;
  }

  body.app main,
  body.app section,
  body.app form,
  body.app details,
  body.app .card{
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.app input,
  body.app textarea,
  body.app select{
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Groups page refresh */
.groups-shell{
  padding: .85rem .9rem 1rem;
}

.groups-page{
  display: grid;
  gap: 1.05rem;
  max-width: 1080px;
  margin: 0 auto;
}

.groups-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.groups-hero-copy h1{
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.04;
  color: #f8fbff;
}

.groups-hero-copy p{
  margin: .35rem 0 0;
  color: #8d908d;
  font-size: 1.02rem;
}

.groups-back .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.groups-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
  gap: 1rem;
  align-items: stretch;
}

.groups-panel{
  border-radius: 22px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(20,23,21,.985), rgba(11,14,12,.995));
  padding: 1.1rem 1.1rem 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(6,8,6,.14);
}

.groups-create-panel{
  display: grid;
  min-height: 680px;
  align-content: start;
}

.groups-form{
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .85rem;
}

.groups-panel-head{
  margin-bottom: .7rem;
}

.groups-panel-title{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #eaedea;
}

.groups-panel-title .nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: #97d13c;
}

.groups-panel-title strong{
  font-size: 1rem;
}

.groups-field{
  display: grid;
  gap: .48rem;
}

.groups-field > span{
  color: #9fa3a0;
  font-weight: 600;
}

.groups-field input,
.groups-field select{
  width: 100%;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.035);
  color: #eaedea;
  padding: .78rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.groups-field input::placeholder{
  color: #8d908d;
}

.groups-picker{
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.02);
  overflow: hidden;
}

.groups-picker summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .95rem 1rem;
  cursor: pointer;
  color: #d0d4d1;
  background: rgba(255,255,255,.03);
  transition: background-color .18s ease, border-color .18s ease;
}

.groups-picker summary::-webkit-details-marker{
  display: none;
}

.groups-picker-label{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.groups-picker-label .nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: #8d908d;
}

.groups-picker-caret{
  width: 18px;
  height: 18px;
  color: #8d908d;
  transition: transform .16s ease;
}

.groups-picker[open] .groups-picker-caret{
  transform: rotate(90deg);
}

.groups-picker-body{
  padding: .5rem .75rem .7rem;
}

.groups-picker-grid{
  display: grid;
  gap: .12rem;
  max-height: 210px;
  overflow-y: auto;
  padding-right: .2rem;
}

.groups-member-option{
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .66rem .35rem;
  border-radius: 12px;
  background: transparent;
  border: 0;
  color: #eaedea;
  transition: background-color .18s ease;
  cursor: pointer;
  user-select: none;
}

.groups-member-option:hover{
  background: rgba(255,255,255,.03);
}

.groups-member-option input{
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1.5px solid #97d13c;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.groups-member-option input:checked{
  background: #97d13c;
  box-shadow: inset 0 0 0 3px rgba(14,17,15,.92);
}

.groups-member-avatar{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
  font-weight: 800;
  font-size: .86rem;
}

.groups-member-avatar.small{
  width: 2rem;
  height: 2rem;
  font-size: .74rem;
}

.groups-member-name{
  min-width: 0;
  font-weight: 600;
}

.groups-primary-btn{
  align-self: end;
  width: 100%;
  min-height: 2.9rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: #262926;
  color: #f8fbff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.groups-primary-btn .nav-icon-lucide{
  width: 17px;
  height: 17px;
  color: currentColor !important;
}

.groups-list{
  display: grid;
  gap: .72rem;
}

.groups-list-panel{
  min-height: 680px;
}

.groups-list-card{
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.12);
  background: rgba(255,255,255,.025);
  overflow: hidden;
  transition: border-color .18s ease, background-color .18s ease;
}

.groups-list-card summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: 1.05rem 1rem;
  cursor: pointer;
}

.groups-list-card summary::-webkit-details-marker{
  display: none;
}

.groups-list-card-main{
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.groups-list-avatar{
  width: 2.95rem;
  height: 2.95rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: #0e110f;
  font-weight: 800;
}

.groups-list-copy{
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.groups-list-copy strong{
  color: #eaedea;
  font-size: 1rem;
}

.groups-list-snippet,
.groups-list-meta{
  color: #8d908d;
  font-size: .94rem;
}

.groups-list-meta{
  margin-top: .05rem;
}

.groups-list-caret{
  width: 18px;
  height: 18px;
  color: #8d908d;
  transition: transform .16s ease;
}

.groups-list-card[open] .groups-list-caret{
  transform: rotate(90deg);
}

.groups-manage-body{
  display: grid;
  gap: 1rem;
  padding: .1rem 1rem 1rem;
  border-top: 1px solid rgba(59,89,2,.1);
  background: linear-gradient(180deg, rgba(14,17,15,.28), rgba(9,11,9,.14));
}

.groups-manage-grid{
  display: grid;
  gap: .85rem;
}

.groups-manage-form{
  display: grid;
  gap: .7rem;
}

.groups-secondary-btn,
.groups-inline-btn,
.groups-message-link{
  min-height: 2.45rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.groups-secondary-btn,
.groups-inline-btn{
  border: 1px solid rgba(159,163,160,.24);
  background: #262926;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.groups-message-link{
  border: 1px solid rgba(159,163,160,.24);
  background: #262926;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.groups-inline-btn.danger{
  border-color: rgba(159,163,160,.24);
  background: #262926;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.groups-members-stack{
  display: grid;
  gap: .55rem;
}

.groups-member-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .68rem .72rem;
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(59,89,2,.12);
}

.groups-member-row-main{
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  flex-wrap: wrap;
}

.groups-member-row-name{
  color: #eaedea;
  font-weight: 600;
}

.groups-admin-badge{
  min-height: 1.55rem;
  padding: 0 .52rem;
  border-radius: 999px;
  background: rgba(123,172,44,.12);
  border: 1px solid rgba(123,172,44,.16);
  color: #a0dd3e;
  font-size: .74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.groups-member-actions{
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: .45rem;
  justify-content: center;
  flex: 0 0 auto;
}

.groups-manage-btn,
.groups-member-action-btn,
.groups-footer-action-btn,
.groups-message-link{
  gap: .5rem;
}

.groups-manage-btn .nav-icon-lucide,
.groups-member-action-btn .nav-icon-lucide,
.groups-footer-action-btn .nav-icon-lucide,
.groups-message-link .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
  flex: 0 0 auto;
}

.groups-manage-btn{
  background: rgba(255,255,255,.04);
}

.groups-member-actions form{
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.groups-member-action-btn{
  min-height: 2.3rem;
  padding: 0 .9rem;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  color: #e4e8e5;
  min-width: 10.5rem;
  justify-content: flex-start;
}

.groups-footer-action-btn{
  min-width: 10.5rem;
  justify-content: flex-start;
}

.groups-manage-footer{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
}

.groups-empty{
  padding: .2rem 0;
}

.groups-field input:hover,
.groups-field select:hover,
.groups-picker:hover,
.groups-list-card:hover{
  border-color: rgba(141,195,55,.2);
}

.groups-field input:focus,
.groups-field select:focus{
  outline: none;
  border-color: rgba(141,195,55,.32);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(123,172,44,.08);
}

.groups-picker summary:hover{
  background: rgba(255,255,255,.045);
}

.groups-primary-btn:hover,
.groups-primary-btn:focus-visible,
.groups-message-link:hover,
.groups-message-link:focus-visible{
  background: #2f3230;
  border-color: rgba(155,215,60,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.groups-secondary-btn:hover,
.groups-inline-btn:hover{
  background: #2f3230;
  border-color: rgba(155,215,60,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.groups-secondary-btn:focus-visible,
.groups-inline-btn:focus-visible{
  outline: none;
  background: #2f3230;
  border-color: rgba(155,215,60,.46);
  box-shadow: 0 0 0 3px rgba(104,153,1,.18);
}

.groups-inline-btn.danger:hover,
.groups-inline-btn.danger:focus-visible{
  background: #2f3230;
  border-color: rgba(155,215,60,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="light"] .groups-hero-copy h1,
html[data-theme="light"] .groups-panel-title,
html[data-theme="light"] .groups-list-copy strong,
html[data-theme="light"] .groups-member-row-name{
  color: #1f221f;
}

html[data-theme="light"] .groups-hero-copy p,
html[data-theme="light"] .groups-list-snippet,
html[data-theme="light"] .groups-list-meta,
html[data-theme="light"] .groups-empty,
html[data-theme="light"] .groups-field > span{
  color: #747875;
}

html[data-theme="light"] .groups-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .groups-field input,
html[data-theme="light"] .groups-field select{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.14);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

html[data-theme="light"] .groups-picker,
html[data-theme="light"] .groups-list-card,
html[data-theme="light"] .groups-member-row{
  background: rgba(255,255,255,.66);
  border-color: rgba(159,163,160,.12);
}

html[data-theme="light"] .groups-list-card summary{
  background: #f8fbff;
  color: #1f221f;
}

html[data-theme="light"] .groups-list-copy strong,
html[data-theme="light"] .groups-list-snippet,
html[data-theme="light"] .groups-list-meta,
html[data-theme="light"] .groups-list-caret{
  color: #1f221f;
}

html[data-theme="light"] .groups-list-card[open] summary{
  border-bottom: 1px solid rgba(159,163,160,.2);
}

html[data-theme="light"] .groups-picker{
  background: #f8fbff;
  border-color: rgba(159,163,160,.22);
}

html[data-theme="light"] .groups-manage-body{
  border-top-color: rgba(159,163,160,.12);
  background: linear-gradient(180deg, rgba(245,249,246,.94), rgba(255,255,255,.9));
}

html[data-theme="light"] .groups-member-option{
  background: transparent;
}

html[data-theme="light"] .groups-picker summary,
html[data-theme="light"] .groups-member-name{
  color: #1f221f;
}

html[data-theme="light"] .groups-secondary-btn,
html[data-theme="light"] .groups-inline-btn,
html[data-theme="light"] .groups-message-link,
html[data-theme="light"] .groups-primary-btn{
  border-color: #161916;
  background: #161916;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="light"] .groups-inline-btn.danger{
  border-color: #161916;
  background: #161916;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="light"] .groups-field input:hover,
html[data-theme="light"] .groups-field select:hover,
html[data-theme="light"] .groups-list-card:hover,
html[data-theme="light"] .groups-secondary-btn:hover,
html[data-theme="light"] .groups-inline-btn:hover,
html[data-theme="light"] .groups-primary-btn:hover,
html[data-theme="light"] .groups-message-link:hover{
  background: #1b1e1b;
  border-color: #1b1e1b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

html[data-theme="light"] .groups-picker:hover{
  background: #f8fbff;
  border-color: rgba(159,163,160,.22);
  box-shadow: none;
}

html[data-theme="light"] .groups-field input:focus,
html[data-theme="light"] .groups-field select:focus,
html[data-theme="light"] .groups-secondary-btn:focus-visible,
html[data-theme="light"] .groups-inline-btn:focus-visible,
html[data-theme="light"] .groups-primary-btn:focus-visible,
html[data-theme="light"] .groups-message-link:focus-visible{
  background: #1b1e1b;
  border-color: #1b1e1b;
  box-shadow: 0 0 0 3px rgba(22,25,22,.18);
}

html[data-theme="light"] .groups-inline-btn.danger:hover,
html[data-theme="light"] .groups-inline-btn.danger:focus-visible{
  background: #1b1e1b;
  border-color: #1b1e1b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

@media (max-width: 980px){
  .groups-layout{
    grid-template-columns: 1fr;
  }

  .groups-create-panel{
    min-height: 0;
  }

  .groups-list-panel{
    min-height: 0;
  }
}

@media (max-width: 900px){
  .groups-hero{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .groups-back{
    align-self: flex-start;
  }

  .groups-member-row,
  .groups-manage-footer{
    flex-direction: column;
    align-items: stretch;
  }

  .groups-member-actions{
    align-items: stretch;
  }

  .groups-member-actions form,
  .groups-member-action-btn,
  .groups-footer-action-btn{
    width: 100%;
  }
}

@media (max-width: 640px){
  .groups-shell{
    padding: .65rem .72rem calc(var(--mobile-nav-height, 0px) + .9rem);
  }

  .groups-page{
    gap: .85rem;
  }

  .groups-hero-copy h1{
    font-size: 1.8rem;
  }

  .groups-panel{
    padding: 1rem .9rem .92rem;
    border-radius: 20px;
  }

  .groups-form{
    gap: .78rem;
  }

  .groups-list-card summary,
  .groups-manage-body{
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .groups-secondary-btn,
  .groups-inline-btn,
  .groups-message-link{
    width: 100%;
  }
}

.broadcasts-shell{
  padding: .85rem .9rem 1rem;
}

.broadcasts-page{
  display: grid;
  gap: 1.05rem;
  max-width: 1080px;
  margin: 0 auto;
}

.broadcasts-hero{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.broadcasts-hero-copy h1{
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.04;
  color: #f8fbff;
}

.broadcasts-hero-copy p{
  margin: .35rem 0 0;
  color: #8d908d;
  font-size: 1.02rem;
}

.broadcasts-layout{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.broadcasts-panel{
  border-radius: 22px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(20,23,21,.985), rgba(11,14,12,.995));
  padding: 1.1rem 1.1rem 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 18px 34px rgba(6,8,6,.14);
}

.broadcasts-compose-panel,
.broadcasts-create-panel{
  display: grid;
  align-content: start;
  min-height: 406px;
}

.broadcasts-groups-panel{
  display: grid;
  gap: .75rem;
}

.broadcasts-panel-head{
  margin-bottom: .72rem;
}

.broadcasts-panel-title{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #eaedea;
}

.broadcasts-panel-title strong{
  font-size: 1rem;
}

.broadcasts-panel-title .nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: #97d13c;
}

.broadcasts-form{
  display: grid;
  gap: .88rem;
  height: 100%;
}

.broadcasts-field{
  display: grid;
  gap: .48rem;
}

.broadcasts-field > span{
  color: #9fa3a0;
  font-weight: 600;
}

.broadcasts-field input,
.broadcasts-field select,
.broadcasts-field textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.035);
  color: #eaedea;
  padding: .78rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.broadcasts-field input,
.broadcasts-field select{
  min-height: 3rem;
}

.broadcasts-field textarea{
  min-height: 132px;
  resize: vertical;
}

.broadcasts-field input::placeholder,
.broadcasts-field textarea::placeholder{
  color: #8d908d;
}

.broadcasts-field input:hover,
.broadcasts-field select:hover,
.broadcasts-field textarea:hover,
.broadcasts-picker:hover,
.broadcasts-group-card:hover{
  border-color: rgba(141,195,55,.2);
}

.broadcasts-field input:focus,
.broadcasts-field select:focus,
.broadcasts-field textarea:focus{
  outline: none;
  border-color: rgba(141,195,55,.32);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(123,172,44,.08);
}

.broadcasts-picker{
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.02);
  overflow: hidden;
}

.broadcasts-picker summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .95rem 1rem;
  cursor: pointer;
  color: #d0d4d1;
  background: rgba(255,255,255,.03);
}

.broadcasts-picker summary::-webkit-details-marker{
  display: none;
}

.broadcasts-picker-label{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.broadcasts-picker-label .nav-icon-lucide,
.broadcasts-picker-caret{
  width: 18px;
  height: 18px;
  color: #8d908d;
}

.broadcasts-picker-caret{
  transition: transform .16s ease;
}

.broadcasts-picker[open] .broadcasts-picker-caret{
  transform: rotate(90deg);
}

.broadcasts-picker-body{
  padding: .5rem .75rem .7rem;
}

.broadcasts-picker-grid{
  display: grid;
  gap: .16rem;
  max-height: 230px;
  overflow-y: auto;
  padding-right: .2rem;
}

.broadcasts-picker-grid.manage{
  padding: .2rem;
  border-radius: 16px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.02);
  max-height: 260px;
}

.broadcasts-member-option{
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .68rem .38rem;
  border-radius: 12px;
  background: transparent;
  color: #eaedea;
  cursor: pointer;
  user-select: none;
  transition: background-color .18s ease;
}

.broadcasts-member-option.compact{
  padding-inline: .5rem;
}

.broadcasts-member-option:hover{
  background: rgba(255,255,255,.03);
}

.broadcasts-member-option input{
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1.5px solid #97d13c;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.broadcasts-member-option input:checked{
  background: #97d13c;
  box-shadow: inset 0 0 0 3px rgba(14,17,15,.92);
}

.broadcasts-member-avatar{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
  font-weight: 800;
  font-size: .86rem;
}

.broadcasts-member-copy{
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.broadcasts-member-copy strong{
  color: #eaedea;
  font-size: .95rem;
}

.broadcasts-member-copy span{
  color: #8d908d;
  font-size: .85rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.broadcasts-primary-btn,
.broadcasts-secondary-btn,
.broadcasts-inline-btn{
  min-height: 2.9rem;
  border-radius: 14px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 700;
  transition: background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.broadcasts-primary-btn{
  width: 100%;
  align-self: end;
  background: linear-gradient(180deg, #9cd939, #90c837);
  color: #0e110f;
  box-shadow: 0 14px 28px rgba(125,174,47,.22);
}

.broadcasts-secondary-btn,
.broadcasts-inline-btn{
  padding: 0 1rem;
  background: rgba(255,255,255,.055);
  color: #f8fbff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 0 1px rgba(59,89,2,.12);
}

.broadcasts-inline-btn.danger{
  color: #ff6b6b;
  background: rgba(239,68,68,.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 0 1px rgba(239,68,68,.12);
}

.broadcasts-primary-btn .nav-icon-lucide,
.broadcasts-secondary-btn .nav-icon-lucide,
.broadcasts-inline-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor !important;
}

.broadcasts-groups-list{
  display: grid;
  gap: .72rem;
}

.broadcasts-group-card{
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.12);
  background: rgba(255,255,255,.025);
  overflow: hidden;
}

.broadcasts-group-card summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1rem;
  cursor: pointer;
}

.broadcasts-group-card summary::-webkit-details-marker{
  display: none;
}

.broadcasts-group-main{
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
  flex: 1 1 auto;
}

.broadcasts-group-avatar{
  width: 2.95rem;
  height: 2.95rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #93cb3a, #89bf31);
  color: #0e110f;
  font-weight: 800;
}

.broadcasts-group-copy{
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.broadcasts-group-copy strong{
  color: #eaedea;
  font-size: 1rem;
}

.broadcasts-group-members,
.broadcasts-group-meta,
.broadcasts-empty{
  color: #8d908d;
}

.broadcasts-group-members{
  font-size: .94rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcasts-group-meta{
  font-size: .9rem;
}

.broadcasts-group-actions{
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.broadcasts-group-actions form{
  margin: 0;
}

.broadcasts-manage-body{
  display: grid;
  gap: .9rem;
  padding: .15rem 1rem 1rem;
  border-top: 1px solid rgba(59,89,2,.1);
  background: linear-gradient(180deg, rgba(14,17,15,.28), rgba(9,11,9,.14));
}

.broadcasts-manage-form{
  display: grid;
  gap: .85rem;
}

.broadcasts-primary-btn:hover,
.broadcasts-primary-btn:focus-visible{
  background: linear-gradient(180deg, #a1de3f, #95cf39);
  box-shadow: 0 16px 30px rgba(125,174,47,.24);
}

.broadcasts-secondary-btn:hover,
.broadcasts-secondary-btn:focus-visible,
.broadcasts-inline-btn:hover,
.broadcasts-inline-btn:focus-visible{
  background: rgba(151,211,55,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 0 1px rgba(151,211,55,.16);
}

.broadcasts-inline-btn.danger:hover,
.broadcasts-inline-btn.danger:focus-visible{
  background: rgba(239,68,68,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 0 1px rgba(239,68,68,.16);
}

html[data-theme="light"] .broadcasts-hero-copy h1,
html[data-theme="light"] .broadcasts-panel-title,
html[data-theme="light"] .broadcasts-member-copy strong,
html[data-theme="light"] .broadcasts-group-copy strong{
  color: #1f221f;
}

html[data-theme="light"] .broadcasts-hero-copy p,
html[data-theme="light"] .broadcasts-field > span,
html[data-theme="light"] .broadcasts-member-copy span,
html[data-theme="light"] .broadcasts-group-members,
html[data-theme="light"] .broadcasts-group-meta,
html[data-theme="light"] .broadcasts-empty{
  color: #747875;
}

html[data-theme="light"] .broadcasts-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .broadcasts-field input,
html[data-theme="light"] .broadcasts-field select,
html[data-theme="light"] .broadcasts-field textarea{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.14);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

html[data-theme="light"] .broadcasts-picker,
html[data-theme="light"] .broadcasts-picker-grid.manage,
html[data-theme="light"] .broadcasts-group-card{
  background: rgba(255,255,255,.66);
  border-color: rgba(159,163,160,.12);
}

html[data-theme="light"] .broadcasts-picker summary{
  color: #1f221f;
}

html[data-theme="light"] .broadcasts-manage-body{
  border-top-color: rgba(159,163,160,.12);
  background: linear-gradient(180deg, rgba(243,247,243,.7), rgba(255,255,255,.32));
}

html[data-theme="light"] .broadcasts-secondary-btn,
html[data-theme="light"] .broadcasts-inline-btn{
  background: rgba(255,255,255,.94);
  color: #1f221f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

html[data-theme="light"] .broadcasts-inline-btn.danger{
  background: rgba(254,226,226,.86);
  color: #b91c1c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 0 0 1px rgba(239,68,68,.12);
}

html[data-theme="light"] .broadcasts-field input:hover,
html[data-theme="light"] .broadcasts-field select:hover,
html[data-theme="light"] .broadcasts-field textarea:hover,
html[data-theme="light"] .broadcasts-picker:hover,
html[data-theme="light"] .broadcasts-group-card:hover,
html[data-theme="light"] .broadcasts-secondary-btn:hover,
html[data-theme="light"] .broadcasts-inline-btn:hover{
  background: rgba(245,249,245,.96);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 0 0 1px rgba(141,195,55,.16);
}

@media (max-width: 980px){
  .broadcasts-layout{
    grid-template-columns: 1fr;
  }

  .broadcasts-compose-panel,
  .broadcasts-create-panel{
    min-height: 0;
  }
}

@media (max-width: 900px){
  .broadcasts-hero{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .broadcasts-back{
    align-self: flex-start;
  }

  .broadcasts-group-card summary{
    flex-direction: column;
    align-items: stretch;
  }

  .broadcasts-group-actions{
    justify-content: flex-start;
  }
}

@media (max-width: 640px){
  .broadcasts-shell{
    padding: .65rem .72rem calc(var(--mobile-nav-height, 0px) + .9rem);
  }

  .broadcasts-page{
    gap: .85rem;
  }

  .broadcasts-hero-copy h1{
    font-size: 1.8rem;
  }

  .broadcasts-panel{
    padding: 1rem .9rem .92rem;
    border-radius: 20px;
  }

  .broadcasts-group-card summary,
  .broadcasts-manage-body{
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .broadcasts-secondary-btn,
  .broadcasts-inline-btn{
    width: 100%;
  }

  .broadcasts-group-members{
    white-space: normal;
  }
}

html[data-theme="dark"] .message-thread{
  background: rgba(18,20,18,.92);
  border-color: rgba(111,155,41,0.14);
  box-shadow: 0 10px 24px rgba(8,10,8,0.45);
}

html[data-theme="dark"] .message-bubble{
  background: rgba(27,29,27,.92);
  color: #f0f4f8;
  box-shadow: 0 8px 20px rgba(8,10,8,0.4);
}

html[data-theme="dark"] .message-row.self .message-bubble{
  background: rgba(104,153,1,.2);
}

html[data-theme="dark"] .message-status{
  color: rgba(229,233,229,.7);
}

html[data-theme="dark"] .message-status.read{
  color: #83b532;
}

.message-list-actions form{
  margin: 0;
}

.messages-panel{
  display: grid;
  gap: 1rem;
}

.message-thread{
  max-height: 520px;
  overflow: auto;
  overflow-x: hidden;
}

.message-composer{
  margin-top: .75rem;
  display: grid;
  gap: .5rem;
}

.message-actions{
  display: flex;
  gap: .4rem;
  margin-top: .4rem;
  flex-wrap: wrap;
}

@media (max-width: 900px){
  .messages-layout{
    grid-template-columns: 1fr;
  }
  .messages-sidebar{
    position: static;
  }
}

.message-thread{
  display: grid;
  gap: .6rem;
}

.message-row{
  display: flex;
}

.message-row.self{
  justify-content: flex-end;
}

.message-bubble{
  max-width: 520px;
  background: var(--soft);
  border-radius: 14px;
  padding: .65rem .85rem;
}

.message-row.self .message-bubble{
  background: rgba(80,118,1,.15);
}

.coach-remove{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.client-list{
  display: grid;
  gap: .9rem;
}

.client-card{
  padding: 1rem 1.1rem;
}

.group-manage > summary{
  list-style: none;
}

.group-manage > summary::-webkit-details-marker{
  display: none;
}

.group-manage .group-caret{
  display: inline-flex;
  transition: transform .2s ease;
}

.group-manage[open] .group-caret{
  transform: rotate(180deg);
}

.library-collapsible > summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  cursor: pointer;
  list-style: none;
  margin-top: .5rem;
}

.library-collapsible > summary::-webkit-details-marker{
  display: none;
}

.library-collapsible > summary::marker{
  content: "";
}

.library-caret-btn{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.library-caret-btn::before{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
  margin-top: -2px;
}

.library-collapsible[open] .library-caret-btn{
  transform: rotate(180deg);
}

html:not([data-theme="dark"]) .library-caret-btn{
  border-color: rgba(25,28,26,.2);
}

.library-collapsible-body{
  margin-top: .75rem;
}

.library-action-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: .48rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--button-bg);
  color: var(--button-fg);
  box-shadow: none;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
}

.coach-library-page .library-action-link{
  min-height: 2.3rem;
  padding: .48rem 1.05rem;
}

html[data-theme="dark"] .coach-library-page .library-action-link{
  color: #e7eceb !important;
  border-color: rgba(197,201,197,.42);
  background: rgba(28,31,29,.45);
}

html[data-theme="dark"] .library-action-link{
  color: #e7eceb !important;
}

.library-action-link:hover{
  text-decoration: none;
  border-color: rgba(169,173,170,.75);
  background: rgba(255, 255, 255, .06);
}

html:not([data-theme="dark"]) .coach-library-page .library-action-link{
  color: var(--button-fg) !important;
  background: var(--button-bg) !important;
  border-color: var(--line) !important;
}

.coach-library-page .library-action-link:active,
.coach-library-page .library-action-link:focus,
.coach-library-page .library-action-link:focus-visible{
  outline: none;
  text-decoration: none;
  border-color: rgba(132,184,47,.78);
  box-shadow: none;
}
.needs-attention-flex{
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.needs-attention-flex > .needs-attention-item{
  flex: 1 1 0;
  min-width: 260px;
  height: fit-content;
}

@media (max-width: 900px){
  .needs-attention-flex{
    flex-direction: column;
  }
}

html:not([data-theme="dark"]) .sheet-panel,
html:not([data-theme="dark"]) .sheet-panel .sheet-item{
  color: var(--ink);
}

.client-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.client-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  align-items: center;
}

.client-more{
  margin-left: auto;
}

.admin-meta-line{
  font-size: .85rem;
}

.admin-meta-line--gap{
  margin-top: .25rem;
}

.tab-row{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.admin-approvals-food-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.admin-reject-reason{
  margin-bottom: .35rem;
}

.client-more summary,
.client-more-actions summary{
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.client-more summary::-webkit-details-marker,
.client-more-actions summary::-webkit-details-marker{
  display: none;
}

.client-more summary::after,
.client-more-actions summary::after{
  content: "+";
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  opacity: .8;
}

.client-more[open] summary::after,
.client-more-actions[open] summary::after{
  content: "-";
}

.client-more-body{
  margin-top: .5rem;
  display: grid;
  gap: .5rem;
}


.branding-logo-thumb{
  max-width: 140px;
  height: auto;
}

.coach-chip{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .5rem .75rem;
  box-shadow: var(--shadow-soft);
  text-align: right;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.coach-trend{
  background: var(--soft);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: .5rem 0 .25rem;
}

.coach-trend-bar{
  height: 100%;
  width: var(--bar);
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.grid2{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.grid2 > .card{
  height: 100%;
}

.dashboard-cards{
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.dashboard-cards .card{
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #ffffff 0%, #f3f7f4 55%, #f3f7f3 100%);
  border: 1px solid rgba(86,127,0,.12);
  box-shadow: 0 18px 34px rgba(22,25,22,.08);
  position: relative;
  overflow: hidden;
}

.dashboard-cards .card::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 120px at 12% 8%, rgba(123,172,44,.18), transparent 70%),
              radial-gradient(160px 160px at 85% 0%, rgba(128,178,46,.12), transparent 70%);
  pointer-events: none;
}

.dashboard-cards .card > .pill-link{
  margin-top: auto;
  align-self: flex-start;
}

.history-detail{
  scroll-margin-top: 90px;
}

.card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.card-head .pill-link{
  margin-left: auto;
  white-space: nowrap;
}

.settings-section{
  border: 1px solid rgba(73,109,2,.14);
  border-radius: 18px;
  background: var(--card);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  box-shadow: none;
  color: #eaedea;
}

.settings-section summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-weight: 700;
  color: #eaedea;
  outline: none;
  box-shadow: none;
  background: transparent;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-appearance: none;
  appearance: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.settings-section summary:focus,
.settings-section summary:focus-visible,
.settings-section summary:active{
  outline: none;
  box-shadow: none;
  background: transparent;
}

.settings-section > summary,
.settings-section[open] > summary{
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.settings-section summary::-webkit-details-marker{
  display: none;
}

.settings-section summary::marker{
  content: "";
}

.settings-section summary::after{
  content: "?";
  font-weight: 700;
  color: #9da09d;
  transition: transform .18s ease, color .18s ease;
}

.settings-section[open] summary::after{
  transform: rotate(180deg);
}

.settings-summary{
  min-height: 2.9rem;
}

.settings-summary-head{
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}

.settings-summary-icon{
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(131,181,50,.14);
  background: linear-gradient(180deg, rgba(22,25,22,.7), rgba(13,15,13,.85));
  color: #b0b4b1;
}

.settings-summary-icon .nav-icon-lucide{
  color: inherit !important;
  stroke: currentColor !important;
}

.settings-summary-label{
  font-size: 1rem;
  line-height: 1.2;
}

.settings-summary-copy{
  min-width: 0;
  display: grid;
  gap: .18rem;
}

.settings-summary-copy .muted{
  color: #9ca09d;
}

.settings-section .settings-body{
  margin-top: .85rem;
  padding: 1rem;
  border-top: 1px solid rgba(159,163,160,.12);
  border-radius: 16px;
  color: #dee2df;
}

.settings-section .muted{
  color: #9fa3a0;
}

.settings-section label{
  color: #e4e7e4;
}

.settings-section input,
.settings-section select,
.settings-section textarea{
  background: rgba(8,10,8,.9);
  color: #f0f4f0;
  border: 1px solid rgba(86,127,0,.18);
}

.settings-section input::placeholder,
.settings-section textarea::placeholder{
  color: #848885;
}

.settings-section input:focus,
.settings-section select:focus,
.settings-section textarea:focus{
  border-color: rgba(104,153,1,.42);
  box-shadow: 0 0 0 3px rgba(86,127,0,.16);
}

.settings-section button,
.settings-section a[role="button"]{
  border-radius: 12px;
}

.settings-section button,
.settings-section a[role="button"],
.settings-section .pill-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .62rem;
}

.settings-section button .nav-icon-lucide,
.settings-section a[role="button"] .nav-icon-lucide,
.settings-section .pill-link .nav-icon-lucide{
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: currentColor !important;
}

.settings-section button:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):not(.booking-link-toggle):not(.booking-link-icon-btn),
.settings-section a[role="button"]:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn),
.settings-section .pill-link:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn){
  border: 1px solid rgba(159,163,160,.22) !important;
  background: linear-gradient(180deg, rgba(50,53,50,.98), rgba(29,32,29,.98)) !important;
  color: #f8fafc !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 24px rgba(6,8,6,.18) !important;
}

.settings-section button:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):hover,
.settings-section button:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):focus,
.settings-section button:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):focus-visible,
.settings-section button:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):active,
.settings-section a[role="button"]:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):hover,
.settings-section a[role="button"]:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):focus,
.settings-section a[role="button"]:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):focus-visible,
.settings-section a[role="button"]:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):active,
.settings-section .pill-link:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):hover,
.settings-section .pill-link:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):focus,
.settings-section .pill-link:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):focus-visible,
.settings-section .pill-link:not(.secondary):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.settings-save-btn):active{
  border-color: rgba(229,233,229,.24) !important;
  background: linear-gradient(180deg, rgba(64,67,65,.99), rgba(37,40,37,.99)) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 12px 28px rgba(6,8,6,.22) !important;
}

.settings-section .secondary{
  background: rgba(255,255,255,.04);
  color: #e3e7e4;
  border-color: rgba(159,163,160,.2);
}

.settings-delete-account-btn{
  border-color: rgba(248,113,113,.36) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.settings-disconnect-btn{
  border-color: rgba(248,113,113,.28) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.settings-disconnect-btn:hover,
.settings-disconnect-btn:focus-visible{
  border-color: rgba(248,113,113,.42) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1)) !important;
}

.settings-delete-account-btn:hover,
.settings-delete-account-btn:focus-visible{
  border-color: rgba(248,113,113,.5) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13)) !important;
}

.settings-save-btn{
  border: 1px solid rgba(20,83,45,.72) !important;
  color: #dcfce7 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.24), rgba(21,128,61,.14)) !important;
  box-shadow: none !important;
}

.settings-save-btn:hover,
.settings-save-btn:focus-visible{
  border-color: rgba(22,163,74,.72) !important;
  color: #f0fdf4 !important;
  background: linear-gradient(180deg, rgba(22,163,74,.3), rgba(21,128,61,.18)) !important;
  box-shadow: none !important;
}

.settings-section .banner{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.16);
}

.settings-feature-lock-card{
  display: grid;
  gap: .9rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(104,153,1,.16);
  background: linear-gradient(180deg, rgba(19,21,19,.92), rgba(13,15,13,.96));
}

.settings-feature-lock-head{
  display: grid;
  gap: .45rem;
}

.settings-feature-lock-badge{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: max-content;
  padding: .36rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(141,195,55,.24);
  background: rgba(151,211,55,.12);
  color: #e8ece8;
  font-size: .78rem;
  font-weight: 700;
}

.settings-upgrade-lock-btn,
.settings-upgrade-lock-cta{
  align-self: flex-start;
}

.settings-feature-lock-dialog{
  display: grid;
  gap: .65rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.16);
  background: rgba(255,255,255,.035);
}

.settings-delete-disclosure summary{
  list-style: none;
}

.settings-delete-disclosure summary::-webkit-details-marker{
  display: none;
}

.settings-delete-disclosure-summary{
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.settings-delete-disclosure-summary::after{
  content: none !important;
  display: none !important;
}

.settings-delete-disclosure[open] .settings-delete-disclosure-summary::after{
  content: none !important;
  display: none !important;
}

html[data-theme="light"] .settings-section{
  border: 1px solid rgba(159,163,160,.18);
  background: var(--card);
  box-shadow: none;
  color: #161916;
}

html[data-theme="light"] .settings-section summary{
  color: #161916;
}

html[data-theme="light"] .settings-section summary::after{
  color: #707471;
}

html[data-theme="light"] .settings-summary-icon{
  border-color: #161916;
  background: #161916;
  color: #ffffff;
}

html[data-theme="light"] .settings-summary-icon .nav-icon-lucide{
  color: inherit !important;
  stroke: currentColor !important;
}

.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  color: #e5e9e5 !important;
  border-color: rgba(159,163,160,.18) !important;
  background: rgba(22,25,22,.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 8px 18px rgba(6,8,6,.14) !important;
}

.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: inherit !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  color: #ffffff !important;
  border-color: rgba(131,181,50,.14) !important;
  background: linear-gradient(180deg, rgba(22,25,22,.7), rgba(13,15,13,.85)) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .settings-summary-copy .muted,
html[data-theme="light"] .settings-section .muted{
  color: #707471;
}

html[data-theme="light"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  color: #ffffff !important;
  border-color: #161916 !important;
  background: #161916 !important;
  box-shadow: none !important;
}

/* Dark mode (explicit or default): settings section icons sit flush with the
   row — no chip background or border. */
html:not([data-theme="light"]) .settings-summary-icon,
html:not([data-theme="light"]) .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="light"] .settings-section .settings-body{
  border-top-color: rgba(159,163,160,.18);
  color: #3e413e;
}

html[data-theme="light"] .settings-section label,
html[data-theme="light"] .settings-summary-label{
  color: #161916;
}

html[data-theme="light"] .settings-section input,
html[data-theme="light"] .settings-section select,
html[data-theme="light"] .settings-section textarea{
  background: rgba(255,255,255,.98);
  color: #161916;
  border: 1px solid rgba(159,163,160,.22);
}

html[data-theme="light"] .settings-section input::placeholder,
html[data-theme="light"] .settings-section textarea::placeholder{
  color: #9fa3a0;
}

html[data-theme="light"] .settings-section input:focus,
html[data-theme="light"] .settings-section select:focus,
html[data-theme="light"] .settings-section textarea:focus{
  border-color: rgba(123,172,44,.38);
  box-shadow: 0 0 0 3px rgba(151,211,55,.14);
}

html[data-theme="light"] .settings-section .secondary{
  background: rgba(241,245,249,.9);
  color: #3e413e;
  border-color: rgba(159,163,160,.22);
}

html[data-theme="light"] .settings-delete-account-btn{
  background: linear-gradient(135deg, rgba(254,226,226,.96), rgba(254,242,242,.94)) !important;
  color: #b91c1c !important;
  border-color: rgba(248,113,113,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.86),
    0 10px 22px rgba(239,68,68,.08) !important;
}

html[data-theme="light"] .settings-disconnect-btn{
  background: linear-gradient(135deg, rgba(254,242,242,.96), rgba(255,255,255,.94)) !important;
  color: #b91c1c !important;
  border-color: rgba(248,113,113,.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 10px 22px rgba(239,68,68,.05) !important;
}

html[data-theme="light"] .settings-disconnect-btn:hover,
html[data-theme="light"] .settings-disconnect-btn:focus-visible{
  background: linear-gradient(135deg, rgba(254,226,226,.98), rgba(254,242,242,.96)) !important;
  color: #991b1b !important;
  border-color: rgba(239,68,68,.3) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 14px 26px rgba(239,68,68,.09) !important;
}

html[data-theme="light"] .settings-delete-account-btn:hover,
html[data-theme="light"] .settings-delete-account-btn:focus-visible{
  background: linear-gradient(135deg, rgba(254,202,202,.98), rgba(254,226,226,.96)) !important;
  color: #991b1b !important;
  border-color: rgba(239,68,68,.34) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 14px 26px rgba(239,68,68,.12) !important;
}

html:not([data-theme="dark"]) .subtle-danger-btn{
  border-color: rgba(239,68,68,.24) !important;
  color: #b91c1c !important;
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08) !important;
}

html:not([data-theme="dark"]) .subtle-danger-btn:hover,
html:not([data-theme="dark"]) .subtle-danger-btn:focus-visible{
  border-color: rgba(239,68,68,.32) !important;
  color: #991b1b !important;
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94)) !important;
}

html:not([data-theme="dark"]) .subtle-danger-icon-btn{
  border-color: rgba(239,68,68,.24) !important;
  color: #b91c1c !important;
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08) !important;
}

html:not([data-theme="dark"]) .subtle-danger-icon-btn:hover,
html:not([data-theme="dark"]) .subtle-danger-icon-btn:focus-visible{
  border-color: rgba(239,68,68,.32) !important;
  color: #991b1b !important;
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94)) !important;
}

html:not([data-theme="dark"]) .subtle-save-btn{
  border-color: rgba(21,128,61,.42) !important;
  color: #166534 !important;
  background: linear-gradient(180deg, rgba(220,252,231,.98), rgba(240,253,244,.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(34,197,94,.06) !important;
}

html:not([data-theme="dark"]) .subtle-save-btn:hover,
html:not([data-theme="dark"]) .subtle-save-btn:focus-visible{
  border-color: rgba(22,163,74,.54) !important;
  color: #14532d !important;
  background: linear-gradient(180deg, rgba(187,247,208,.98), rgba(220,252,231,.96)) !important;
}

html[data-theme="light"] .settings-save-btn{
  background: #161916 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(22,25,22,.85) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .settings-save-btn:hover,
html[data-theme="light"] .settings-save-btn:focus-visible{
  background: #272a27 !important;
  color: #ffffff !important;
  border-color: rgba(39,42,39,.7) !important;
  box-shadow: none !important;
}

html[data-theme="light"] #clear-local-cache-btn{
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  color: #0e110f !important;
  border-color: rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18) !important;
}

html[data-theme="light"] #clear-local-cache-btn:hover,
html[data-theme="light"] #clear-local-cache-btn:focus-visible{
  background: linear-gradient(135deg, #aaeb42, #97d337) !important;
  color: #0e110f !important;
  border-color: rgba(185,253,82,.3) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 16px 30px rgba(104,146,36,.22) !important;
}

html[data-theme="light"] .settings-section .banner{
  background: rgba(248,250,252,.96);
  border-color: rgba(159,163,160,.2);
}

html[data-theme="light"] .settings-feature-lock-card{
  border-color: rgba(119,166,43,.22);
  background: linear-gradient(180deg, rgba(247,250,255,.98), rgba(242,246,243,.96));
}

html[data-theme="light"] .settings-feature-lock-badge{
  border-color: rgba(141,195,55,.2);
  background: rgba(151,211,55,.1);
  color: #364d10;
}

html[data-theme="light"] .settings-feature-lock-dialog{
  background: #f7faff;
  border-color: #dde1dd;
}

.coach-payment-settings-form{
  display: grid;
  gap: 1rem;
}

.coach-payment-settings-card{
  display: grid;
  gap: .95rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(104,153,1,.16);
  background: var(--soft);
  box-shadow: none;
}

.coach-payment-settings-card-head{
  display: grid;
  gap: .35rem;
}

.coach-payment-settings-card-head strong{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #eaedea;
}

.coach-payment-settings-grid{
  gap: .9rem;
}

.coach-payment-link-list{
  display: grid;
  gap: .85rem;
}

.coach-payment-link-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: end;
  padding: .9rem;
  border-radius: 16px;
  border: 1px dashed rgba(159,163,160,.18);
  background: rgba(255,255,255,.02);
}

.coach-payment-link-row > *{
  min-width: 0;
}

.coach-payment-link-field{
  display: grid;
  gap: .45rem;
  min-width: 0;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.coach-payment-link-row input{
  width: 100%;
  min-width: 0;
}

.coach-payment-link-add,
.coach-payment-link-remove{
  min-height: 2.7rem;
}

.coach-payment-link-add{
  width: 100%;
  justify-content: center;
}

.coach-payment-link-remove{
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  min-width: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9fa3a0;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(248,113,113,.28);
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07));
  color: #fecaca;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 20px rgba(127,29,29,.12);
}

.coach-payment-link-remove .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.coach-payment-link-remove:hover,
.coach-payment-link-remove:focus-visible{
  color: #fee2e2;
  border-color: rgba(248,113,113,.42);
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 12px 22px rgba(127,29,29,.16);
}

.coach-payment-link-remove[aria-disabled="true"]{
  opacity: .38;
  cursor: default;
  pointer-events: none;
}

.coach-payment-link-remove:focus-visible{
  outline: 2px solid rgba(248,113,113,.28);
  outline-offset: 2px;
}

html[data-theme="light"] .coach-payment-settings-card{
  border-color: rgba(159,163,160,.18);
  background: var(--soft);
  box-shadow: none;
}

html[data-theme="light"] .coach-payment-settings-card-head strong{
  color: #161916;
}

html[data-theme="light"] .coach-payment-link-row{
  border-color: rgba(159,163,160,.2);
  background: #f8fafc;
}

html[data-theme="light"] .coach-payment-link-add,
html[data-theme="light"] .coach-payment-link-remove{
  background: #ffffff;
}

html[data-theme="light"] .coach-payment-link-remove{
  border-color: rgba(239,68,68,.24);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94));
  color: #b91c1c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08);
}

html[data-theme="light"] .coach-payment-link-remove:hover,
html[data-theme="light"] .coach-payment-link-remove:focus-visible{
  border-color: rgba(239,68,68,.32);
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94));
  color: #991b1b;
}

html[data-theme="dark"] .coach-payment-link-add,
html[data-theme="dark"] .coach-payment-link-remove{
  background: rgba(255,255,255,.04);
}

html[data-theme="dark"] .coach-payment-link-remove{
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07));
  border-color: rgba(248,113,113,.28);
  color: #fecaca;
}

.plan-io{
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan-tools{
  display: grid;
  gap: .6rem;
  width: min(520px, 100%);
  max-width: 100%;
  margin-left: auto;
}

.plan-tool-card{
  min-width: 220px;
  padding: .7rem .95rem;
}

.plan-head{
  display: flex;
}

.plan-head-actions{
  margin-left: auto;
}

.plan-page{
  display: grid;
  gap: .95rem;
}

/* ── Training activity heatmap ────────────────────────────────
   Two sequential ramps on one hue, because the card is near-white in light
   mode and near-black in dark: a single ramp would read backwards in one of
   them, with a quiet day darker than a heavy one. Each was checked against its
   own surface for monotonic lightness, visible gaps between steps, a single
   hue, and a light end that clears the surface — so the steps are written out
   rather than recomputed from the accent. */
.progress-heatmap{
  --heat-empty:color-mix(in srgb, var(--muted) 16%, transparent);
  --heat-1:#aff144;
  --heat-2:#8cc235;
  --heat-3:#5c8705;
  --heat-4:#324c00;
  display:grid;
  gap:.6rem;
}
/* On the dark surface more activity is brighter, ending in the brand lime. */
html[data-theme="dark"] .progress-heatmap{
  --heat-empty:rgba(159,163,160,.16);
  --heat-1:#3E5A14;
  --heat-2:#5E8A1A;
  --heat-3:#86C22A;
  --heat-4:#B5F542;
}
.progress-heatmap-stats{
  margin-bottom:.25rem;
}
.progress-heatmap-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:.25rem;
  /* The year is wider than a phone, so it scrolls; keep the focus ring usable. */
  scrollbar-width:thin;
}
.progress-heatmap-grid{
  border-collapse:separate;
  border-spacing:3px;
  table-layout:fixed;
  width:auto;
  margin:0;
}
.progress-heatmap-labelcol{ width:30px; }
.progress-heatmap-weekcol{ width:12px; }
.progress-heatmap-cell{
  display:block;
  width:12px;
  height:12px;
  padding:0;
  border-radius:3px;
  background:var(--heat-empty);
}
.heatmap-cell-slot{ height:12px; padding:0; }
.progress-heatmap-cell[href]{ cursor:pointer; }
.progress-heatmap-cell[href]:focus-visible{
  outline:2px solid var(--progress-chart-line, #6ea103);
  outline-offset:1px;
}
.progress-heatmap-cell[data-level="1"]{ background:var(--heat-1); }
.progress-heatmap-cell[data-level="2"]{ background:var(--heat-2); }
.progress-heatmap-cell[data-level="3"]{ background:var(--heat-3); }
.progress-heatmap-cell[data-level="4"]{ background:var(--heat-4); }
.progress-heatmap-cell.is-future{ background:transparent; }
.progress-heatmap-cell.is-today{
  outline:1px solid var(--progress-chart-line, #6ea103);
  outline-offset:1px;
}
.progress-heatmap-weekday,
.progress-heatmap-month{
  padding:0 .35rem 0 0;
  font-size:10px;
  font-weight:600;
  color:var(--muted);
  text-align:left;
  white-space:nowrap;
}
.progress-heatmap-month{
  padding:0 0 .2rem;
  height:14px;
}
.progress-heatmap-legend{
  display:flex;
  align-items:center;
  gap:3px;
  font-size:.75rem;
}
.progress-heatmap-legend .muted{
  margin:0 .35rem;
  font-size:.75rem;
}
/* Outside the table the cells have no column to take their width from. */
.progress-heatmap-legend .progress-heatmap-cell{
  display:inline-block;
  width:12px;
  height:12px;
}

/* Dashboard activity and body-weight cards share the progress visual language. */
body.user-dashboard-page :is(.dashboard-grid > *, .dashboard-main-stack, .dashboard-chart-card, .dashboard-chart-shell){
  min-width:0;
}
body.user-dashboard-page .mini-chart-dots.is-year .mini-chart-dot{
  flex:1 1 0;
  width:auto;
  min-width:2px;
}
.dashboard-activity-shell,
.dashboard-mobile-activity{
  --heat-empty:color-mix(in srgb, var(--muted) 16%, transparent);
  --heat-1:#aff144;
  --heat-2:#8cc235;
  --heat-3:#5c8705;
  --heat-4:#324c00;
}
html[data-theme="dark"] :is(.dashboard-activity-shell, .dashboard-mobile-activity){
  --heat-empty:rgba(159,163,160,.16);
  --heat-1:#3E5A14;
  --heat-2:#5E8A1A;
  --heat-3:#86C22A;
  --heat-4:#B5F542;
}
.dashboard-streak{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  color:var(--muted);
  font-size:.78rem;
  font-weight:600;
  white-space:nowrap;
}
.dashboard-streak .nav-icon-lucide{ width:1rem; height:1rem; color:#f59e0b; }
.dashboard-activity-heatmap{ display:flex; align-items:stretch; gap:.45rem; min-width:0; }
/* Space held while the heatmap is still empty (it is drawn after load), the
   height its grid will take, so the cards below don't jump when it fills. */
/* Space held while the heatmap is still empty (it is drawn after load): about
   the height it arrives at, so the cards below don't jump. The calendars scale
   with the card's width, so a phone and a desktop differ; a month grows a row
   a week, so it holds a typical three. */
.dashboard-activity-heatmap.is-week:empty{ min-height:64px; }
.dashboard-activity-heatmap.is-month:empty{ min-height:157px; }
.dashboard-activity-heatmap.is-year:empty{ min-height:144px; }
@media (min-width:821px){
  .dashboard-activity-heatmap.is-week:empty{ min-height:93px; }
  .dashboard-activity-heatmap.is-month:empty{ min-height:200px; }
}
.dashboard-heatmap-grid{
  display:grid;
  grid-template-columns:repeat(var(--heatmap-columns, 7), minmax(12px, 1fr));
  gap:.35rem;
  width:100%;
}
.dashboard-activity-heatmap.is-calendar .dashboard-heatmap-grid{
  grid-template-columns:repeat(var(--heatmap-columns), 22px);
  grid-template-rows:repeat(7, 22px);
  grid-auto-flow:column;
  grid-auto-columns:22px;
  width:max-content;
}
.dashboard-activity-heatmap.is-month .dashboard-heatmap-grid{
  grid-template-columns:repeat(var(--heatmap-columns), minmax(22px, 1fr));
  grid-auto-columns:minmax(22px, 1fr);
  width:100%;
}
.dashboard-activity-heatmap.is-year{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  padding-bottom:.25rem;
  scrollbar-width:thin;
}
@media (min-width:821px){
  .dashboard-activity-heatmap:not(.is-calendar) .dashboard-heatmap-cell{
    width:44px;
    height:44px;
  }
}
.dashboard-activity-heatmap.is-year .dashboard-heatmap-grid{
  grid-template-columns:repeat(var(--heatmap-columns), 11px);
  grid-template-rows:repeat(7, 11px);
  grid-auto-columns:11px;
  gap:3px;
}
.dashboard-heatmap-item{ display:grid; justify-items:center; gap:.3rem; min-width:0; }
.dashboard-heatmap-cell{
  display:block;
  width:28px;
  height:28px;
  border-radius:3px;
  background:var(--heat-empty);
  cursor:pointer;
}
.dashboard-heatmap-cell:not([href]){ cursor:default; opacity:.7; }
.dashboard-heatmap-cell[href]:focus-visible{
  outline:2px solid var(--progress-chart-line, #6ea103);
  outline-offset:2px;
}
.dashboard-activity-heatmap.is-calendar .dashboard-heatmap-cell{ width:22px; height:22px; }
.dashboard-activity-heatmap.is-year .dashboard-heatmap-cell{ width:11px; height:11px; }
.dashboard-heatmap-cell.is-outside-period{ opacity:.42; }
.dashboard-heatmap-cell[data-level="1"], .dashboard-heatmap-legend i[data-level="1"]{ background:var(--heat-1); }
.dashboard-heatmap-cell[data-level="2"], .dashboard-heatmap-legend i[data-level="2"]{ background:var(--heat-2); }
.dashboard-heatmap-cell[data-level="3"], .dashboard-heatmap-legend i[data-level="3"]{ background:var(--heat-3); }
.dashboard-heatmap-cell[data-level="4"], .dashboard-heatmap-legend i[data-level="4"]{ background:var(--heat-4); }
.dashboard-heatmap-date-label{ color:var(--muted); font-size:.66rem; text-align:center; }
.dashboard-heatmap-day-labels{ display:grid; grid-template-rows:repeat(7, 22px); gap:.35rem; flex:0 0 24px; }
.dashboard-heatmap-day-labels span{ color:var(--muted); font-size:.6rem; line-height:22px; }
.dashboard-activity-heatmap.is-year .dashboard-heatmap-day-labels{ grid-template-rows:repeat(7, 11px); gap:3px; position:sticky; left:0; z-index:1; background:var(--card); }
.dashboard-activity-heatmap.is-year .dashboard-heatmap-day-labels span{ line-height:11px; }
.dashboard-heatmap-legend{ display:flex; justify-content:flex-end; align-items:center; gap:4px; color:var(--muted); font-size:.66rem; }
.dashboard-heatmap-legend i{ display:block; width:10px; height:10px; border-radius:3px; background:var(--heat-empty); }
.dashboard-heatmap-legend span:first-child{ margin-right:.2rem; }
.dashboard-heatmap-legend span:last-child{ margin-left:.2rem; }
.dashboard-weight-actions{ display:flex; align-items:center; gap:.4rem; }
.dashboard-weight-actions .pill-link{ min-height:36px; padding:.42rem .65rem; }
.dashboard-weight-card [hidden]{ display:none !important; }
.dashboard-weight-summary{ display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin:.3rem 0 .75rem; }
.dashboard-weight-summary > div{ display:grid; gap:.15rem; }
.dashboard-weight-summary > div > strong{ font-size:1.8rem; line-height:1; }
.dashboard-weight-summary small{ color:var(--muted); font-size:.5em; }
.dashboard-weight-summary > div > span{ color:var(--muted); font-size:.75rem; }
.dashboard-weight-chart{ min-height:150px; border-radius:8px; background:transparent; padding:.25rem 0 0; }
.dashboard-weight-all{ display:flex; align-items:center; justify-content:space-between; margin-top:.65rem; color:var(--ink); font-size:.82rem; font-weight:600; }
.dashboard-weight-all .nav-icon-lucide{ width:.95rem; height:.95rem; }
.dashboard-weight-empty{ display:flex; align-items:center; justify-content:center; gap:.55rem; min-height:130px; color:var(--muted); }
.dashboard-weight-empty .nav-icon-lucide{ width:1.2rem; height:1.2rem; }
@media (max-width:820px){
  .dashboard-activity-body{ gap:.75rem; }
  .dashboard-mobile-activity .dashboard-activity-heatmap:not(.is-calendar) .dashboard-heatmap-cell{ width:32px; height:32px; }
  .dashboard-weight-card .progress-chart-shell{ margin-inline:0; }
}

/* ── Dashboard chat floating button ───────────────────────────
   Shares the quick start FAB's size, accent and shadow so the two read as one
   control stack. Inside .dashboard-quick-actions it sits in that grid, which
   already clears the footer; .is-standalone pins it itself. */
.chat-fab{
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  color: var(--color-on-accent);
  background: var(--color-accent);
  box-shadow: var(--shadow);
  transition: transform .18s ease, background-color .18s ease;
}
.chat-fab:hover{ transform: translateY(-1px); }
.chat-fab .nav-icon-lucide{
  width: 1.65rem;
  height: 1.65rem;
}
.chat-fab .nav-badge{
  position: absolute;
  top: -.1rem;
  right: -.1rem;
  margin-left: 0;
  border: 2px solid var(--card);
}
/* --mobile-nav-height is the footer nav's own offsetHeight, so it already
   includes the safe-area padding, and resolves to 0 on web where that nav is
   hidden — one expression covers both. */
.chat-fab.is-standalone{
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(var(--mobile-nav-height, 0px) + 1rem);
  z-index: 47;
}

/* ── Plan Actions floating button ─────────────────────────── */
.plan-fab-wrap{
  position: fixed;
  top: 1.1rem;
  right: 1.5rem;
  z-index: 400;
}

.plan-fab-btn{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .52rem 1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1);
  transition: box-shadow .15s, transform .15s;
  white-space: nowrap;
}

.plan-fab-btn:hover{
  box-shadow: 0 5px 20px rgba(0,0,0,.24);
  transform: translateY(-1px);
}

.plan-fab-btn[aria-expanded="true"]{
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  transform: none;
}

.plan-fab-btn .nav-icon-lucide{
  width: 14px;
  height: 14px;
}

.plan-fab-panel{
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-height: calc(100svh - 6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.plan-fab-panel.is-open{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.plan-fab-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem .75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.plan-fab-panel-title{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
}

.plan-fab-panel-icon{
  width: 13px;
  height: 13px;
  opacity: .7;
}

.plan-fab-panel-actions{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

/* Force the back and close buttons to a byte-identical box. Higher specificity
   than the theme's generic button rules so nothing (border, padding, sizing)
   can differ between the two. */
.plan-fab-panel-actions .plan-fab-close{
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  padding: 0 !important;
  border: 1px solid rgba(111,155,41,.18) !important;
  border-radius: 10px !important;
}

.plan-fab-panel-actions .plan-fab-close .nav-icon-lucide{
  width: 16px !important;
  height: 16px !important;
}

.plan-fab-close{
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  /* Fixed square so the back arrow and close X share an identical box
     regardless of icon size or the app's default button sizing. */
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  border-radius: 10px;
  padding: 0;
  transition: opacity .15s, background .15s;
}

.plan-fab-close:hover{
  opacity: 1;
  background: var(--soft);
}

.plan-fab-close .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

/* Match the back arrow to the close X exactly (same box + same icon size). */
.plan-fab-back .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.plan-fab-panel-body{
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.plan-fab-backdrop{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(2px);
  z-index: 399;
}

@media (max-width: 820px){
  .plan-fab-wrap{
    top: auto;
    bottom: calc(var(--mobile-nav-height, 78px) + .85rem);
    right: 1rem;
  }

  .plan-fab-panel{
    position: fixed;
    bottom: calc(var(--mobile-nav-height, 78px) + 4.4rem);
    right: 1rem;
    left: 1rem;
    top: auto;
    width: auto;
    max-height: 65svh;
    transform: translateY(10px) scale(.98);
    border-radius: 16px;
  }

  .plan-fab-panel.is-open{
    transform: none;
  }

  .plan-fab-backdrop.is-open{
    display: block;
  }
}

.plan-actions-grid{
  display: grid;
  gap: .8rem;
}

.fab-menu-item,
.fab-menu-btn{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--border) !important;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .875rem;
  transition: background .15s, border-color .15s;
}

.fab-menu-btn{
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  font-family: inherit;
}

/* Wraps a .fab-menu-btn in its own <form> (for actions needing a POST)
   without shrinking it - display:inline-flex (e.g. .inline-form) doesn't
   stretch to fill the grid row the way the plain <a>/<button> menu items
   do, so this stayed visibly smaller than its siblings. */
.fab-menu-form{
  margin: 0;
  display: block;
  width: 100%;
}

/* Keeps the icon out of reach of the global button:has(> [data-lucide=...])
   reset rules; sized to sit exactly where a bare .fab-menu-icon would */
.fab-menu-icon-wrap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

/* Pin the POSTing menu button to the exact dimensions of its .fab-menu-item
   siblings (Edit Plan, Library). The doubled class outranks both the base
   `button` pill rule and the button:has(> [data-lucide="trash-2"]) rule
   that zeroes padding and shrink-wraps any trash-icon button. */
.fab-menu-form button.fab-menu-btn.fab-menu-btn{
  display: flex !important;
  align-items: center !important;
  gap: .75rem !important;
  width: 100% !important;
  height: 100%;
  min-height: 0 !important;
  margin: 0 !important;
  padding: .75rem .85rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  justify-content: flex-start !important;
  text-align: left;
  font-size: .875rem !important;
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
}

.fab-menu-item:visited{
  color: var(--ink);
}

.fab-menu-item:hover,
.fab-menu-btn:hover{
  background: var(--soft);
  text-decoration: none;
}

.fab-menu-btn--danger{
  color: var(--danger, #ef4444);
}

.fab-menu-btn--danger:hover{
  background: rgba(239,68,68,.07);
  border-color: rgba(239,68,68,.22);
  color: var(--danger, #ef4444);
}

.fab-menu-icon{
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .6;
}

/* Make the outlined menu buttons (Edit Plan, Library, etc.) read as proper
   buttons at REST — not only when hovered. Use the FULL border shorthand (not
   just border-color) so the outline is restored even if another rule zeroed the
   border width, and a panel-scoped selector for specificity that wins. Clearly
   visible in both themes, with distinct hover and pressed states. */
html:not([data-theme="dark"]) .plan-fab-panel-body .fab-menu-item,
html:not([data-theme="dark"]) .plan-fab-panel-body .fab-menu-btn{
  border: 1px solid rgba(22,25,22,.22) !important;
  background: rgba(22,25,22,.02) !important;
}
html:not([data-theme="dark"]) .plan-fab-panel-body .fab-menu-item:hover,
html:not([data-theme="dark"]) .plan-fab-panel-body .fab-menu-btn:hover{
  border: 1px solid rgba(22,25,22,.38) !important;
  background: rgba(22,25,22,.06) !important;
}

html[data-theme="dark"] .plan-fab-panel-body .fab-menu-item,
html[data-theme="dark"] .plan-fab-panel-body .fab-menu-btn{
  border: 1px solid rgba(159,163,160,.55) !important;
  background: rgba(159,163,160,.06) !important;
}
html[data-theme="dark"] .plan-fab-panel-body .fab-menu-item:hover,
html[data-theme="dark"] .plan-fab-panel-body .fab-menu-btn:hover{
  border: 1px solid rgba(159,163,160,.78) !important;
  background: rgba(159,163,160,.16) !important;
}

.plan-fab-panel-body .fab-menu-item,
.plan-fab-panel-body .fab-menu-btn{
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.plan-fab-panel-body .fab-menu-item:active,
.plan-fab-panel-body .fab-menu-btn:active{
  transform: translateY(1px) !important;
}

.plan-fab-week-actions{
  display: grid;
  gap: .5rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--border);
}

.plan-week-remove-card .modal-actions{
  display: flex;
  gap: .75rem;
}
.plan-week-remove-card .modal-actions button{
  flex: 1;
  font-size: 1rem;
}

.plan-actions-form{
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.plan-actions-form button{
  width: 100%;
}

.plan-actions-form label,
.plan-actions-form input,
.plan-actions-form select,
.plan-actions-form .muted{
  min-width: 0;
}

.plan-actions-form input,
.plan-actions-form select{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.plan-actions-form-rotation{
  display: grid;
  gap: .55rem;
}

.plan-actions-form-rotation input[type="date"]{
  width: 100%;
}

.plan-actions-form-save{
  padding-top: 1.15rem;
}

.plan-week-toolbar{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.plan-week-tabs{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.plan-week-actions{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

/* Week switcher: a tab strip, not a row of buttons. The only chrome is the
   underline on the selected week, so it reads as navigation between views of
   the same plan rather than seven actions. */
.plan-week-tab{
  appearance: none;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  font-weight: 600;
  padding: .5rem .75rem;
  box-shadow: none;
  /* Sits on the toolbar hairline so the active underline replaces it. */
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}

.plan-week-tab:hover,
.plan-week-tab:focus-visible{
  color: var(--ink);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.plan-week-tab.is-active{
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.plan-week-add,
.plan-week-remove{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: var(--radius-sm);
  padding: .5rem .95rem;
  font-weight: 700;
}

.plan-week-add .nav-icon-lucide,
.plan-week-remove .nav-icon-lucide{
  width: 14px;
  height: 14px;
  color: currentColor;
}

.plan-week-remove{
  appearance: none;
  border: 1px solid rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1));
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.plan-week-add{
  border: 1px solid rgba(104,153,1,.62);
  background: linear-gradient(180deg, rgba(104,153,1,.18), rgba(86,127,0,.12));
  color: #e6eae6 !important;
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.22), inset 0 1px 0 rgba(255,255,255,.08);
}

.plan-week-add:hover,
.plan-week-add:focus-visible{
  transform: none;
  background: linear-gradient(180deg, rgba(104,153,1,.24), rgba(86,127,0,.16));
  border-color: rgba(86,127,0,.78);
  color: #f3f6f3 !important;
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.3), inset 0 1px 0 rgba(255,255,255,.08);
}

.plan-week-remove:hover{
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13));
  border-color: rgba(252,165,165,.52);
  color: #fff1f2 !important;
}

.plan-week-remove:focus,
.plan-week-remove:active,
.plan-week-remove:visited{
  color: #fff1f2 !important;
}

.plan-day-edit-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.plan-day-edit-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: currentColor;
}

html:not([data-theme="dark"]) .plan-week-remove{
  color: #b91c1c !important;
  border-color: rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.9));
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.08), 0 10px 24px rgba(248,113,113,.08);
}

html:not([data-theme="dark"]) .plan-week-add{
  color: #496d02 !important;
  border-color: rgba(86,127,0,.5);
  background: linear-gradient(180deg, rgba(243,246,243,.98), rgba(230,234,230,.9));
  box-shadow: inset 0 0 0 1px rgba(86,127,0,.14), 0 10px 24px rgba(104,153,1,.08);
}

html:not([data-theme="dark"]) .plan-week-remove:hover{
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.92));
}

html:not([data-theme="dark"]) .plan-week-add:hover{
  background: linear-gradient(180deg, rgba(230,234,230,.98), rgba(214,217,214,.92));
}

html:not([data-theme="dark"]) .plan-day-edit-btn{
  border-color: rgba(159,163,160,.45);
  background: #ffffff;
  color: #161916;
}

html:not([data-theme="dark"]) .plan-day-edit-btn:hover{
  background: #f8fafc;
}

html[data-theme="dark"] .plan-day-edit-btn{
  border-color: rgba(104,153,1,.22);
  background: #262926;
  color: #e5e9e5;
}

html[data-theme="dark"] .plan-day-edit-btn:hover{
  background: #2f3230;
}

/* ── Plan calendar grid (edit plan view) ──────────────────────────── */

/* Header shared by mobile + desktop */
.plan-cal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.plan-cal-daytitle{
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.plan-cal-daytitle strong{ font-size: .9rem; }
.plan-cal-date{ font-size: .74rem; }

/* Body: mobile padding */
.plan-cal-body{
  padding: .85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

/* Drag & drop between days */
[data-plan-dnd] .plan-cal-workouts{
  display: flex;
  flex-direction: column;
  min-height: 1.75rem;
  border-radius: var(--radius-sm, 8px);
}
[data-plan-dnd] .cal-workout-block{
  touch-action: pan-y;
  cursor: grab;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color .16s ease, background-color .16s ease, opacity .16s ease;
}
[data-plan-dnd] .cal-workout-block:hover{
  border-color: color-mix(in srgb, var(--color-accent) 32%, var(--border));
}
.plan-drag-cue{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--color-text-muted, var(--muted));
  opacity: .58;
  pointer-events: none;
  transition: color .16s ease, opacity .16s ease;
}
.plan-drag-cue .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}
.plan-cal-workout-drag{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  min-width: 1.75rem;
  height: 1.75rem;
  min-height: 1.75rem;
  margin: -.2rem -.25rem -.2rem .25rem;
  padding: .25rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: inherit;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.plan-cal-workout-drag .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}
.cal-workout-block:hover .plan-drag-cue,
.cal-workout-block:focus-within .plan-drag-cue{
  color: var(--color-text-secondary, var(--muted));
  opacity: .9;
}
.plan-dnd-chosen,
.plan-dnd-chosen *,
.plan-dnd-fallback,
.plan-dnd-fallback *{
  cursor: grabbing !important;
}
.plan-dnd-ghost{
  opacity: .45;
  border-style: dashed;
}
.plan-dnd-active .plan-cal-workouts{
  outline: 1px dashed var(--border);
  outline-offset: 2px;
}
.plan-grid.plan-dnd-active,
.plan-grid.plan-dnd-active *{
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
.plan-grid .plan-dnd-fallback{
  max-height: 96px !important;
  overflow: hidden !important;
  opacity: .94;
  box-shadow: var(--shadow);
}

/* Pencil icon: transparent, unobtrusive */
.plan-cal-edit-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 5px;
  opacity: .4;
  transition: opacity .15s, background .15s;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}
.plan-cal-edit-btn:hover,
.plan-cal-edit-btn:focus-visible{
  opacity: 1;
  background: var(--soft);
}
.plan-cal-edit-btn .nav-icon-lucide{
  width: 14px;
  height: 14px;
}

/* Pencil always visible on mobile at higher opacity (no hover state on touch) */
.plan-cal-edit-btn{ display: flex; opacity: .55; }

.plan-cal-meta{
  font-size: .72rem;
  margin: 0;
}

@media (min-width: 821px){
  /* Switch to 7-column grid */
  .plan-grid-cal{
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 0 !important;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }
  .plan-grid-cal .plan-day-cal{
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-right: 1px solid var(--border) !important;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    background: var(--bg) !important;
    animation: none !important;
    transform: none !important;
    transition: background .15s !important;
    overflow: hidden;
  }
  .plan-grid-cal .plan-day-cal:last-child{ border-right: none !important; }
  .plan-grid-cal .plan-day-cal:hover{ background: var(--soft) !important; }

  /* Compact header on desktop */
  .plan-grid-cal .plan-cal-head{
    padding: .55rem .65rem .45rem;
  }
  .plan-grid-cal .plan-cal-daytitle strong{ font-size: .85rem; }
  .plan-grid-cal .plan-cal-date{ font-size: .72rem; }

  /* Compact body on desktop */
  .plan-grid-cal .plan-cal-body{
    padding: .4rem .65rem .65rem;
    gap: .25rem;
  }

  /* Pencil subtler on desktop (hover reveals it); brighter on mobile via base rule */
  .plan-grid-cal .plan-cal-edit-btn{ opacity: .35; }

  /* Pencil brightens when hovering the cell */
  .plan-grid-cal .plan-day-cal:hover .plan-cal-edit-btn{ opacity: .65; }
  .plan-grid-cal .plan-cal-edit-btn:hover,
  .plan-grid-cal .plan-cal-edit-btn:focus-visible{
    opacity: 1 !important;
    background: var(--soft);
  }

  /* Show exercise list on desktop */
  .plan-grid-cal .cal-exercise-list{ display: grid; }
}

html[data-theme="dark"] .plan-cal-edit-btn{ color: #e5e9e5; }

@media (min-width: 821px){
  html[data-theme="dark"] .plan-grid-cal .plan-day-cal{
    background: var(--bg) !important;
  }
  html[data-theme="dark"] .plan-grid-cal .plan-day-cal:hover{
    background: var(--soft) !important;
  }
  html[data-theme="dark"] .plan-grid-cal .plan-cal-head{
    background: var(--bg);
  }
}

@media (max-width: 760px){
  .plan-actions-panel,
  .plan-actions-body,
  .plan-actions-grid,
  .plan-actions-form{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .plan-head{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .65rem;
  }
  .plan-head-actions{
    margin-left: 0;
    justify-self: end;
    align-self: start;
  }
  .plan-actions-grid{
    grid-template-columns: 1fr;
  }
  .plan-week-toolbar{
    align-items: flex-start;
    justify-content: flex-start;
  }
  .plan-week-tabs{
    width: 100%;
  }
  .plan-week-actions{
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

.plan-tool-card > summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

.plan-tool-card > summary::-webkit-details-marker{
  display: none;
}

.plan-tool-card > summary::after{
  content: "+";
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  opacity: .85;
}

.plan-tool-card[open] > summary::after{
  content: "-";
}

.plan-tool-body{
  margin-top: .6rem;
}

.plan-actions-card .plan-tool-body{
  display: grid;
  gap: .55rem;
}

.plan-action-row{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .55rem;
  display: grid;
  gap: .45rem;
}

.plan-action-inline{
  display: grid;
  gap: .45rem;
}

.plan-top{
  margin-bottom: 1.25rem;
  margin-top: 1.25rem;
}

.plan-io-card form{
  display: grid;
  gap: .6rem;
}

.plan-io-card input[type="file"]{
  width: 100%;
}

.plan-io-card select{
  width: 100%;
}

.plan-io-action{
  font-size: .95rem;
  padding: .5rem .9rem;
  width: 100%;
  text-align: center;
  display: inline-block;
}

.card,
article,
.daycard,
.plan-day,
.banner,
.flash{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html:not([data-theme="dark"]) .card,
html:not([data-theme="dark"]) article,
html:not([data-theme="dark"]) .daycard,
html:not([data-theme="dark"]) .plan-day,
html:not([data-theme="dark"]) .banner,
html:not([data-theme="dark"]) .flash{
  background: linear-gradient(180deg, #fffdfa 0%, #f8f6f1 100%);
  border-color: rgba(159,163,160,.22);
  box-shadow: 0 18px 34px rgba(22,25,22,.08);
}

.banner{
  padding: .75rem 1rem;
  line-height: 1.45;
  word-break: break-word;
}

.banner-title{
  font-weight: 700;
  margin-bottom: .25rem;
}

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

.banner--info{
  border-color: rgba(104,153,1,.35);
  background: rgba(104,153,1,.08);
}

.card,
article{
  padding: 1rem 1.2rem;
}

.card header,
article header{
  font-weight: 600;
  margin-bottom: .75rem;
}

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

.text-strong{
  color: var(--ink);
  font-weight: 700;
}

.muted-link{
  color: #525552;
  font-weight: 600;
}

.flash-wrap{
  display: grid;
  gap: .5rem;
  margin-bottom: 1rem;
}

.flash{
  padding: .7rem .9rem;
  border-left: 4px solid var(--accent);
}

label{
  display: grid;
  gap: .35rem;
  font-weight: 500;
}

form{
  display: grid;
  gap: .8rem;
}

form .grid2{
  gap: .8rem;
}

input,
textarea,
select{
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .6rem .7rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

input:focus,
textarea:focus,
select:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

input[type="checkbox"]{
  accent-color: var(--brand);
}

.theme-toggle{
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .55rem;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
}

.theme-toggle input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(22,25,22,.18);
  background: #161916;
  position: relative;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.theme-toggle input[type="checkbox"]::after{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22,25,22,.24);
  transition: transform .2s ease;
}

.theme-toggle input[type="checkbox"]:checked{
  background: #22c55e;
  border-color: #16a34a;
}

.theme-toggle input[type="checkbox"]:checked::after{
  transform: translateX(18px);
}

.theme-toggle input[type="checkbox"]:focus-visible{
  box-shadow: 0 0 0 3px var(--ring);
}

html[data-theme="dark"] .theme-toggle input[type="checkbox"]{
  border-color: rgba(159,163,160,.45);
}

button,
a[role="button"]{
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: .6rem 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(80,118,1,.24);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  outline: none;
  overflow: hidden;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.pill-link,
.plan-cta,
.pricing-cta,
.plan-cta-btn,
.plan-cancel-btn{
  overflow: hidden;
}

button:hover,
a[role="button"]:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(80,118,1,.3);
  background: linear-gradient(135deg, #7bac2c, #567f00);
}

button.secondary,
a[role="button"].secondary,
a.secondary{
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  border: 1px solid rgba(170,235,66,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18);
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button.secondary:hover,
a[role="button"].secondary:hover,
a.secondary:hover{
  background: linear-gradient(135deg, #aaeb42, #97d337);
  color: #0e110f;
  border-color: rgba(185,253,82,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 14px 28px rgba(104,146,36,.22);
  transform: translateY(-1px);
}

button.secondary:active,
a[role="button"].secondary:active,
a.secondary:active,
button.secondary:focus,
button.secondary:focus-visible,
a[role="button"].secondary:focus,
a[role="button"].secondary:focus-visible,
a.secondary:focus,
a.secondary:focus-visible{
  background: linear-gradient(135deg, #90c837, #7bac2c);
  color: #0e110f;
  border-color: rgba(141,195,55,.3);
}

button.small,
select.small{
  padding: .35rem .7rem;
  font-size: .85rem;
  line-height: 1;
}

a[role="button"].small{
  padding: .35rem .7rem;
  font-size: .85rem;
  line-height: 1;
}

button.small,
a[role="button"].small{
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.weeklist{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.daycard{
  padding: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
  background: linear-gradient(160deg, #ffffff 0%, #f3f7f3 100%);
  border: 1px solid rgba(80,118,1,.08);
  box-shadow: 0 14px 26px rgba(38,41,39,.08);
}

.daycard:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(27,32,29,.12);
}

.daycard.today{
  border-color: rgba(102,150,2,.5);
  box-shadow: 0 18px 34px rgba(102,150,2,.2), 0 0 0 2px rgba(102,150,2,.22);
  background: linear-gradient(150deg, rgba(102,150,2,.18) 0%, rgba(236,233,255,.9) 55%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  padding-top: 1.7rem;
}

.daycard.today .pillcount{
  margin-top: 1.15rem;
}

.daycard.today::after{
  content: "Today";
  position: absolute;
  top: .55rem;
  right: .7rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(129,180,47,.4);
  color: #ffffff;
  border: 1px solid rgba(129,180,47,.8);
  z-index: 1;
  pointer-events: none;
}

.daycard-top{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.daytitle{
  display: grid;
  gap: .2rem;
}

.daycard-badges{
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .55rem;
}

.daycard-complete-indicator{
  width: 1.1rem;
  height: 1.1rem;
  font-size: .72rem;
}

.pillcount{
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .85rem;
  border: 1px solid rgba(80,118,1,.12);
}

@media (max-width: 820px){
  .daycard.today .pillcount{
    margin-top: 1rem;
  }
}

@media (max-width: 560px){
  .daycard.today .daycard-top{
    padding-top: 1.35rem;
  }

  .daycard.today .pillcount{
    margin-top: 0;
  }

  .daycard.today::after{
    top: .55rem;
    right: .65rem;
  }

  .week-workout-picker-card{
    width: min(100%, calc(100vw - 1.5rem));
  }

  .week-workout-picker-option{
    padding: .9rem;
  }
}

.mini-list{
  list-style: none;
  padding: 0;
  margin: .65rem 0 0;
  display: grid;
  gap: .35rem;
}

/* ── Calendar grid: desktop week view ─────────────────────────────── */

/* Status chips */
.cal-status-bar{
  display: none;
  align-items: center;
  gap: .35rem;
  margin: .3rem 0 .35rem;
  min-height: 1.5rem;
}
.cal-chip{
  display: inline-flex;
  align-items: center;
  gap: .24rem;
  font-size: .67rem;
  font-weight: 600;
  padding: .12rem .42rem;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: .01em;
}
.cal-chip-icon{
  width: .78rem;
  height: .78rem;
  flex: 0 0 .78rem;
  stroke-width: 2.2;
}
.cal-chip--done     { background: rgba(22,163,74,.12);  color: #16a34a; }
.cal-chip--progress { background: rgba(234,179,8,.12);  color: #b45309; }
.cal-chip--missed   { background: rgba(239,68,68,.12);  color: #dc2626; }
.cal-excount        { font-size: .72rem; margin-left: auto; }

/* Workout block inside a calendar cell */
.cal-workout-block{
  margin-top: .45rem;
  padding: .4rem .5rem .45rem;
  background: var(--soft);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.cal-workout-block + .cal-workout-block{ margin-top: .3rem; }
.cal-workout-title{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .25rem;
  font-size: .8rem;
  line-height: 1.35;
}
.cal-workout-title-copy{ min-width: 0; }
.cal-workout-title strong{ font-weight: 600; }
.cal-workout-title .muted{ font-size: .74rem; }

/* Exercise bullet list — hidden on mobile */
.cal-exercise-list{
  display: none;
  list-style: disc;
  padding-left: 1rem;
  margin: .3rem 0 0;
  gap: 0;
}
.cal-exercise-list li{
  font-size: .71rem;
  line-height: 1.55;
  color: inherit;
  opacity: .82;
}
.cal-more{
  font-size: .68rem !important;
  list-style: none;
  margin-left: -1rem;
  opacity: .6;
}
.cal-rest{ font-size: .8rem; margin-top: .5rem; }

/* ── Desktop: 7-column calendar grid (≥ 821px) ──────────────────── */
@media (min-width: 821px){
  .weeklist{
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }

  .weeklist .daycard{
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-right: 1px solid var(--border) !important;
    padding: .7rem .65rem .85rem;
    min-height: 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg) !important;
    animation: none !important;
    transform: none !important;
    transition: background .15s !important;
  }
  .weeklist .daycard:last-child{
    border-right: none !important;
  }
  .weeklist .daycard:hover{
    background: var(--soft) !important;
  }
  .weeklist .daycard.today{
    background: rgba(102,150,2,.05) !important;
  }
  .weeklist .daycard.today:hover{
    background: rgba(102,150,2,.09) !important;
  }
  .weeklist .daycard.today::after{
    font-size: .58rem;
    padding: .1rem .36rem;
    top: .38rem;
    right: .5rem;
  }

  /* Header row: day name + date, no pill count */
  .weeklist .daycard-top{
    flex-direction: column;
    gap: .05rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    padding-bottom: .4rem;
    margin-bottom: 0;
  }
  .weeklist .daytitle{
    flex-direction: row;
    gap: .3rem;
    align-items: baseline;
  }
  .weeklist .daytitle strong{ font-size: .88rem; }
  .weeklist .daytitle .muted{ font-size: .74rem; }

  /* Hide pill count and mobile badges; show desktop status bar + exercise list */
  .weeklist .pillcount{ display: none; }
  .weeklist .daycard-badges{ display: none; }
  .weeklist .cal-status-bar{ display: flex; }
  .weeklist .cal-exercise-list{ display: grid; }
  .weeklist .cal-workout-block,
  .weeklist .cal-workout-title,
  .weeklist .cal-workout-title > *{
    min-width: 0;
  }
  .weeklist .cal-workout-title > *{
    overflow-wrap: anywhere;
  }
}

/* Dark mode overrides for cal elements */
html[data-theme="dark"] .cal-chip--done     { background: rgba(22,163,74,.18);  color: #4ade80; }
html[data-theme="dark"] .cal-chip--progress { background: rgba(234,179,8,.18);  color: #fbbf24; }
html[data-theme="dark"] .cal-chip--missed   { background: rgba(239,68,68,.18);  color: #f87171; }

@media (min-width: 821px){
  html[data-theme="dark"] .weeklist .daycard{
    background: var(--bg) !important;
  }
  html[data-theme="dark"] .weeklist .daycard.today{
    background: rgba(102,150,2,.08) !important;
  }
  html[data-theme="dark"] .weeklist .daycard:hover{
    background: var(--soft) !important;
  }
  html[data-theme="dark"] .weeklist .daycard.today:hover{
    background: rgba(102,150,2,.13) !important;
  }
}

.week-workout-picker-card{
  max-width: 520px;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.week-workout-picker-modal .modal-backdrop{
  background: rgba(9,11,9,.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 0;
}

.week-workout-picker-modal{
  z-index: 5200;
}

.week-workout-picker-modal .modal-card,
.week-workout-picker-modal .modal-body,
.week-workout-picker-modal .week-workout-picker-list,
.week-workout-picker-modal .week-workout-picker-option{
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.week-workout-picker-head{
  align-items: center;
}

.week-workout-picker-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.22);
  background: rgba(22,25,22,.04);
  color: var(--ink);
  box-shadow: none;
}

.week-workout-picker-list{
  display: grid;
  gap: .75rem;
}

.week-workout-picker-option{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  padding: .95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
  color: var(--ink);
  text-decoration: none;
  box-shadow: none;
}

.week-workout-picker-copy{
  min-width: 0;
  display: grid;
  gap: .2rem;
}

.week-workout-picker-copy strong{
  color: inherit;
  line-height: 1.3;
}

.week-workout-picker-arrow{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #707471;
}

.week-workout-picker-arrow .nav-icon-lucide,
.week-workout-picker-close .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.plan-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.plan-day{
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.plan-day-head{
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f9f7f2);
}

.plan-day-link{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  color: inherit;
}

.plan-day-link:hover{
  background: linear-gradient(180deg, rgba(80,118,1,.08), rgba(80,118,1,.02));
}

.plan-day-summary{
  min-height: 180px;
}

.plan-day-body{
  padding: 1rem;
  display: grid;
  gap: .75rem;
  align-items: start;
  justify-items: center;
  flex: 1;
}

.plan-day-preview{
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: grid;
  gap: .35rem;
}

.plan-day-preview li{
  padding: .45rem .6rem;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  font-size: .92rem;
  box-shadow: var(--shadow-soft);
}

.plan-list{
  list-style: none;
  padding: .25rem 0;
  margin: 0;
  display: grid;
  gap: .35rem;
  flex: 1;
}

.plan-item{
  display: grid;
  gap: .6rem;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.plan-item-add{
  border-bottom: none;
}

.plan-item-main{
  display: grid;
  gap: .35rem;
}

.plan-item-title{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

/* Pencil edit affordance pinned to the right of the workout title */
.plan-item-edit{
  margin-left: auto;
  flex: 0 0 auto;
}

.plan-link{
  font-weight: 600;
}

.plan-add-form{
  width: 100%;
}

.plan-inline{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: center;
}

.plan-fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
}

.plan-fields .plan-field{
  min-width: 0;
}

.plan-field{
  width: 100%;
}

.plan-actions{
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.plan-inline-actions{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.plan-open-helper{
  font-size: .86rem;
  line-height: 1.35;
}

.plan-edit-btn,
.plan-edit-btn:hover,
.plan-edit-btn:focus,
.plan-edit-btn:focus-visible,
.plan-edit-btn:active{
  border-color: rgba(245,158,11,.46) !important;
  background: rgba(245,158,11,.16) !important;
  color: #92400e !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .plan-edit-btn,
html[data-theme="dark"] .plan-edit-btn:hover,
html[data-theme="dark"] .plan-edit-btn:focus,
html[data-theme="dark"] .plan-edit-btn:focus-visible,
html[data-theme="dark"] .plan-edit-btn:active{
  border-color: rgba(250,204,21,.36) !important;
  background: rgba(161,98,7,.24) !important;
  color: #fde68a !important;
  box-shadow: none !important;
}

.plan-day-select{
  min-width: 110px;
}

.plan-add{
  padding: .65rem 1rem 1rem;
  border-top: 1px dashed var(--border);
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.6));
  margin-top: auto;
  overflow: hidden;
}

html[data-theme="dark"] .plan-add{
  border-top-color: rgba(111,155,41,0.12);
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgba(18,20,18,.5), rgba(13,15,13,.25));
}

html[data-theme="dark"] .plan-add-form{
  background: transparent;
}

html[data-theme="dark"] .plan-add-form .plan-field{
  background: rgba(22,25,22,.72);
  border-color: rgba(159,163,160,.28);
  color: #eff3f0;
}

html[data-theme="dark"] .plan-add-form .plan-field::placeholder{
  color: rgba(234,238,235,.58);
}

html[data-theme="dark"] .plan-add-form .small{
  color: inherit !important;
}

body.app[data-authenticated="1"] button,
body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] a[role="button"],
body.app[data-authenticated="1"] a.secondary,
body.app[data-authenticated="1"] .secondary-button,
body.app[data-authenticated="1"] .plan-week-add,
body.app[data-authenticated="1"] .plan-week-remove,
body.app[data-authenticated="1"] .plan-week-tab{
  box-shadow: none !important;
}

body.app[data-authenticated="1"] button:hover,
body.app[data-authenticated="1"] button:focus,
body.app[data-authenticated="1"] button:focus-visible,
body.app[data-authenticated="1"] button:active,
body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] a[role="button"]:hover,
body.app[data-authenticated="1"] a[role="button"]:focus,
body.app[data-authenticated="1"] a[role="button"]:focus-visible,
body.app[data-authenticated="1"] a[role="button"]:active,
body.app[data-authenticated="1"] a.secondary:hover,
body.app[data-authenticated="1"] a.secondary:focus,
body.app[data-authenticated="1"] a.secondary:focus-visible,
body.app[data-authenticated="1"] a.secondary:active,
body.app[data-authenticated="1"] .secondary-button:hover,
body.app[data-authenticated="1"] .secondary-button:focus,
body.app[data-authenticated="1"] .secondary-button:focus-visible,
body.app[data-authenticated="1"] .secondary-button:active,
body.app[data-authenticated="1"] .plan-week-add:hover,
body.app[data-authenticated="1"] .plan-week-add:focus,
body.app[data-authenticated="1"] .plan-week-add:focus-visible,
body.app[data-authenticated="1"] .plan-week-add:active,
body.app[data-authenticated="1"] .plan-week-remove:hover,
body.app[data-authenticated="1"] .plan-week-remove:focus,
body.app[data-authenticated="1"] .plan-week-remove:focus-visible,
body.app[data-authenticated="1"] .plan-week-remove:active,
body.app[data-authenticated="1"] .plan-week-tab:hover,
body.app[data-authenticated="1"] .plan-week-tab:focus,
body.app[data-authenticated="1"] .plan-week-tab:focus-visible,
body.app[data-authenticated="1"] .plan-week-tab:active{
  box-shadow: none !important;
}

.history-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 1.25rem;
  align-items: start;
}

.history-column{
  display:grid;
  gap:1.25rem;
  align-content:start;
  min-width:0;
}

.day-stats{
  width: 100%;
  max-width: none;
}

.day-stats-head{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.day-stats-head-icon{
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(104,153,1,.1);
  color: #567f00;
  border: 1px solid rgba(104,153,1,.16);
}

.day-stat-label{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .35rem;
  font-weight: 600;
}

.day-stat-label .nav-icon-lucide{
  width: 15px;
  height: 15px;
  opacity: .9;
}

.session-duration-field{
  display: grid;
  gap: .5rem;
  min-width: 0;
}

.session-duration-picker{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: .35rem;
}

.session-duration-picker > label{
  display: grid;
  gap: .25rem;
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
}

.session-duration-picker select{
  width: 100%;
  min-height: 2.75rem;
  padding-inline: .45rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.session-duration-separator{
  align-self: end;
  padding-bottom: .72rem;
  color: var(--muted);
  font-weight: 800;
}

.day-workouts{
  width: 100%;
}

.day-layout,
.day-layout *{
  min-width: 0;
}

.workout-section,
.block-section,
.exercise-row,
.workout-stack{
  width: 100%;
}

.exercise-actuals .actuals-grid input{
  width: 100%;
  min-width: 0;
}

/* Alternate exercise — workout execution */
.exercise-row.is-using-alt{
  border-left: 2px solid var(--color-accent);
  padding-left: .5rem;
}
.exercise-row-title-bar{
  display: flex;
  align-items: center;
  gap: .4rem;
}
.alt-swap-btn{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.75rem !important;
  flex-shrink: 0 !important;
  width: 1.75rem !important;
  min-width: 1.75rem !important;
  max-width: 1.75rem !important;
  height: 1.75rem !important;
  min-height: 1.75rem !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-text-muted);
  opacity: .55;
  cursor: pointer;
  border-radius: 6px;
  padding: 0 !important;
  transition: opacity .15s, color .15s, background .15s;
}
.alt-swap-btn:hover,
.alt-swap-btn:focus-visible{
  opacity: 1;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}
.alt-swap-btn.is-active{
  opacity: 1;
  color: var(--color-accent);
}
.alt-swap-btn .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.checktext{
  min-width: 0;
}

.checktext span{
  word-break: break-word;
}


.day-layout .card{
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f8fa;
  box-shadow: 0 16px 30px rgba(38,41,39,.08);
}

@media (min-width: 900px){
  .day-layout-running{
    grid-template-columns: 1fr;
  }
  .day-layout-running .day-workouts{
    order: 1;
  }
  .day-layout-running .day-stats{
    order: 2;
  }
}

@media (max-width: 980px){
  /* Solo users & clients on mobile: an in-progress workout goes straight to
     the exercises. The session-stats summary is hidden until the workout is
     marked complete (completion also fires the celebration modal). Multiple
     workouts still show the chooser; completed workouts show the summary.
     980px matches the .day-layout mobile (column-reverse) breakpoint. */
  .day-focus-mobile.day-layout-running .day-stats{
    display: none;
  }
}

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

.history-page-action-btn,
.history-checkin-btn{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #0e110f !important;
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  border: 1px solid rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.24) !important;
}

.history-page-action-btn:hover,
.history-page-action-btn:focus,
.history-page-action-btn:focus-visible,
.history-checkin-btn:hover,
.history-checkin-btn:focus,
.history-checkin-btn:focus-visible{
  color: #0e110f !important;
  background: linear-gradient(135deg, #a3e23d, #8fc735) !important;
  border-color: rgba(177,246,67,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 12px 26px rgba(104,146,36,.28) !important;
}

.history-page-action-btn .nav-icon-lucide,
.history-checkin-btn .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.checkin-form{
  display: grid;
  gap: 1rem;
}

.checkin-label{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .4rem;
}

.checkin-label .nav-icon-lucide{
  width: .98rem;
  height: .98rem;
  color: var(--muted);
}

.checkin-save-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin-top: .4rem;
  width: 100%;
  min-height: 2.8rem;
  padding: .72rem 1.1rem;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.checkin-save-btn:hover,
.checkin-save-btn:focus-visible{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.checkin-save-btn .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.history-month-nav{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.history-month-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0 !important;
  outline: none;
  background: transparent !important;
  color: #161916;
  box-shadow: none !important;
  border-radius: 999px;
}

.history-month-btn:hover,
.history-month-btn:focus-visible{
  border: 0 !important;
  outline: none;
  background: rgba(80,118,1,.08) !important;
  color: var(--ink);
  transform: none;
  box-shadow: none !important;
}

.history-month-btn .nav-icon-lucide{
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

html[data-theme="light"] .history-month-btn{
  color: #161917 !important;
}

html[data-theme="light"] .history-month-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

.calendar-weekdays{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
  margin-bottom: .5rem;
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-weekday{
  text-align: center;
}

.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .45rem;
}

.calendar-day{
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding-top: .6rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(80,118,1,.08);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.calendar-day:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(80,118,1,.15);
  border-color: rgba(80,118,1,.35);
}

.calendar-day.inactive{
  opacity: .45;
  background: #f3f7f3;
}

.calendar-day.selected{
  border-color: transparent;
  background: linear-gradient(140deg, rgba(80,118,1,.12), rgba(102,150,2,.2));
  box-shadow: 0 0 0 2px rgba(80,118,1,.25);
}

.calendar-date{
  margin-top: 0;
  padding-top: 0;
  font-weight: 600;
}

.calendar-dot{
  position: absolute;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(80,118,1,.45);
}

.calendar-dot.complete{
  background: #22c55e;
}

.calendar-day .calendar-dot:nth-of-type(1){
  left: 10px;
}

.calendar-day .calendar-dot:nth-of-type(2){
  left: 20px;
}

.calendar-day .calendar-dot:nth-of-type(3){
  left: 30px;
}

.history-external{
  border-top: 1px dashed var(--border);
  margin-top: 1rem;
  padding-top: .75rem;
}

.history-external-title{
  margin-bottom: .5rem;
}

.history-external-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .6rem;
}

.history-external-list li{
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.history-external-row{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  align-items: baseline;
}

.history-external-list .pill-link{
  margin-top: .1rem;
  align-self: flex-start;
}

.history-detail header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.history-metrics{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}

.history-metrics > div{
  background: var(--soft);
  border-radius: 12px;
  padding: .6rem .75rem;
  display: flex;
  gap: .35rem;
  align-items: baseline;
  justify-content: center;
}

.history-workout{
  border-top: 1px dashed var(--border);
  padding-top: .75rem;
  margin-top: .75rem;
}

.history-workout-title{
  margin-bottom: .5rem;
}

.history-exercises{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}

.summary-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.history-summary-layout{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  align-items: start;
}

.history-summary-card{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-summary-card > header{
  margin-bottom: .75rem;
}

.history-pb-card{
  gap: .95rem;
}

@media (min-width: 1100px){
  .history-layout{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .history-layout > .card{
    margin-top: 0 !important;
    align-self: start;
  }
  .history-summary-layout{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .history-summary-layout > .card{
    margin-top: 0 !important;
    align-self: start;
  }
}

@media (min-width: 1280px){
  body.user-dashboard-page .shell > .container{
    width:min(100%, 1440px);
    max-width:1440px;
    padding-inline:1.5rem;
  }

  body.history-page .shell > .container{
    width:min(100%, 1320px);
    max-width:1320px;
    padding-inline:1.5rem;
  }

  body.history-page .history-layout{
    grid-template-columns:minmax(480px, .9fr) minmax(0, 1.1fr);
    gap:1.1rem;
  }

  body.history-page .history-calendar{
    position:sticky;
    top:1.5rem;
  }

  body.history-page .calendar-day{
    min-height:60px;
  }

  body.history-page .history-summary-layout{
    grid-template-columns:minmax(340px, .72fr) minmax(0, 1.28fr);
    gap:1.5rem;
  }

  body.history-page .history-detail,
  body.history-page .history-summary-card{
    padding:1.25rem 1.35rem;
  }

  body.history-page .history-metrics{
    grid-template-columns:repeat(auto-fit, minmax(132px, 1fr));
  }
}

.history-pb-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  flex-wrap: wrap;
}

.history-pb-search{
  width: min(100%, 280px);
  margin: 0;
}

.history-pb-search-field{
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}

.history-pb-search-field .nav-icon-lucide{
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  pointer-events: none;
}

.history-pb-search-field input{
  width: 100%;
  min-height: 2.7rem;
  padding: 0 .95rem 0 3.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--ink);
}

.history-pb-search-field input:focus{
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.history-pb-item-btn{
  width: 100%;
  display: grid;
  gap: .2rem;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: .18rem 0;
  cursor: pointer;
}

.history-pb-item-btn:hover,
.history-pb-item-btn:focus,
.history-pb-item-btn:focus-visible{
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.history-pb-trend-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5200;
}

.history-pb-trend-modal.is-open{
  display: block;
}

.history-pb-trend-modal .modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(22,25,22,.52);
  z-index: 0;
}

.history-pb-trend-card{
  position: relative;
  z-index: 2;
  width: clamp(320px, 96vw, 1800px);
  height: clamp(360px, 94dvh, 1200px);
  max-height: none;
  margin: min(1.2vh, .6rem) auto 0;
  overflow: auto;
  overflow-x: hidden;
}

.history-pb-trend-chart-shell{
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: clamp(280px, calc(94dvh - 258px), 980px);
  min-height: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--soft) 72%, transparent);
  padding: .65rem;
  /* Clip the chart to its shell, matching .progress-chart-shell: the svg takes
     a pixel height from the measured shell and can exceed its content box. */
  overflow: hidden;
}

.history-pb-trend-chart-shell svg{
  width: 100%;
  height: 100%;
  display: block;
}

.history-pb-grid{
  stroke: color-mix(in srgb, var(--muted) 24%, transparent);
  stroke-width: 1;
}

.history-pb-line{
  fill: none;
  stroke: #689901;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 8px rgba(104,153,1,.28));
  transition: stroke-dashoffset 1.1s cubic-bezier(.4,.05,.2,1);
}

/* Area + points start hidden and are revealed by the JS (Web Animations API). */
.history-pb-area{ opacity: 0; }

.history-pb-point{
  fill: #ffffff;
  stroke: #689901;
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
  transition: r .16s ease, stroke-width .16s ease;
}
/* Active (hovered / tapped) milestone — subtle, not a heavy blob. */
.history-pb-point--active{
  r: 5;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 3px rgba(104,153,1,.4));
}
/* Invisible, generous tap/hover target over each milestone. */
.history-pb-hit{
  fill: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce){
  .history-pb-line{ transition: none; stroke-dashoffset: 0 !important; }
  .history-pb-area{ opacity: 1; }
  .history-pb-point{ opacity: 1; }
}

.history-pb-axis-label{
  fill: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

/* Position is owned by the chart renderer, which clamps the card inside the
   shell — a transform here would double the horizontal offset and push the
   text off-screen on narrow viewports. */
.history-pb-trend-tooltip{
  position: absolute;
  display: grid;
  gap: .08rem;
  pointer-events: none;
  z-index: 6;
  background: rgba(22,25,22,.94);
  color: #f8fafc;
  border-radius: 9px;
  padding: .42rem .56rem;
  min-width: 92px;
  max-width: calc(100% - 12px);
  text-align: left;
  border: 1px solid rgba(159,163,160,.3);
}
.history-pb-trend-tooltip[hidden]{ display:none; }

.history-pb-trend-tooltip strong{
  font-size: .88rem;
}

.history-pb-trend-tooltip span{
  font-size: .74rem;
  color: rgba(229,233,229,.9);
  overflow-wrap: anywhere;
}

/* Ensure PB trend modal can exceed base .modal-card width constraints. */
.modal-card.history-pb-trend-card{
  width: clamp(360px, 98vw, 1900px) !important;
  max-width: none !important;
  height: clamp(420px, 95dvh, 1280px) !important;
  max-height: none !important;
}

.modal-card.history-pb-trend-card .modal-header strong{
  font-size: clamp(1.1rem, 1.2vw, 1.35rem);
}

.modal-card.history-pb-trend-card .modal-header .muted.small{
  font-size: clamp(.95rem, .9vw, 1.05rem);
}

.modal-card.history-pb-trend-card .history-pb-trend-chart-shell{
  height: clamp(340px, calc(95dvh - 248px), 1040px) !important;
}

@media (min-width: 761px){
  body.app[data-desktop-sidebar="1"] .history-pb-trend-modal{
    left: var(--progress-modal-sidebar-width, 220px);
    width: calc(100vw - var(--progress-modal-sidebar-width, 220px));
  }
  body.app[data-desktop-sidebar="1"] .history-pb-trend-card{
    width: min(1800px, calc(100vw - var(--progress-modal-sidebar-width, 220px) - 1.5rem));
  }
  body.app[data-desktop-sidebar="1"] .modal-card.history-pb-trend-card{
    width: min(1900px, calc(100vw - var(--progress-modal-sidebar-width, 220px) - 1.5rem)) !important;
  }
}

@media (max-width: 920px){
  .history-pb-trend-card{
    width: calc(100vw - .5rem);
    height: calc(100dvh - .5rem);
    margin: .25rem auto 0;
  }

  .history-pb-trend-chart-shell{
    height: clamp(240px, calc(100dvh - 268px), 78dvh);
  }
}

@media (max-width: 760px){
  .history-pb-trend-modal{
    inset: var(--appbar-height, 72px) 0 calc(var(--mobile-nav-height, 78px) + env(safe-area-inset-bottom, 0px)) 0;
    z-index: 8;
    padding: .35rem;
    overflow: auto;
    overflow-x: hidden;
  }
  .history-pb-trend-modal.is-open{
    padding-top: .35rem;
    padding-bottom: .35rem;
  }
  .history-pb-trend-card{
    width: min(100%, 100vw - .7rem);
    height: auto;
    max-height: calc(100dvh - var(--appbar-height, 72px) - var(--mobile-nav-height, 78px) - env(safe-area-inset-bottom, 0px) - .7rem);
    margin: 0 auto;
    overflow: auto;
  }
  .history-pb-trend-chart-shell{
    height: clamp(220px, calc(100dvh - var(--appbar-height, 72px) - var(--mobile-nav-height, 78px) - 238px), 62dvh) !important;
    min-height: 220px;
  }
  .history-pb-head{
    align-items: stretch;
    gap: .6rem;
  }
  .history-pb-search{
    width: 100%;
    max-width: none;
  }
  .history-pb-search-field input{
    min-height: 2.6rem;
  }
  .pb-row{
    gap: .62rem;
    padding: .62rem .72rem;
  }
  .pb-row-meta{
    line-height: 1.25;
  }
}

@media (max-width: 820px){
  /* Run to the top of the viewport and pad the card down to clear the app bar,
     rather than starting the modal at the bar's measured height. The bar is
     opaque and paints above this (z-index 10 vs 8), and the solid background
     fills the strip behind it, so no sliver of the page underneath can appear
     between the two however the measured height rounds. */
  body.app[data-authenticated="1"] .history-pb-trend-modal{
    inset: 0 0 var(--mobile-nav-height, calc(78px + env(safe-area-inset-bottom, 0px))) 0 !important;
    z-index: 8 !important;
    padding: var(--appbar-height, 72px) 0 0 0 !important;
    background: var(--bg);
    overflow: hidden !important;
  }
  body.app[data-authenticated="1"] .history-pb-trend-modal.is-open{
    padding: var(--appbar-height, 72px) 0 0 0 !important;
  }
  body.app[data-authenticated="1"] .history-pb-trend-card{
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }
  body.app[data-authenticated="1"] .history-pb-trend-card .modal-body{
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }
  body.app[data-authenticated="1"] .history-pb-trend-chart-shell{
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
  }
}

.chart{
  display: grid;
  gap: .6rem;
}

.chart-row{
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .6rem;
  align-items: center;
}

.chart-label{
  font-weight: 600;
}

.chart-bars{
  display: grid;
  gap: .35rem;
}

.chart-bar{
  background: var(--soft);
  border-radius: 999px;
  padding: .3rem .5rem;
  font-size: .85rem;
  color: var(--ink);
}

.chart-bar.load{
  background: linear-gradient(90deg, rgba(80,118,1,.18), rgba(80,118,1,.4));
}

.chart-bar.reps{
  background: linear-gradient(90deg, rgba(96,141,4,.18), rgba(96,141,4,.35));
}

.filters{
  display: flex;
  gap: .5rem;
  margin: 1rem 0;
}

.filters a{
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.filters a.active{
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.section-title{
  font-size: 1.05rem;
  margin: 0 0 .6rem;
  letter-spacing: .02em;
  color: var(--ink);
}

.workout-stack{
  display: grid;
  gap: 1.25rem;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.workout-section{
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(80,118,1,.12);
}

.workout-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .65rem;
}


.workout-title{
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.workout-heading{
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}

.block-section{
  margin-top: .7rem;
  padding: .75rem 0 0;
  border-top: 2px solid rgba(80,118,1,.35);
}

.block-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}


.workout-head > form{
  order: 3;
}

.block-head > form{
  order: 3;
}

.block-toggle{
  border: 1px solid rgba(22,25,22,.12);
  background: rgba(22,25,22,.06);
  color: #161916;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}

.block-toggle .toggle-icon{
  line-height: 1;
}

.block-section.is-collapsed .block-body{
  display: none;
}

.block-title{
  font-weight: 600;
}

.exercise-list{
  display: grid;
  gap: .6rem;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.nutrition-layout{
  align-items: start;
}

@media (max-width: 900px){
  .nutrition-layout{
    grid-template-columns: 1fr;
  }
  .nutrition-layout .card{
    width: 100%;
  }
}

.nutrition-targets{
  margin-bottom: 1.25rem;
}

.water-card{
  margin-bottom: 1.25rem;
}

.water-celebration{
  position: fixed;
  inset: 0;
  z-index: 4900;
  overflow: hidden;
  contain: layout paint;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, visibility 0s linear .16s;
}

.water-celebration.is-active{
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.water-celebration-bubbles{
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.water-celebration-bubble{
  --bubble-drift: 0px;
  position: absolute;
  bottom: -3rem;
  border: 2px solid color-mix(in srgb, var(--brand) 72%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.82) 0 9%, color-mix(in srgb, var(--brand) 18%, transparent) 30%, transparent 72%);
  box-shadow: inset -2px -3px 8px color-mix(in srgb, var(--brand-2) 28%, transparent), 0 0 12px color-mix(in srgb, var(--brand) 18%, transparent);
  opacity: 0;
  will-change: transform, opacity;
  animation: water-celebration-bubble-rise 2.3s ease-out forwards;
}

@keyframes water-celebration-bubble-rise{
  0%{ opacity: 0; transform: translate3d(0, 0, 0) scale(.72); }
  12%{ opacity: .88; }
  78%{ opacity: .72; }
  100%{ opacity: 0; transform: translate3d(var(--bubble-drift), -112vh, 0) scale(1.12); }
}

.water-celebration-message{
  position: absolute;
  top: 18%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .75rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--color-border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-bg-secondary) 92%, var(--brand) 8%);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translate(-50%, .75rem) scale(.98);
  will-change: transform, opacity;
}

.water-celebration.is-active .water-celebration-message{
  animation: water-celebration-message-in 3.1s ease forwards;
}

.water-celebration-message .nav-icon-lucide{
  width: 1.5rem;
  height: 1.5rem;
  color: var(--brand);
  flex: 0 0 auto;
}

.water-celebration-message strong,
.water-celebration-message span{
  display: block;
}

.water-celebration-message span{
  margin-top: .1rem;
  color: var(--color-text-secondary);
  font-size: .82rem;
}

@keyframes water-celebration-message-in{
  0%{ opacity: 0; transform: translate(-50%, .75rem) scale(.98); }
  10%, 78%{ opacity: 1; transform: translate(-50%, 0) scale(1); }
  100%{ opacity: 0; transform: translate(-50%, -.35rem) scale(.99); }
}

@media (max-width: 760px){
  .water-celebration-message{
    top: calc(var(--appbar-height, 4.5rem) + 1rem);
    width: calc(100vw - 2rem);
    max-width: 28rem;
    padding: .8rem .9rem;
  }
  .water-celebration-message > div{
    min-width: 0;
  }
  .water-celebration-message strong,
  .water-celebration-message span{
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px), (max-height: 520px){
  .water-celebration-message{
    top: calc(var(--appbar-height, 4rem) + .6rem);
    gap: .6rem;
    width: calc(100vw - 1.25rem);
    max-width: 28rem;
    padding: .7rem .8rem;
  }
  .water-celebration-message .nav-icon-lucide{
    width: 1.3rem;
    height: 1.3rem;
  }
}

.water-body{
  display: grid;
  gap: 1rem;
}

.water-bar{
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(22,25,22,.1);
  overflow: hidden;
  border: 1px solid var(--border);
}

.water-bar-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7bac2c, #567f00);
  transition: width .25s ease;
}

.water-bar-label{
  display: flex;
  justify-content: space-between;
  margin-top: .5rem;
  font-weight: 600;
}

.water-meta{
  font-size: .9rem;
}

.water-actions{
  display: grid;
  gap: .8rem;
}

.water-quick{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
}

.water-step{
  padding: .6rem .7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
}

.water-step-value{
  font-weight: 600;
}

.water-step-actions{
  display: flex;
  gap: .4rem;
}

.water-custom{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .6rem .7rem;
  background: rgba(255,255,255,.7);
}

.water-custom summary{
  cursor: pointer;
  font-weight: 600;
}

.water-custom-body{
  margin-top: .6rem;
  display: grid;
  gap: .5rem;
}

.water-custom-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.water-target-form{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}

.water-target-form label{
  min-width: 160px;
}

.water-goal-save-btn,
button.small.water-goal-save-btn{
  align-self: flex-end;
  min-height: 44px;
  height: 44px;
  padding: 0 1.1rem;
  border-radius: var(--btn-radius) !important;
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 600;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.water-goal-save-btn:hover,
.water-goal-save-btn:focus-visible,
button.small.water-goal-save-btn:hover,
button.small.water-goal-save-btn:focus-visible{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

@media (prefers-reduced-motion: reduce){
  .water-celebration{
    transition: none;
  }
  .water-celebration-bubbles{
    display: none;
  }
  .water-celebration.is-active .water-celebration-message{
    opacity: 1;
    transform: translate(-50%, 0);
    animation: none;
  }
}

.targets-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.targets-form.hidden{
  display: none;
}

.is-collapsed{
  display: none !important;
}

.targets-actions{
  display: flex;
  gap: .6rem;
  margin-top: .75rem;
  justify-content: space-between;
}

.targets-actions > button{
  flex: 1;
}

.target-rings{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px){
  .target-rings{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .target-ring{
    width: 140px;
    height: 140px;
  }
  .nutrition-targets{
    margin-bottom: .75rem;
  }
}

@media (max-width: 420px){
  .target-rings{
    gap: .6rem;
  }
  .target-ring{
    width: 128px;
    height: 128px;
    padding: 10px;
  }
  .target-ring .target-center{
    inset: 10px;
  }
  .nutrition-targets{
    padding: .75rem .9rem;
  }
}

.target-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .5rem;
}

.target-card .over{
  color: #b42318;
  font-weight: 600;
}

.target-ring{
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--ring-pct) * 1%), rgba(22,25,22,.08) 0);
  position: relative;
  padding: 12px;
}

.target-ring .target-center{
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .2rem;
  padding: 0 .35rem;
  line-height: 1.15;
}

.target-center .muted{
  font-size: .78rem;
}

.ring-label{
  display: inline-flex;
  align-items: center;
  gap: .32rem;
}

.ring-label-icon{
  width: .92rem;
  height: .92rem;
  stroke-width: 2.1;
}

/* Nutrition icon palette aligned with macro calculator icon colors */
.nutrition-actions .nav-icon-lucide{
  color: #81b430;
}

/* Generic nutrition icons: keep a consistent purple accent */
.nutrition-actions [data-lucide]{
  color: #81b430;
}

.nutrition-actions [data-lucide="droplet"]{
  color: #97d337;
}

/* Lucide runtime replaces i[data-lucide] with svg.lucide-*; keep both selectors */
.nutrition-actions .lucide-sliders-horizontal,
.nutrition-actions .lucide-utensils-crossed,
.nutrition-actions .lucide-square-plus,
.nutrition-actions .lucide-x{
  color: #81b430 !important;
}

.nutrition-actions .lucide-droplet{
  color: #97d337 !important;
}

#edit-targets-btn svg{
  color: #81b430 !important;
}

/* Strong scoped icon colors after Lucide replaces <i> with <svg> */
.nutrition-targets svg.lucide-beef,
.nutrition-targets svg.lucide-drumstick,
.nutrition-snapshot svg.lucide-beef,
.nutrition-snapshot svg.lucide-drumstick,
.macropro-shell svg.lucide-beef,
.macropro-shell svg.lucide-drumstick{
  color: #ff4d6d !important;
}

.nutrition-targets svg.lucide-wheat,
.nutrition-snapshot svg.lucide-wheat,
.macropro-shell svg.lucide-wheat{
  color: #22c55e !important;
}

.nutrition-targets svg.lucide-droplets,
.nutrition-snapshot svg.lucide-droplets,
.macropro-shell svg.lucide-droplets{
  color: #f97316 !important;
}

.nutrition-targets svg.lucide-flame,
.nutrition-snapshot svg.lucide-flame,
.macropro-shell svg.lucide-flame{
  color: #6d5bd0 !important;
}

.macropro-shell .macropro-support-grid svg.lucide-salad{
  color: #a16207 !important;
}

.macropro-shell .macropro-support-grid svg.lucide-droplet{
  color: #22d3ee !important;
}

/* Deterministic nutrient colors by semantic card class */
.target-card-protein svg,
.target-card-protein .ring-label-icon{
  color: #ff4d6d !important;
}
.target-card-carbs svg,
.target-card-carbs .ring-label-icon{
  color: #22c55e !important;
}
.target-card-fat svg,
.target-card-fat .ring-label-icon{
  color: #f97316 !important;
}
.target-card-calories svg,
.target-card-calories .ring-label-icon{
  color: #578004 !important;
}

/* Macro icon colors: protein red, carbs green, fat orange */
.ring-label-icon[data-lucide="beef"],
.macro-legend .macro-legend-icon[data-lucide="beef"]{
  color: #ff4d6d;
}

.ring-label-icon.lucide-beef,
.macro-legend .macro-legend-icon.lucide-beef{
  color: #ff4d6d !important;
}

.ring-label-icon.lucide-drumstick,
.macro-legend .macro-legend-icon.lucide-drumstick{
  color: #ff4d6d !important;
}

.ring-label-icon[data-lucide="wheat"],
.macro-legend .macro-legend-icon[data-lucide="wheat"]{
  color: #22c55e;
}

.ring-label-icon.lucide-wheat,
.macro-legend .macro-legend-icon.lucide-wheat{
  color: #22c55e !important;
}

.ring-label-icon[data-lucide="droplets"],
.macro-legend .macro-legend-icon[data-lucide="droplets"]{
  color: #f97316;
}

.ring-label-icon.lucide-droplets,
.macro-legend .macro-legend-icon.lucide-droplets{
  color: #f97316 !important;
}

.ring-label-icon[data-lucide="flame"]{
  color: #578004;
}

.ring-label-icon.lucide-flame{
  color: #578004 !important;
}

/* Nutrition subpage icon consistency (main, log, water, custom foods) */
.nutrition-actions [data-lucide="utensils-crossed"],
.nutrition-actions [data-lucide="square-plus"]{
  color: #81b430 !important;
}

.nutrition-actions [data-lucide="sliders-horizontal"],
.nutrition-actions [data-lucide="x"]{
  color: #81b430 !important;
}

/* Nutrition action-bar buttons should use the button text color, not the macro accent palette */
.nutrition-actions a .nav-icon-lucide,
.nutrition-actions button .nav-icon-lucide,
.nutrition-actions .pill-link .nav-icon-lucide,
.nutrition-actions a svg,
.nutrition-actions button svg,
.nutrition-actions .pill-link svg{
  color: currentColor !important;
}

#nutrition-date::-webkit-calendar-picker-indicator,
#water-date::-webkit-calendar-picker-indicator{
  opacity: .95;
  filter: hue-rotate(164deg) saturate(1.35) brightness(.9);
}

#nutrition-date::-moz-calendar-picker-indicator,
#water-date::-moz-calendar-picker-indicator{
  opacity: .95;
}

.results-toggle-icon{
  color: #81b430;
  background: rgba(129,180,48,.10);
  border-color: rgba(129,180,48,.26);
}

.results-toggle-icon[data-lucide="minus"]{
  color: #81b430;
  background: rgba(129,180,48,.10);
  border-color: rgba(129,180,48,.26);
}

.results-heading{
  font-weight: 600;
  color: #161916;
  margin-top: .6rem;
}

.nutrition-snapshot{
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.snapshot-left{
  flex: 1.2;
  min-width: 0;
}

.snapshot-title{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .6rem;
}

.snapshot-ring{
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.macro-ring{
  --protein-color: #ff4d6d;
  --carb-color: #22c55e;
  --fat-color: #f97316;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--border) 0deg 360deg);
  position: relative;
  padding: 14px;
  box-shadow: 0 18px 32px rgba(15,23,42,.12);
}

.macro-ring .ring-center{
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .2rem;
  padding: 0 .4rem;
  line-height: 1.15;
}

.water-ring-card{
  display: flex;
  align-items: center;
  justify-content: center;
}

.water-ring{
  --water-color: #8dc337;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--water-color) 0deg, rgba(22,25,22,.08) 0);
  position: relative;
  padding: 12px;
  box-shadow: 0 16px 28px rgba(22,25,22,.12);
}

.water-ring .ring-center{
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .2rem;
  padding: 0 .35rem;
  line-height: 1.15;
}

.ring-value{
  font-size: 1.4rem;
  font-weight: 700;
}

.target-center .ring-value,
.macro-ring .ring-center .ring-value,
.water-ring .ring-center .ring-value{
  font-size: 1.2rem;
}

.macro-legend{
  display: grid;
  gap: .4rem;
  font-size: .95rem;
}

.macro-legend > div{
  display: inline-flex;
  align-items: center;
  gap: .28rem;
}

.macro-legend .dot{
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: .12rem;
}

.macro-legend .macro-legend-icon{
  width: .82rem;
  height: .82rem;
  stroke-width: 2.1;
}

.macro-legend .dot.protein{ background: #ff4d6d; }
.macro-legend .dot.carbs{ background: #22c55e; }
.macro-legend .dot.fat{ background: #f97316; }

.snapshot-meals{
  flex: .8;
  min-width: 200px;
}

.snapshot-subhead{
  font-weight: 600;
  margin-bottom: .6rem;
}

.snapshot-meal-list{
  display: grid;
  gap: .5rem;
}

.snapshot-meal{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
}

.food-results{
  display: grid;
  gap: .6rem;
  margin-top: .75rem;
}

.food-results.collapsed{
  display: none;
}

.meal-builder{
  display: grid;
  gap: .6rem;
  margin-top: .75rem;
}

.meal-builder-actions{
  display: flex;
  gap: .7rem .6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: .75rem;
}

.meal-log-subhead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  font-weight: 600;
  margin-top: .5rem;
}

.food-info summary{
  cursor: pointer;
  font-weight: 600;
}

.food-info-summary{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  list-style: none;
  font-weight: 700;
}

.food-info-summary::-webkit-details-marker{
  display: none;
}

.food-info-summary::before{
  content: "\25B8";
  color: #9fa3a0;
  font-size: .82rem;
  line-height: 1;
  transform: translateY(-1px);
}

.food-info[open] > .food-info-summary::before{
  content: "\25BE";
}

.food-inline-icon{
  width: 16px;
  height: 16px;
  color: #707471;
  flex: 0 0 auto;
}

.food-about-text{
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: visible;
  padding-right: .1rem;
  text-overflow: ellipsis;
}

.food-about-wrap{
  display: flex;
  align-items: flex-end;
  gap: .3rem;
}

.food-about-wrap.is-collapsed .food-about-text{
  overflow: hidden;
}

.food-about-wrap.is-expanded .food-about-text{
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.food-about-toggle{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: #707471;
  width: auto;
  height: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none !important;
}

.food-about-toggle:hover{
  color: #3e413e;
}

.custom-food{
  margin-top: 1rem;
}

.custom-food-import{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(159,163,160,.18);
}

.custom-food-import-copy{
  display: grid;
  gap: .25rem;
}

.custom-food-barcode-open{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}

#log-food-barcode-open,
#log-food-nutrition-open,
#barcode-ocr-trigger,
#barcode-ocr-upload-trigger,
#barcode-import-submit,
#nutrition-ocr-trigger,
#nutrition-ocr-upload-trigger{
  min-height: 48px;
  padding: .82rem 1.15rem;
  border-radius: 14px;
}

#barcode-ocr-trigger,
#barcode-ocr-upload-trigger,
#barcode-import-submit,
#nutrition-ocr-trigger,
#nutrition-ocr-upload-trigger{
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-trigger,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-import-submit,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-trigger,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: #727673 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-trigger:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-trigger:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-trigger:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-import-submit:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-import-submit:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #barcode-import-submit:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:focus-visible{
  border-color: rgba(209,213,210,.42) !important;
  background: #7e817e !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-trigger,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-import-submit,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-trigger,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #161917 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-trigger:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-trigger:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-trigger:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-ocr-upload-trigger:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-import-submit:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-import-submit:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #barcode-import-submit:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-trigger:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #nutrition-ocr-upload-trigger:focus-visible{
  border-color: rgba(209,213,210,1) !important;
  background: #f8fafc !important;
  background-image: none !important;
  color: #161916 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.custom-food-barcode-preview{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(123,172,44,.18);
  background: linear-gradient(180deg, rgba(245,249,245,.96), rgba(248,250,252,.98));
}

.custom-food-barcode-preview[hidden],
.custom-food-barcode-preview[data-preview-active="0"]{
  display: none !important;
}

.custom-food-barcode-preview-media{
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(123,172,44,.08);
  border: 1px solid rgba(123,172,44,.16);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
}

.custom-food-barcode-preview-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.custom-food-barcode-preview-fallback{
  color: #7bac2c;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.custom-food-barcode-preview-fallback[hidden]{
  display: none !important;
}

.custom-food-barcode-preview-media.has-image{
  background: transparent;
}

.custom-food-barcode-preview-media.has-image .custom-food-barcode-preview-fallback{
  display: none !important;
}

.custom-food-barcode-preview-fallback .nav-icon-lucide{
  width: 1.7rem;
  height: 1.7rem;
  stroke-width: 2.1;
}

.custom-food-barcode-preview-copy{
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.custom-food-barcode-preview-copy strong{
  line-height: 1.25;
}

.custom-food-barcode-preview-note{
  color: #52731f;
  font-size: .92rem;
}

.custom-food-barcode-card{
  max-width: 560px;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(90vh, 760px);
  margin: 1rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.custom-food-barcode-head{
  align-items: flex-start;
}

.custom-food-barcode-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(185,28,28,.42);
  background: rgba(127,29,29,.14);
  color: #7f1d1d;
  flex: 0 0 auto;
  box-shadow: none !important;
  outline: none !important;
}

.custom-food-barcode-body{
  display: grid;
  gap: 1rem;
  min-height: 0;
  overflow-y: auto;
}

.custom-food-barcode-hero{
  display: grid;
  justify-items: center;
  gap: .65rem;
  text-align: center;
}

.custom-food-barcode-hero-icon{
  width: 160px;
  height: 160px;
  border-radius: 24px;
  border: 1px dashed rgba(131,181,50,.28);
  background: rgba(22,25,22,.035);
  display: grid;
  place-items: center;
  color: #9fa3a0;
  position: relative;
  overflow: hidden;
}

.custom-food-barcode-hero-icon .nav-icon-lucide{
  width: 2rem;
  height: 2rem;
  position: relative;
  z-index: 2;
}

.custom-food-barcode-guide{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  height: 34%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(151,211,55,.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(151,211,55,.1), rgba(151,211,55,0)),
    rgba(22,25,22,.08);
  box-shadow: inset 0 0 0 1px rgba(22,25,22,.24);
}

.custom-food-barcode-guide::before{
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(151,211,55,.08), rgba(151,211,55,.72), rgba(151,211,55,.08));
}

.custom-food-nutrition-guide{
  width: 74%;
  height: 66%;
}

.custom-food-nutrition-guide::before{
  left: 10%;
  right: 10%;
  top: 14%;
  height: 1px;
  transform: none;
  background: linear-gradient(90deg, rgba(151,211,55,.16), rgba(151,211,55,.55), rgba(151,211,55,.16));
  box-shadow:
    0 28px 0 rgba(151,211,55,.2),
    0 56px 0 rgba(151,211,55,.2),
    0 84px 0 rgba(151,211,55,.2);
}

.custom-food-barcode-actions{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  justify-content: stretch;
}

.custom-food-barcode-actions > *{
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

#barcode-import-status,
#nutrition-ocr-status{
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  min-height: 2.9em;
}

.nutrition-ocr-status{
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 3rem;
  padding: .75rem .9rem;
  border-radius: 16px;
  background: rgba(22,25,22,.04);
  color: #3e413e;
}

.nutrition-ocr-status[hidden]{
  display: none;
}

.nutrition-ocr-status-icon{
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

.nutrition-ocr-status-label{
  min-width: 0;
  font-weight: 600;
}

.nutrition-ocr-status-body{
  display: grid;
  gap: .45rem;
  width: 100%;
}

.nutrition-ocr-progress{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
}

.nutrition-ocr-progress-track{
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(159,163,160,.35);
  overflow: hidden;
}

.nutrition-ocr-progress-fill{
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #83b632, #97d337);
  transition: width .18s linear;
}

.nutrition-ocr-progress-text{
  font-size: .8rem;
  font-weight: 700;
  color: inherit;
  min-width: 2.2rem;
  text-align: right;
}

.nutrition-ocr-retry-wrap{
  margin-top: .45rem;
}

.nutrition-ocr-retry-wrap[hidden]{
  display: none;
}

.nutrition-ocr-status[data-state="scanning"]{
  background: rgba(104,146,36,.09);
  color: #52731f;
}

.nutrition-ocr-status[data-state="scanning"] .nutrition-ocr-status-icon{
  border: 2px solid rgba(104,146,36,.58);
  border-radius: 8px;
  overflow: hidden;
}

.nutrition-ocr-status[data-state="scanning"] .nutrition-ocr-status-icon::before{
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 5px;
  border-top: 1px solid rgba(104,146,36,.35);
  border-bottom: 1px solid rgba(104,146,36,.35);
}

.nutrition-ocr-status[data-state="scanning"] .nutrition-ocr-status-icon::after{
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: -35%;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(151,211,55,.2), rgba(151,211,55,.95), rgba(151,211,55,.2));
  box-shadow: 0 0 14px rgba(151,211,55,.45);
  animation: nutrition-scan-sweep 1.1s linear infinite;
}

.nutrition-ocr-status[data-state="complete"]{
  background: rgba(22,163,74,.1);
  color: #166534;
}

.nutrition-ocr-status[data-state="complete"] .nutrition-ocr-status-icon{
  border-radius: 999px;
  background: rgba(22,163,74,.16);
  border: 2px solid rgba(22,163,74,.48);
}

.nutrition-ocr-status[data-state="complete"] .nutrition-ocr-status-icon::before{
  content: "";
  position: absolute;
  left: 27%;
  top: 18%;
  width: 34%;
  height: 58%;
  border-right: 2px solid #16a34a;
  border-bottom: 2px solid #16a34a;
  transform: rotate(42deg);
}

.nutrition-ocr-status[data-state="error"]{
  background: rgba(127,29,29,.08);
  color: #991b1b;
}

.nutrition-ocr-status[data-state="error"] .nutrition-ocr-status-icon{
  display: none;
}

@keyframes nutrition-scan-sweep{
  0%{
    left: -35%;
  }
  100%{
    left: 100%;
  }
}

.custom-food-barcode-actions #barcode-open-camera[disabled]{
  opacity: .72;
  cursor: not-allowed;
}

.custom-food-scanner-panel{
  display: grid;
  gap: .65rem;
}

.custom-food-scanner-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(104,153,1,.16), transparent 55%),
    rgba(6,8,6,.92);
  border: 1px solid rgba(131,181,50,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.custom-food-scanner-video{
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(6,8,6,.92);
  opacity: 0;
  transition: opacity .16s ease;
}

.custom-food-scanner-video.is-ready{
  opacity: 1;
}

.custom-food-scanner-placeholder{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(197,201,198,.9);
  background:
    linear-gradient(180deg, rgba(9,12,10,.2), rgba(9,12,10,.36)),
    url("/static/img/camera-preview.png") center center / cover no-repeat;
}

.custom-food-scanner-placeholder[hidden]{
  display: none !important;
}

.custom-food-scanner-placeholder .nav-icon-lucide{
  display: none;
}

.custom-food-scanner-still{
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(6,8,6,.92);
}

.custom-food-scanner-still[hidden]{
  display: none;
}

.custom-food-scanner-overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.custom-food-scanner-overlay::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(141,195,55,.92);
  border-radius: 20px;
  box-shadow:
    0 0 0 999px rgba(6,8,6,.34),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.custom-food-scanner-overlay::after{
  content: "";
  position: absolute;
  left: 50%;
  width: 70%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(151,211,55,0), rgba(151,211,55,.82), rgba(151,211,55,0));
  box-shadow: 0 0 18px rgba(151,211,55,.45);
}

.custom-food-scanner-overlay-barcode::before{
  width: 78%;
  height: 38%;
  border-radius: 14px;
}

.custom-food-scanner-overlay-barcode::after{
  top: 50%;
  height: 2px;
}

.custom-food-scanner-overlay-nutrition::before{
  width: 74%;
  height: 62%;
}

.custom-food-scanner-overlay-nutrition::after{
  top: 18%;
  height: 1px;
}

.custom-food-barcode-modal{
  z-index: 5200;
}

.custom-food-barcode-modal .modal-backdrop{
  background: rgba(9,11,9,.74);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 0;
}

.custom-food-barcode-modal .modal-card,
.custom-food-barcode-modal .modal-body,
.custom-food-barcode-modal .custom-food-barcode-actions{
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

html[data-theme="dark"] .custom-food-barcode-close{
  border-color: rgba(248,113,113,.42);
  background: rgba(127,29,29,.28);
  color: #fca5a5;
}

.custom-food-barcode-close,
.custom-food-barcode-close:hover,
.custom-food-barcode-close:focus,
.custom-food-barcode-close:focus-visible,
.custom-food-barcode-close:active{
  border-color: rgba(185,28,28,.42) !important;
  background: rgba(127,29,29,.14) !important;
  color: #7f1d1d !important;
  transform: none !important;
}

html[data-theme="dark"] .custom-food-barcode-close,
html[data-theme="dark"] .custom-food-barcode-close:hover,
html[data-theme="dark"] .custom-food-barcode-close:focus,
html[data-theme="dark"] .custom-food-barcode-close:focus-visible,
html[data-theme="dark"] .custom-food-barcode-close:active{
  border-color: rgba(248,113,113,.42) !important;
  background: rgba(127,29,29,.28) !important;
  color: #fca5a5 !important;
}

body.authenticated [aria-label^="Close"],
body.authenticated [data-modal-close],
body.authenticated [data-payment-automation-close],
body.authenticated .subtle-danger-icon-btn,
body.authenticated .custom-food-barcode-close,
body.authenticated .coach-payment-automation-close-btn,
body.authenticated .coach-automation-close-btn,
body.authenticated .locker-share-close-btn,
body.authenticated .coach-payment-share-close{
  border: 0 !important;
  background: transparent !important;
  color: #b91c1c !important;
  box-shadow: none !important;
}

body.authenticated [aria-label^="Close"]:hover,
body.authenticated [aria-label^="Close"]:focus,
body.authenticated [aria-label^="Close"]:focus-visible,
body.authenticated [aria-label^="Close"]:active,
body.authenticated [data-modal-close]:hover,
body.authenticated [data-modal-close]:focus,
body.authenticated [data-modal-close]:focus-visible,
body.authenticated [data-modal-close]:active,
body.authenticated [data-payment-automation-close]:hover,
body.authenticated [data-payment-automation-close]:focus,
body.authenticated [data-payment-automation-close]:focus-visible,
body.authenticated [data-payment-automation-close]:active,
body.authenticated .subtle-danger-icon-btn:hover,
body.authenticated .subtle-danger-icon-btn:focus,
body.authenticated .subtle-danger-icon-btn:focus-visible,
body.authenticated .subtle-danger-icon-btn:active,
body.authenticated .custom-food-barcode-close:hover,
body.authenticated .custom-food-barcode-close:focus,
body.authenticated .custom-food-barcode-close:focus-visible,
body.authenticated .custom-food-barcode-close:active,
body.authenticated .coach-payment-automation-close-btn:hover,
body.authenticated .coach-payment-automation-close-btn:focus,
body.authenticated .coach-payment-automation-close-btn:focus-visible,
body.authenticated .coach-payment-automation-close-btn:active,
body.authenticated .coach-automation-close-btn:hover,
body.authenticated .coach-automation-close-btn:focus,
body.authenticated .coach-automation-close-btn:focus-visible,
body.authenticated .coach-automation-close-btn:active,
body.authenticated .locker-share-close-btn:hover,
body.authenticated .locker-share-close-btn:focus,
body.authenticated .locker-share-close-btn:focus-visible,
body.authenticated .locker-share-close-btn:active,
body.authenticated .coach-payment-share-close:hover,
body.authenticated .coach-payment-share-close:focus,
body.authenticated .coach-payment-share-close:focus-visible,
body.authenticated .coach-payment-share-close:active{
  border: 0 !important;
  background: transparent !important;
  color: #991b1b !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.authenticated [aria-label^="Close"],
html[data-theme="dark"] body.authenticated [data-modal-close],
html[data-theme="dark"] body.authenticated [data-payment-automation-close],
html[data-theme="dark"] body.authenticated .subtle-danger-icon-btn,
html[data-theme="dark"] body.authenticated .custom-food-barcode-close,
html[data-theme="dark"] body.authenticated .coach-payment-automation-close-btn,
html[data-theme="dark"] body.authenticated .coach-automation-close-btn,
html[data-theme="dark"] body.authenticated .locker-share-close-btn,
html[data-theme="dark"] body.authenticated .coach-payment-share-close{
  border: 0 !important;
  background: transparent !important;
  color: #fca5a5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.authenticated [aria-label^="Close"]:hover,
html[data-theme="dark"] body.authenticated [aria-label^="Close"]:focus,
html[data-theme="dark"] body.authenticated [aria-label^="Close"]:focus-visible,
html[data-theme="dark"] body.authenticated [aria-label^="Close"]:active,
html[data-theme="dark"] body.authenticated [data-modal-close]:hover,
html[data-theme="dark"] body.authenticated [data-modal-close]:focus,
html[data-theme="dark"] body.authenticated [data-modal-close]:focus-visible,
html[data-theme="dark"] body.authenticated [data-modal-close]:active,
html[data-theme="dark"] body.authenticated [data-payment-automation-close]:hover,
html[data-theme="dark"] body.authenticated [data-payment-automation-close]:focus,
html[data-theme="dark"] body.authenticated [data-payment-automation-close]:focus-visible,
html[data-theme="dark"] body.authenticated [data-payment-automation-close]:active,
html[data-theme="dark"] body.authenticated .subtle-danger-icon-btn:hover,
html[data-theme="dark"] body.authenticated .subtle-danger-icon-btn:focus,
html[data-theme="dark"] body.authenticated .subtle-danger-icon-btn:focus-visible,
html[data-theme="dark"] body.authenticated .subtle-danger-icon-btn:active,
html[data-theme="dark"] body.authenticated .custom-food-barcode-close:hover,
html[data-theme="dark"] body.authenticated .custom-food-barcode-close:focus,
html[data-theme="dark"] body.authenticated .custom-food-barcode-close:focus-visible,
html[data-theme="dark"] body.authenticated .custom-food-barcode-close:active,
html[data-theme="dark"] body.authenticated .coach-payment-automation-close-btn:hover,
html[data-theme="dark"] body.authenticated .coach-payment-automation-close-btn:focus,
html[data-theme="dark"] body.authenticated .coach-payment-automation-close-btn:focus-visible,
html[data-theme="dark"] body.authenticated .coach-payment-automation-close-btn:active,
html[data-theme="dark"] body.authenticated .coach-automation-close-btn:hover,
html[data-theme="dark"] body.authenticated .coach-automation-close-btn:focus,
html[data-theme="dark"] body.authenticated .coach-automation-close-btn:focus-visible,
html[data-theme="dark"] body.authenticated .coach-automation-close-btn:active,
html[data-theme="dark"] body.authenticated .locker-share-close-btn:hover,
html[data-theme="dark"] body.authenticated .locker-share-close-btn:focus,
html[data-theme="dark"] body.authenticated .locker-share-close-btn:focus-visible,
html[data-theme="dark"] body.authenticated .locker-share-close-btn:active,
html[data-theme="dark"] body.authenticated .coach-payment-share-close:hover,
html[data-theme="dark"] body.authenticated .coach-payment-share-close:focus,
html[data-theme="dark"] body.authenticated .coach-payment-share-close:focus-visible,
html[data-theme="dark"] body.authenticated .coach-payment-share-close:active{
  border: 0 !important;
  background: transparent !important;
  color: #f87171 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .custom-food-barcode-modal .modal-card{
  z-index: 2;
  position: relative;
}

html[data-theme="dark"] .custom-food-scanner-frame{
  border-color: rgba(141,195,55,.26);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.nutrition-search-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: .75rem;
}

.custom-food-import-head{
  margin-bottom: 1rem;
}

.nutrition-search-head > header{
  margin: 0;
}

.nutrition-search-actions{
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.custom-food summary{
  cursor: pointer;
  font-weight: 600;
  margin-bottom: .5rem;
}

.custom-food-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}

.custom-food button{
  margin-top: .75rem;
}

@media (max-width: 720px){
  .custom-food-import{
    flex-direction: column;
    align-items: stretch;
  }

  .custom-food-barcode-open{
    justify-content: center;
  }

  .custom-food-barcode-preview{
    grid-template-columns: 1fr;
  }

  .custom-food-barcode-actions{
    justify-content: stretch;
  }

  .custom-food-barcode-actions > *{
    width: 100%;
  }

  .custom-food-barcode-modal{
    --scan-modal-top-offset: max(
      calc(var(--appbar-height, 0px) + .6rem),
      calc(max(.75rem, env(safe-area-inset-top)) + .55rem)
    );
    align-items: flex-start;
    overflow-y: auto;
    padding:
      var(--scan-modal-top-offset)
      max(.5rem, env(safe-area-inset-right))
      max(.75rem, env(safe-area-inset-bottom))
      max(.5rem, env(safe-area-inset-left));
  }

  .custom-food-barcode-card{
    width: min(560px, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height: calc(100dvh - var(--scan-modal-top-offset) - max(.75rem, env(safe-area-inset-bottom)));
    margin: 0 auto;
  }

  .custom-food-barcode-head{
    position: sticky;
    top: 0;
    z-index: 3;
    background: inherit;
  }

  .custom-food-barcode-body{
    gap: .7rem;
    padding-bottom: .9rem;
  }

  .custom-food-scanner-frame{
    aspect-ratio: 4 / 3;
    max-height: min(31dvh, 250px);
  }

  .custom-food-scanner-panel{
    gap: .5rem;
  }

  .custom-food-barcode-hero{
    gap: .45rem;
  }

  .custom-food-barcode-hero-icon{
    width: 120px;
    height: 120px;
  }

  .nutrition-search-head{
    flex-direction: column;
    align-items: stretch;
  }

  .nutrition-search-actions{
    width: 100%;
    justify-content: stretch;
  }

  .nutrition-search-actions > *{
    width: 100%;
  }

  .custom-food-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px), (max-height: 760px){
  .custom-food-barcode-card{
    width: min(560px, calc(100vw - .75rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }

  .custom-food-barcode-head{
    padding-bottom: .6rem;
  }

  .custom-food-barcode-head .muted{
    font-size: .9rem;
    line-height: 1.35;
  }

  .custom-food-barcode-body{
    gap: .6rem;
  }

  .custom-food-scanner-frame{
    border-radius: 18px;
    aspect-ratio: 10 / 7;
    max-height: min(27dvh, 210px);
  }

  .custom-food-scanner-overlay::before{
    border-radius: 16px;
  }

  .custom-food-barcode-actions{
    gap: .6rem;
  }

  .custom-food-barcode-actions > *{
    min-height: 44px;
    font-size: .95rem;
  }
}

@media (max-height: 680px){
  .custom-food-barcode-card{
    max-height: calc(100dvh - .5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .custom-food-barcode-head{
    padding-bottom: .5rem;
  }

  .custom-food-scanner-frame{
    aspect-ratio: 16 / 10;
    max-height: min(24dvh, 180px);
  }
}

@media (max-width: 380px), (max-height: 620px){
  .custom-food-barcode-modal{
    --scan-modal-top-offset: max(
      calc(var(--appbar-height, 0px) + .5rem),
      calc(max(.35rem, env(safe-area-inset-top)) + .45rem)
    );
    padding:
      var(--scan-modal-top-offset)
      max(.35rem, env(safe-area-inset-right))
      max(.35rem, env(safe-area-inset-bottom))
      max(.35rem, env(safe-area-inset-left));
  }

  .custom-food-barcode-card{
    width: min(560px, calc(100vw - .5rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height: calc(100dvh - var(--scan-modal-top-offset) - max(.35rem, env(safe-area-inset-bottom)));
    border-radius: 18px;
  }

  .custom-food-barcode-head{
    gap: .5rem;
    padding-bottom: .45rem;
  }

  .custom-food-barcode-head strong{
    font-size: 1rem;
  }

  .custom-food-barcode-head .muted{
    font-size: .84rem;
    line-height: 1.3;
  }

  .custom-food-barcode-close{
    width: 2.45rem;
    height: 2.45rem;
  }

  .custom-food-barcode-body{
    gap: .5rem;
    padding-bottom: .65rem;
  }

  .custom-food-scanner-panel{
    gap: .4rem;
  }

  .custom-food-scanner-frame{
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    max-height: min(21dvh, 150px);
  }

  .custom-food-scanner-overlay::before{
    border-radius: 14px;
  }

  .custom-food-barcode-actions{
    gap: .5rem;
  }

  .custom-food-barcode-actions > *{
    min-height: 42px;
    font-size: .92rem;
    padding: .7rem .8rem;
  }

  #barcode-import-input{
    min-height: 42px;
  }

  #barcode-import-status{
    font-size: .88rem;
    line-height: 1.3;
  }
}

.results-count{
  font-size: .9rem;
}

.results-toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: .75rem;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

.results-toggle:hover,
.results-toggle:focus,
.results-toggle:focus-visible,
.results-toggle:active{
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.results-toggle-icon{
  font-size: .92rem;
  font-weight: 700;
  line-height: 1;
  color: #161916;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(22,25,22,.06);
  border: 1px solid rgba(22,25,22,.12);
  flex: 0 0 auto;
}

.food-list.is-collapsed{
  display: none;
}

.results-more{
  margin-top: .5rem;
  background: rgba(22,25,22,.06);
  border: 1px solid rgba(22,25,22,.12);
  color: #161916;
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.results-more:hover{
  background: rgba(22,25,22,.1);
}

.quick-add-wrap{
  margin-top: .5rem;
}

.quick-add-select{
  width: 100%;
  padding: .55rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  color: #161916;
  font-size: .95rem;
}

.food-list{
  display: grid;
  gap: .6rem;
}

.food-row-simple{
  text-align: left;
  display: block;
  padding: .7rem .8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  width: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

.food-row-simple:hover,
.food-row-simple:focus,
.food-row-simple:focus-visible,
.food-row-simple:active{
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--border) !important;
  background: rgba(255,255,255,.7) !important;
}

.food-details{
  border: none;
}

.food-details summary{
  list-style: none;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

.food-details summary::-webkit-details-marker{
  display: none;
}

.food-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  cursor: pointer;
  background: transparent !important;
  outline: none;
  box-shadow: none;
}

.food-details summary:hover,
.food-details summary:focus,
.food-details summary:focus-visible,
.food-details summary:active,
.food-title-row:hover,
.food-title-row:focus,
.food-title-row:focus-visible,
.food-title-row:active{
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.food-cell-main{
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

.food-macro-line{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
  justify-content: flex-end;
  font-size: .85rem;
  color: #161917;
  white-space: nowrap;
}

.food-details-toggle{
  border: 0 !important;
  background: transparent !important;
  color: #707471;
  font-weight: 700;
  width: auto;
  height: auto;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  padding: 0 !important;
  outline: none !important;
}

.food-details-toggle:hover{
  background: transparent;
  color: #3e413e;
}

.food-details-toggle:focus-visible{
  outline: 2px solid rgba(104,153,1,.38);
  outline-offset: 3px;
}

.food-details-toggle .food-inline-icon,
.food-about-toggle .food-inline-icon{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.food-details-toggle:hover .food-inline-icon{
  color: #3e413e;
}

.food-macro-line strong{
  font-size: .95rem;
}

@media (max-width: 800px){
  .food-row-simple{
    grid-template-columns: 1fr;
  }
  .food-macro-line{
    justify-content: flex-start;
    white-space: normal;
  }
}

.food-title{
  font-weight: 600;
  color: #161916;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.food-verified-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
}

.food-verified-icon .nav-icon-lucide,
.food-verified-icon [data-lucide]{
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.food-meta{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: #525552;
}

.food-details .food-macro-line{
  margin-top: .5rem;
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: rgba(22,25,23,.08);
  color: #161917;
  font-size: .75rem;
  font-weight: 600;
}

.badge.complete{
  background: rgba(34,197,94,.16);
  color: #166534;
}

.badge.subtle{
  background: rgba(83,118,29,.12);
  color: #161916;
}

.food-row-simple:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.7);
}

.food-detail{
  margin-bottom: .75rem;
}

.food-live-macros{
  margin: .5rem 0 .25rem;
}

.food-log-list{
  display: grid;
  gap: .6rem;
  margin-top: .75rem;
}

.food-log-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.6);
  position: relative;
}

.food-log-main{
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  min-width: 0;
}

.log-select-checkbox{
  position: absolute;
  top: .5rem;
  right: .6rem;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.food-micros summary{
  cursor: pointer;
  font-weight: 600;
}

.food-micros-grid{
  margin-top: .5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .35rem .75rem;
  font-size: .9rem;
}

.food-log-row button{
  white-space: nowrap;
}

@media (max-width: 720px){
  .food-log-row{
    flex-direction: column;
    align-items: flex-start;
  }
  .food-log-row > div{
    width: 100%;
  }
  .food-log-row button{
    align-self: flex-start;
    margin-top: .35rem;
  }
}

.food-log-form .grid2 > label{
  min-width: 0;
}

.food-log-form input,
.food-log-form select{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.amount-field{
  display: flex;
  align-items: center;
  gap: .45rem;
}

.amount-field input{
  flex: 1;
}

.amount-unit{
  min-width: 30px;
  text-align: right;
  font-weight: 600;
  color: var(--muted);
}

.food-log-form > button{
  margin-top: .2rem;
  margin-bottom: .35rem;
}

.food-live-macros{
  margin-bottom: .2rem;
}

.nutrition-log{
  overflow: visible;
}

.metrics-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .6rem;
  margin-bottom: .75rem;
}

@media (max-width: 900px){
  .nutrition-snapshot{
    flex-direction: column;
  }
  .snapshot-ring{
    justify-content: flex-start;
  }
}

.exercise-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  border: 1px solid rgba(80,118,1,.12);
  border-radius: 16px;
  padding: .75rem .85rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf6 100%);
  box-shadow: 0 10px 22px rgba(38,41,39,.08);
}

.exercise-row > form:first-child,
.exercise-row > .exercise-template-notes,
.exercise-row > .exercise-media,
.exercise-row > .exercise-actuals{
  min-width: 0;
}

.exercise-template-notes{
  display: block;
  width: 100%;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.exercise-template-notes strong{
  color: var(--color-text-secondary);
}

/* Plan notes under the sets: three lines, then "Show more". */
.exercise-actuals .exercise-template-notes{
  margin-bottom: .5rem;
  font-size: .84rem;
  white-space: normal;
}
.exercise-template-notes-text{
  margin: 0;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.exercise-template-notes.is-expanded .exercise-template-notes-text{
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
html:not(#_) body.app[data-authenticated="1"] button.exercise-template-notes-toggle{
  display: inline-flex;
  width: auto;
  min-height: 0 !important;
  margin-top: .25rem;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--brand) !important;
  font-size: inherit;
  font-weight: 600;
}
/* Shown only when the notes run past three lines (day.html); the rule
   above would otherwise outrank [hidden] and show it every time. */
html:not(#_) body.app[data-authenticated="1"] button.exercise-template-notes-toggle[hidden],
.exercise-template-notes-toggle[hidden]{
  display: none !important;
}



.checklabel{
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  min-width: 0;
}

.exercise-thumb-inline{
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(159,163,160,.35);
  background: rgba(22,25,22,.18);
  flex: 0 0 46px;
}

/* Day view uses slightly smaller thumbs on desktop; plan editor stays compact */
#day-exercises .exercise-thumb-inline{
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.workout-builder .exercise-thumb-inline{
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 8px;
}

.checklabel input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: .15rem;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 2px solid #9fa3a0;
  background: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0 0;
  box-shadow: inset 0 0 0 0 rgba(80,118,1,0);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, background-size .18s ease, transform .15s ease;
  cursor: pointer;
}

.checklabel input[type="checkbox"]:hover{
  border-color: #707471;
  box-shadow: 0 0 0 3px rgba(112,116,113,.14);
}

.checklabel input[type="checkbox"]:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(112,116,113,.22);
}

.checklabel input[type="checkbox"]:checked{
  border-color: #166534;
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.7 11 12 5.7' fill='none' stroke='%23166534' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  box-shadow: none;
}

html[data-theme="dark"] .checklabel input[type="checkbox"]{
  border-color: #707471;
  background: transparent;
}

html[data-theme="dark"] .checklabel input[type="checkbox"]:checked{
  border-color: #166534;
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.7 11 12 5.7' fill='none' stroke='%23166534' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  box-shadow: none;
}

.checktext{
  display: grid;
  gap: .2rem;
  min-width: 0;
  word-break: break-word;
}

.exercise-previous-inline{
  font-size: .82rem;
  opacity: .92;
  margin-top: .05rem;
}

.exercise-previous-inline strong{
  font-weight: 700;
}

.exercise-set-lines{
  border: none;
  border-radius: 12px;
  padding: .45rem .55rem;
  margin: .35rem 0 .55rem;
  background: transparent;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.exercise-set-lines-head,
.exercise-set-line{
  display: grid;
  /* Previous-performance data has its own row below, leaving enough room for
     an editable per-set rest timer alongside load and reps. */
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) minmax(48px, .8fr) 62px;
  align-items: center;
  gap: .3rem;
}

.exercise-set-lines-head{
  font-size: .78rem;
  text-transform: none;
  letter-spacing: .04em;
  opacity: .7;
  margin-bottom: .2rem;
}

.exercise-set-lines-head span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .18rem;
  text-align: center;
  /* Allow the header cell to shrink with its fluid grid column instead of
     forcing the row wider than the screen (label clips before it overflows). */
  min-width: 0;
  overflow: hidden;
}

.exercise-set-lines-head .nav-icon-lucide{
  width: .82rem;
  height: .82rem;
  flex: 0 0 auto;
}

.exercise-set-lines-head span:last-child,
.exercise-set-lines-head span:last-child .nav-icon-lucide{
  overflow: visible;
}

.exercise-set-line{
  font-size: .84rem;
  padding: .2rem 0;
  border-radius: 8px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.exercise-set-line.is-set-done{
  background: rgba(34,197,94,.16);
}

.exercise-set-line.is-set-done span{
  color: #166534;
}

.exercise-row.is-set-saving .exercise-set-lines{
  opacity: .85;
}

.exercise-row.is-set-saving .exercise-set-line,
.exercise-row.is-set-saving .set-row-actions{
  pointer-events: none;
}

.exercise-set-line .set-value-input{
  width: 100%;
  min-height: 1.8rem;
  padding: .25rem .4rem;
  font-size: .78rem;
}

.exercise-set-line span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.exercise-set-line > span:first-child{
  text-align: center;
  display: inline-flex;
  justify-content: center;
}

.exercise-set-line > span:nth-child(2){
  justify-content: center;
}

.exercise-previous-summary{
  display: grid;
  gap: .35rem;
  padding: .6rem;
  margin-bottom: .5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  font-size: .84rem;
}

.exercise-previous-label{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}

.exercise-previous-date{
  margin-left: auto;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.exercise-previous-label .nav-icon-lucide{
  width: .9rem;
  height: .9rem;
  color: var(--muted);
}

.exercise-previous-values{
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .85rem;
  overflow-wrap: anywhere;
}

.exercise-previous-values > span{
  white-space: nowrap;
}

.exercise-set-line .set-value-input{
  text-align: center;
}

.exercise-set-lines-head span{
  white-space: nowrap;
}

.set-done-check{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  padding: 2px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.set-done-check input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 2px solid #9fa3a0;
  background: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0 0;
  box-shadow: inset 0 0 0 0 rgba(80,118,1,0);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, background-size .18s ease, transform .15s ease;
  cursor: pointer;
}

.set-done-check input[type="checkbox"]:hover{
  border-color: #707471;
  box-shadow: 0 0 0 3px rgba(112,116,113,.14);
}

.set-done-check input[type="checkbox"]:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(112,116,113,.22);
}

.set-done-check input[type="checkbox"]:checked{
  border-color: #166534;
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.7 11 12 5.7' fill='none' stroke='%23166534' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  box-shadow: none;
}

.set-add-btn{
  width: 100%;
  margin-top: .3rem;
  justify-content: center;
  min-height: 2rem;
  font-size: .85rem;
}

.set-row-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-top: .3rem;
  width: 100%;
}

.set-row-actions .set-add-btn,
.set-row-actions .set-remove-btn{
  width: 100%;
  margin-top: 0;
}

.day-edit-toggle .day-edit-done-icon,
.exercise-row.is-day-editing .day-edit-toggle .day-edit-icon{
  display: none;
}
.exercise-row.is-day-editing .day-edit-toggle .day-edit-done-icon{
  display: inline-block;
}
.exercise-row.is-day-editing .day-edit-toggle{
  color: var(--brand);
}

@media (min-width: 901px){
  .exercise-set-lines{
    width: 100%;
    max-width: none;
  }
}

html[data-theme="dark"] .exercise-set-lines{
  border: none;
  background: transparent;
}

html[data-theme="dark"] .exercise-set-line.is-set-done{
  background: rgba(34,197,94,.22);
}

html[data-theme="dark"] .exercise-set-line.is-set-done span{
  color: #dcfce7;
}

html[data-theme="dark"] .set-done-check input[type="checkbox"]{
  border-color: #707471;
}

.optimistic-pending{
  opacity: .65;
  filter: saturate(.9);
}

.optimistic-pending .pill-link,
.optimistic-pending button{
  pointer-events: none;
}

.toast-stack{
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  display: grid;
  gap: .6rem;
  z-index: 1200;
}

/* Full-screen loading overlay shown while a slower page (e.g. Edit workout) loads. */
.route-loading{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg, #101311) 66%, transparent);
  backdrop-filter: blur(2px);
}
.route-loading.is-visible{ display: flex; }
.route-loading-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow, 0 24px 60px rgba(6,8,6,.35));
  color: var(--color-text-primary);
}
.route-loading-spinner{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-top-color: var(--brand);
  animation: routeSpin .7s linear infinite;
}
@keyframes routeSpin{ to{ transform: rotate(360deg); } }
.route-loading-text{ font-weight: 600; }
@media (prefers-reduced-motion: reduce){ .route-loading-spinner{ animation: none; } }

/* Privacy Controls page */
/* Delete account sub-page: match the settings buttons — full-width rounded
   rectangle rather than the base pill shape. */
body.app .delete-account-card button,
body.app .delete-account-card a[role="button"]{
  width: 100%;
  border-radius: 12px !important;
  padding: 1.15rem 1.1rem !important;
  min-height: 60px !important;
}

.privacy-form{ display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.privacy-card{ padding: 20px; }
.privacy-card-head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.privacy-card-head--stacked{ align-items: center; }
.privacy-card-head p{ margin: 4px 0 0; }
.privacy-card-icon{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}
.privacy-switch{
  flex: 0 0 auto;
  margin-left: auto;
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.privacy-switch input{ position: absolute; opacity: 0; width: 0; height: 0; }
.privacy-switch-track{
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--border);
  transition: background .15s ease;
  position: relative;
}
.privacy-switch-track::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(6,8,6,.35);
  transition: transform .15s ease;
}
.privacy-switch input:checked + .privacy-switch-track{ background: var(--brand); }
.privacy-switch input:checked + .privacy-switch-track::after{ transform: translateX(18px); }
.privacy-switch input:focus-visible + .privacy-switch-track{ outline: 2px solid var(--brand); outline-offset: 2px; }

.privacy-options{ display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.privacy-option{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.privacy-option:has(input:checked){
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
/* Reset the generic white input box (background + inset top line) so the
   native radio/slider controls render cleanly on this page. */
.privacy-option input[type="radio"],
.privacy-slider{
  appearance: auto;
  -webkit-appearance: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--brand);
}
.privacy-option input[type="radio"]{ flex: 0 0 auto; }
.privacy-option-icon{
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--brand);
}
.privacy-option-copy{ display: flex; flex-direction: column; gap: 2px; }
.privacy-option-title{ font-weight: 600; }

.privacy-detail{ margin-top: 16px; }

/* Push notification types, listed under the master switch. */
.push-category-list{
  margin: 16px 0 0 48px;
  padding: 0;
  list-style: none;
}
.push-category-list[hidden]{ display: none; }
.push-category-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.push-device-status{ margin: 12px 0 0 48px; font-size: .85rem; }
.privacy-field{ display: flex; flex-direction: column; gap: 6px; }
.privacy-field span{ font-weight: 600; }
.privacy-distance-value{ text-align: center; margin-bottom: 10px; }
.privacy-distance-value strong{ font-size: 1.15rem; }
.privacy-slider{ width: 100%; }
.privacy-slider-scale{
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  margin-top: 4px;
}
.privacy-note{ margin-top: 12px; }
.privacy-save{ align-self: flex-start; }

.toast{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem .9rem;
  box-shadow: 0 12px 26px rgba(38,41,39,.18);
  max-width: 320px;
  font-size: .9rem;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.toast-pill{
  border-radius: 999px;
  padding: .72rem 1rem;
  text-align: center;
}

.toast.is-leaving{
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.toast-actions{
  margin-top: .5rem;
  display: flex;
  gap: .5rem;
}

/* On mobile surface toasts at the top, just under the app header. */
@media (max-width: 640px){
  .toast-stack{
    /* The measured appbar height already includes its safe-area padding. */
    top: calc(var(--appbar-height, 72px) + .5rem);
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(92vw, 420px);
    justify-items: center;
  }
  .toast{
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
  .toast.is-leaving{
    transform: translateY(-6px);
  }
}


.video-launch{
  margin-top: .35rem;
  align-self: flex-start;
}

button.pill-link{
  border: 0;
  cursor: pointer;
}

.btn-primary{
  background: #161916;
  color: #ffffff;
  border: 1px solid rgba(22,25,22,.85);
  box-shadow: 0 6px 18px rgba(22,25,22,.18);
}

.btn-primary:hover{
  background: #272a27;
}

.btn-primary:active,
.btn-primary:focus{
  background: #161916;
}

html[data-theme="dark"] .btn-primary{
  background: #689901;
  border-color: #567f00;
  box-shadow: none;
}

html[data-theme="dark"] .btn-primary:hover{
  background: #567f00;
}


.exercise-media{
  margin-top: .4rem;
}

.exercise-media .video-launch{
  padding: .35rem .75rem;
}

.checktext .muted{
  display: block;
  font-size: .9rem;
}

.exercise-actuals .actuals-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .5rem;
  background: rgba(118,122,119,.12);
  border-radius: 12px;
  padding: .6rem;
}
/* Neutral (not lavender) input surface inside the notes box, theme-aware. */
.exercise-actuals .actuals-grid textarea,
.exercise-actuals .actuals-grid input{
  background: var(--card);
}

.exercise-actuals .actuals-grid > label{
  grid-column: 1 / -1;
}

.actuals-label{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .3rem;
  font-weight: 600;
}

.actuals-label .nav-icon-lucide{
  width: 14px;
  height: 14px;
  opacity: .9;
}

.exercise-row.is-complete .exercise-media{
  display: none;
}
.exercise-row.is-complete .exercise-template-notes{
  display: none;
}

.exercise-row.is-complete{
  opacity: .9;
}

.exercise-row.is-complete .exercise-thumb-inline{
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 8px;
  opacity: .68;
}

#day-exercises .exercise-row.is-complete .exercise-thumb-inline{
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.workout-builder .exercise-row.is-complete .exercise-thumb-inline{
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.exercise-actuals .actuals-grid input,
.exercise-actuals .actuals-grid textarea{
  width: 100%;
}

.exercise-actual-notes{
  min-height: 4.5rem;
  line-height: 1.45;
  overflow: hidden;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.actuals-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
}

.day-save-btn,
.day-complete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.7rem;
  padding: .6rem 1rem;
  border-radius: 14px !important;
  border: 1px solid rgba(22,101,52,.28);
  background: linear-gradient(180deg, rgba(34,197,94,.12), rgba(22,163,74,.08));
  color: #166534;
  box-shadow: none;
}

.day-save-btn:hover,
.day-save-btn:focus-visible,
.day-complete-btn:hover,
.day-complete-btn:focus-visible{
  background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(22,163,74,.12));
  border-color: rgba(22,101,52,.42);
  color: #14532d;
  box-shadow: 0 0 0 1px rgba(22,101,52,.08);
}

.day-save-btn:active,
.day-complete-btn:active{
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(22,163,74,.14));
  border-color: rgba(22,101,52,.48);
  color: #14532d;
}

/* Light-mode guided-exit buttons: give both actions the same clean neutral
   style so they're consistent (no harsh black secondary border). The modal id
   outranks the global button styling. */
html[data-theme="light"] #guided-exit-modal .guided-exit-action,
html[data-theme="light"] #guided-exit-modal .guided-exit-action:is(:hover, :focus, :focus-visible, :active){
  min-height: 2.7rem !important;
  border-radius: 14px !important;
  /* Match the Exit (secondary) button's default border so both are identical;
     .day-complete-btn is otherwise excluded from that border rule. */
  border: 1px solid var(--ui-btn-default-border) !important;
  background: #f1f3f7 !important;
  color: var(--color-text-primary) !important;
  font-weight: 600 !important;
  outline: none !important;
  box-shadow: none !important;
}

.day-session-btn{
  width: 100%;
}

.day-save-btn .nav-icon-lucide,
.day-complete-btn .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.day-inline-btn{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

html:not([data-theme="dark"]) .day-stats .day-save-btn,
html:not([data-theme="dark"]) #day-status .day-complete-btn,
html:not([data-theme="dark"]) #day-exercises .day-complete-btn{
  border-color: rgba(22,101,52,.28) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.12), rgba(22,163,74,.08)) !important;
  color: #166534 !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .day-stats .day-save-btn:hover,
html:not([data-theme="dark"]) .day-stats .day-save-btn:focus-visible,
html:not([data-theme="dark"]) .day-stats .day-save-btn:active,
html:not([data-theme="dark"]) #day-status .day-complete-btn:hover,
html:not([data-theme="dark"]) #day-status .day-complete-btn:focus-visible,
html:not([data-theme="dark"]) #day-status .day-complete-btn:active,
html:not([data-theme="dark"]) #day-exercises .day-complete-btn:hover,
html:not([data-theme="dark"]) #day-exercises .day-complete-btn:focus-visible,
html:not([data-theme="dark"]) #day-exercises .day-complete-btn:active{
  border-color: rgba(22,101,52,.42) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(22,163,74,.12)) !important;
  color: #14532d !important;
  box-shadow: 0 0 0 1px rgba(22,101,52,.08) !important;
}

html[data-theme="dark"] .day-save-btn,
html[data-theme="dark"] .day-complete-btn{
  border-color: rgba(74,222,128,.34);
  background: linear-gradient(180deg, rgba(22,101,52,.36), rgba(20,83,45,.2));
  color: #d1fae5;
}

html[data-theme="dark"] .day-save-btn:hover,
html[data-theme="dark"] .day-save-btn:focus-visible,
html[data-theme="dark"] .day-complete-btn:hover,
html[data-theme="dark"] .day-complete-btn:focus-visible,
html[data-theme="dark"] .day-save-btn:active,
html[data-theme="dark"] .day-complete-btn:active{
  border-color: rgba(110,231,183,.46);
  background: linear-gradient(180deg, rgba(22,101,52,.46), rgba(20,83,45,.28));
  color: #ecfdf5;
  box-shadow: none;
}

@media (min-width: 901px){
  #day-exercises .exercise-row{
    grid-template-columns: minmax(0, 1fr) minmax(380px, 435px);
    align-items: start;
    column-gap: 1rem;
    row-gap: .55rem;
  }

  #day-exercises .exercise-row > .exercise-row-title-bar,
  #day-exercises .exercise-row > form:first-child,
  #day-exercises .exercise-row > .exercise-template-notes,
  #day-exercises .exercise-row > .exercise-media{
    grid-column: 1;
  }

  #day-exercises .exercise-row > .exercise-actuals{
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    width: 100%;
  }

  #day-exercises .exercise-row > .exercise-template-notes{
    min-height: 1.35rem;
  }
}

.item-grid.has-thumb{
  display: grid;
  grid-template-columns: auto 1fr repeat(4, minmax(95px, auto));
  align-items: center;
  gap: .5rem;
}

.exercise-picker-preview{
  margin-top: .25rem;
}

.exercise-picker-preview .exercise-thumb-inline{
  width: 42px;
  height: 42px;
  border-radius: 9px;
}

.exercise-thumb-fallback-inline{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  overflow: hidden;
  background: rgba(22,25,22,.45);
  border: 1px solid rgba(159,163,160,.25);
  color: #9fa3a0;
}

.exercise-thumb-fallback-inline .exercise-thumb-inline{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

input.mini,
textarea.mini,
select.mini{
  font-size: .9rem;
  padding: .45rem .55rem;
  border-radius: 12px;
}

textarea.mini{
  min-height: 70px;
  resize: vertical;
}

.mini-check{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--border);
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .85rem;
  word-break: break-all;
}

.workout-builder{
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.block-builder{
  display: grid;
  gap: .85rem;
  min-width: 0;
}

.workout-builder-page .block-builder [data-block-save-form]{
  padding-top: .35rem;
}

.block-builder-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.workout-builder-page .block-title-preview{
  display: none;
}

.block-builder-head > :first-child,
.item-row,
.item-grid,
.item-add{
  min-width: 0;
}

.workout-builder-page .card,
.workout-builder-page form,
.workout-builder-page label,
.workout-builder-page input,
.workout-builder-page select,
.workout-builder-page textarea,
.workout-builder-page button{
  min-width: 0;
  max-width: 100%;
}

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

.item-row{
  display: grid;
  gap: .5rem;
  padding: .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.workout-builder-page .block-builder{
  position: relative;
  padding-top: 0;
}

.workout-builder-page .item-row{
  position: relative;
  padding-top: .75rem;
}

.workout-builder-page .plan-delete-icon-only{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: .2rem !important;
  margin: 0 !important;
  border-radius: 0 !important;
  color: #ef4444 !important;
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
}

.workout-builder-page .plan-delete-icon-only:hover,
.workout-builder-page .plan-delete-icon-only:focus,
.workout-builder-page .plan-delete-icon-only:focus-visible,
.workout-builder-page .plan-delete-icon-only:active{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #dc2626 !important;
}

.workout-builder-page .plan-delete-icon-only .nav-icon-lucide{
  width: 1rem !important;
  height: 1rem !important;
}

.workout-builder-page .block-delete-icon{
  position: static;
}

.workout-builder-page .item-delete-icon{
  position: static;
}

.workout-builder-page .block-builder-head .plan-actions{
  padding-right: 2rem;
}

.workout-builder-page .item-actions-inline{
  padding-right: 0;
  justify-content: flex-end;
  align-items: center;
  gap: .3rem;
}

.workout-builder-page .item-actions-inline .plan-drag-handle{
  margin-right: auto;
}

.workout-builder-page .plan-item-icon-btn{
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  padding: .2rem !important;
}

.workout-builder-page .block-builder-head .plan-actions{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: .3rem;
  padding-right: 0;
  padding-top: .28rem;
}

.workout-builder-page .block-builder-head .plan-actions .plan-drag-handle{
  margin-right: auto;
  margin-top: .22rem;
}

.workout-builder-page .block-builder-head .plan-actions .plan-drag-handle.block-action-drag{
  position: absolute;
  top: .58rem;
  left: .62rem;
  margin: 0 !important;
  z-index: 3;
}

.workout-builder-page .block-builder-head .plan-actions .plan-drag-handle,
.workout-builder-page .item-row .item-actions-inline .plan-drag-handle.is-item-drag{
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
}

.workout-builder-page .block-builder-head .plan-actions .plan-drag-handle .nav-icon-lucide,
.workout-builder-page .item-row .item-actions-inline .plan-drag-handle.is-item-drag .nav-icon-lucide{
  width: 1rem !important;
  height: 1rem !important;
}

.workout-builder-page .plan-block-icon-btn{
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  padding: .2rem !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Alternate exercise — plan builder */
.workout-builder-page .item-alt-icon{
  -webkit-appearance: none !important;
  appearance: none !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-text-muted);
  opacity: .55;
  transition: opacity .15s, color .15s;
}
.workout-builder-page .item-alt-icon:hover,
.workout-builder-page .item-alt-icon:focus,
.workout-builder-page .item-alt-icon:focus-visible{
  opacity: 1;
  color: var(--color-accent);
  background: transparent !important;
  box-shadow: none !important;
}
.workout-builder-page .item-alt-icon.is-alt-set{
  opacity: 1;
  color: var(--color-accent);
}

.alt-badge{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent);
  border-radius: 6px;
  padding: .18rem .55rem .18rem .45rem;
  margin-top: .35rem;
}
.alt-badge .nav-icon-lucide{
  width: .85rem;
  height: .85rem;
}
.alt-badge-clear{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  transition: color .12s;
}
.alt-badge-clear:hover{
  color: var(--color-danger, #ef4444);
  background: transparent;
}
.alt-badge-clear .nav-icon-lucide{
  width: .8rem;
  height: .8rem;
}

.item-grid-head{
  font-size: .7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: -.2rem;
}

/* Inline label inside each grid cell — label always visible above input */
.item-field-cell{
  display: block;
  min-width: 0;
}
.item-field-cell input{
  display: block;
  width: 100%;
  min-width: 0;
}
.item-field-cell-label{
  display: block !important;
  font-size: .68rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}

@media (max-width: 600px){
  .item-grid{
    grid-template-columns: 1fr 1fr;
  }
  .item-grid-head{
    display: none;
  }
  /* Movement spans both columns */
  .item-field-cell:first-child{
    grid-column: 1 / -1;
  }
}
.item-extra-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.item-extra-label{
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.item-extra-label input,
.item-extra-label textarea{
  width: 100%;
  min-width: 0;
}

.item-extra-label textarea{
  min-height: 4.5rem;
  line-height: 1.45;
  overflow: hidden;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.item-extra-label.item-notes-label{
  grid-column: 1 / -1;
}

.plan-readonly-notes{
  margin-top: .35rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.item-alt-field-actions{
  display: inline-flex;
  gap: .45rem;
  margin-left: .5rem;
  vertical-align: middle;
}
.item-alt-action-link{
  display: inline;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  font-size: .78rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .12s;
}
.item-alt-action-link:hover{
  color: var(--color-text);
}

.item-alt-picker{
  margin-top: .5rem;
  padding: .75rem;
  border: 1px solid color-mix(in srgb, var(--color-accent) 18%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-accent) 5%, var(--color-surface));
}
.item-alt-picker-inner{
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.item-alt-picker-label{
  font-size: .8rem;
  color: var(--color-text-muted);
  margin: 0 0 .2rem;
}

@media (max-width: 820px){
  .workout-builder-page .block-builder-head .plan-actions{
    width: 100%;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    overflow-x: auto;
  }
  .workout-builder-page .item-row .item-actions-inline{
    width: 100%;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    overflow-x: auto;
  }
  .workout-builder-page .item-row .item-actions-inline .plan-drag-handle.is-item-drag{
    margin-right: auto;
    margin-top: 0;
  }
  .workout-builder-page .item-row .item-actions-inline .plan-item-icon-btn,
  .workout-builder-page .block-builder-head .plan-actions .plan-block-icon-btn{
    flex: 0 0 auto;
  }
}

.item-grid{
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.item-actions{
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}

.workout-builder-page .item-actions form{
  margin: 0;
}

.workout-builder-page .item-actions button,
.workout-builder-page .block-builder-head .plan-actions button{
  touch-action: manipulation;
}

.workout-builder-page .item-actions button{
  min-height: 2.85rem;
  height: 2.85rem;
  padding: .72rem 1.18rem;
  border-radius: var(--radius-sm);
  gap: .45rem;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex: 0 0 auto;
}

.workout-builder-page .item-actions .plan-delete-btn,
.workout-builder-page .item-actions .plan-delete-btn:hover,
.workout-builder-page .item-actions .plan-delete-btn:focus,
.workout-builder-page .item-actions .plan-delete-btn:focus-visible,
.workout-builder-page .item-actions .plan-delete-btn:active{
  min-height: 2.85rem;
  height: 2.85rem;
  padding: .72rem 1.18rem;
  gap: .45rem;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.workout-builder-page .block-builder-head .plan-actions button{
  min-height: 2.85rem;
  padding: .72rem 1.18rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.item-add{
  display: grid;
  gap: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}

.workout-builder-page .plan-save-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.85rem;
  padding: .72rem 1.18rem;
  border-radius: var(--radius-sm);
  border-color: rgba(21,128,61,.62);
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(22,163,74,.12));
  color: #eafff0;
  box-shadow: inset 0 0 0 1px rgba(21,128,61,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

.workout-builder-page .plan-save-btn:hover,
.workout-builder-page .plan-save-btn:focus-visible{
  border-color: rgba(22,163,74,.78);
  background: linear-gradient(180deg, rgba(34,197,94,.24), rgba(22,163,74,.16));
  box-shadow: inset 0 0 0 1px rgba(21,128,61,.32), inset 0 1px 0 rgba(255,255,255,.08);
}

.workout-builder-page .plan-delete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.85rem;
  padding: .72rem 1.18rem;
  width: auto;
  min-width: 162px;
  max-width: max-content;
  justify-self: flex-start;
  align-self: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  line-height: 1;
  white-space: nowrap;
  border-color: rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1));
  color: #ffe8e8;
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.18), inset 0 1px 0 rgba(255,255,255,.08);
}

.workout-builder-page .block-builder-head .plan-actions .plan-delete-btn{
  min-width: 162px;
}

.workout-builder-page .block-builder-head .plan-actions .plan-delete-btn,
.workout-builder-page .item-actions .plan-delete-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.85rem !important;
  height: 2.85rem !important;
  padding: .72rem 1.18rem !important;
  border-radius: var(--radius-sm) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  max-width: max-content !important;
}

.workout-builder-page .block-builder-head .plan-actions .plan-delete-btn.plan-delete-icon-only,
.workout-builder-page .item-actions .plan-delete-btn.plan-delete-icon-only{
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  padding: .2rem !important;
  border-radius: 9999px !important;
}

.workout-builder-page .block-builder-head .plan-actions .plan-delete-btn{
  min-width: 162px !important;
}

.workout-builder-page .item-actions .plan-delete-btn{
  width: auto !important;
  min-width: 0 !important;
  padding: .72rem 1.32rem !important;
  gap: .45rem !important;
  margin-top: 0 !important;
  align-self: auto !important;
  justify-self: auto !important;
}

.workout-builder-page .item-actions .item-delete-icon.plan-delete-btn.plan-delete-icon-only,
.workout-builder-page .block-builder-head .block-delete-icon.plan-delete-btn.plan-delete-icon-only{
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  padding: .2rem !important;
  gap: 0 !important;
  border-radius: 9999px !important;
  justify-content: center !important;
  align-items: center !important;
}

.workout-builder-page .plan-delete-btn:hover,
.workout-builder-page .plan-delete-btn:focus-visible{
  border-color: rgba(252,165,165,.52);
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13));
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

.workout-builder-page .plan-save-btn .nav-icon-lucide,
.workout-builder-page .plan-delete-btn .nav-icon-lucide{
  width: .95rem;
  height: .95rem;
  flex: 0 0 auto;
}

.workout-builder-page .plan-add-btn{
  border-radius: 16px;
  border-color: rgba(159,163,160,.34);
  background: transparent;
  background-image: none;
  color: inherit;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.workout-builder-page .plan-add-btn:hover,
.workout-builder-page .plan-add-btn:focus-visible{
  border-color: rgba(209,213,210,.42);
  background: transparent;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.workout-builder-page .plan-exercise-search{
  display: grid;
  gap: .65rem;
}

.workout-builder-page .plan-exercise-search-label{
  font-weight: 600;
}

.workout-builder-page .plan-exercise-search-tools{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
}

.workout-builder-page .library-search-input-wrap{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(159,163,160,.25);
  background: rgba(22,25,22,.45);
  border-radius: 12px;
  padding: .55rem .7rem;
}

.workout-builder-page .library-search-input-wrap input{
  border: none;
  outline: none;
  background: transparent;
  color: #e0e4e1;
  width: 100%;
  padding: 0;
  box-shadow: none !important;
}

.workout-builder-page .library-search-input-wrap .nav-icon-lucide{
  color: #9fa3a0;
}

.workout-builder-page .plan-exercise-filter-chips{
  margin-top: -.1rem;
}

.workout-builder-page .plan-exercise-search-dropdown{
  display: grid;
  gap: .45rem;
  padding: .75rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.22);
  background: rgba(22,25,22,.32);
}

.workout-builder-page .plan-exercise-search-dropdown.is-idle{
  padding: 0;
  border: 0;
  background: transparent;
}

.workout-builder-page .plan-exercise-search-results{
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-height: 320px;
  overflow: auto;
  padding-right: .1rem;
}

.workout-builder-page .plan-exercise-search-results.is-idle{
  max-height: none;
  overflow: visible;
}

.workout-builder-page .plan-exercise-search-result,
.workout-builder-page button.plan-exercise-search-result{
  display: block;
  flex: 0 0 auto;
  text-align: left;
  width: 100%;
  min-height: 84px;
  padding: .95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(131,181,50,.18);
  background: #364e11;
  color: #f8fbff;
  box-shadow: none;
  appearance: none;
  cursor: pointer;
  overflow: hidden;
}

.workout-builder-page .plan-exercise-search-result-main{
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  min-width: 0;
  width: 100%;
}

.workout-builder-page .plan-exercise-search-result:hover,
.workout-builder-page .plan-exercise-search-result:focus-visible,
.workout-builder-page .plan-exercise-search-result.is-selected,
.workout-builder-page button.plan-exercise-search-result:hover,
.workout-builder-page button.plan-exercise-search-result:focus-visible,
.workout-builder-page button.plan-exercise-search-result.is-selected{
  background: #364e11;
  border-color: rgba(151,211,55,.38);
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.18);
}

.workout-builder-page .plan-exercise-search-result-icon{
  width: 48px;
  height: 48px;
  margin-block: .1rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #97d337;
  background: rgba(151,211,55,.14);
  flex: 0 0 48px;
  overflow: hidden;
}

.workout-builder-page .plan-exercise-search-result-copy{
  display: grid;
  gap: .34rem;
  min-width: 0;
  width: 100%;
  text-align: left;
  align-self: center;
  overflow: hidden;
}

.workout-builder-page .plan-exercise-search-result-title-line{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.workout-builder-page .plan-exercise-search-result-name{
  min-width: 0;
  display: block;
  margin: 0;
  line-height: 1.18;
  color: #f8fbff;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workout-builder-page .plan-exercise-search-result-meta{
  display: block;
  margin: 0;
  font-size: .84rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.workout-builder-page .plan-exercise-search-result-copy > *{
  position: static;
  transform: none;
}

.workout-builder-page .plan-exercise-search-result-title-line .exercise-category-pill{
  max-width: 100%;
  flex: 0 0 auto;
}

.workout-builder-page .plan-exercise-search-actions{
  justify-content: flex-start;
  margin-top: .2rem;
}

.workout-builder-page .plan-exercise-picker-preview{
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 42px;
}

.workout-builder-page .plan-exercise-preview-icon-wrap{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(22,25,22,.45);
  border: 1px solid rgba(159,163,160,.25);
  color: #9fa3a0;
  overflow: hidden;
  flex: 0 0 42px;
}

.workout-builder-page .plan-exercise-picker-preview .exercise-thumb-inline{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-builder-page .exercise-library-empty{
  padding: .35rem 0;
}

.workout-builder-page .plan-exercise-search-meta{
  padding: 0 .1rem;
}

.tabs{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12;
  background: rgba(247,243,238,.95);
  border-top: 1px solid rgba(227,221,212,.8);
  display: none;
}

.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  padding: 1.25rem 0 2rem;
}

@media (min-width: 1024px){
  .site-footer{
    margin-top: auto;
  }
}

.footer-inner{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--muted);
}

.footer-links{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a{
  color: inherit;
}

.footer-links a:hover{
  color: var(--ink);
}

.footer-meta{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.footer-social-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: color .16s ease, background .16s ease, opacity .16s ease;
}

.footer-social-link .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.footer-social-link:hover{
  color: var(--brand);
  background: transparent;
  opacity: .92;
}

.footer-social-link:focus-visible{
  outline: none;
  color: var(--brand);
  box-shadow: 0 0 0 3px rgba(141,195,55,.14);
  border-radius: 8px;
}

.settings-logout-btn{
  border-color: rgba(248,113,113,.36) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(127,29,29,.28), rgba(69,10,10,.18)) !important;
}

.settings-logout-btn:hover,
.settings-logout-btn:focus-visible{
  border-color: rgba(248,113,113,.5) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13)) !important;
}

html[data-theme="light"] .settings-logout-btn{
  border-color: rgba(239,68,68,.22) !important;
  color: #991b1b !important;
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.96)) !important;
}

html[data-theme="light"] .settings-logout-btn:hover,
html[data-theme="light"] .settings-logout-btn:focus-visible{
  border-color: rgba(239,68,68,.32) !important;
  color: #7f1d1d !important;
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94)) !important;
}

html[data-theme="dark"] .settings-logout-btn{
  border-color: rgba(248,113,113,.38) !important;
  color: #fecaca !important;
  background: linear-gradient(180deg, rgba(127,29,29,.3), rgba(69,10,10,.2)) !important;
}

html[data-theme="dark"] .settings-logout-btn:hover,
html[data-theme="dark"] .settings-logout-btn:focus-visible{
  border-color: rgba(248,113,113,.52) !important;
  color: #fee2e2 !important;
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(185,28,28,.14)) !important;
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(14,17,15,.35);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1500;
  padding: 1.25rem;
}

.modal-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  max-width: 420px;
  width: min(100%, 420px);
  display: grid;
  gap: .75rem;
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

.plan-week-remove-modal{
  position: fixed !important;
  inset: 0 !important;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  z-index: 1600;
}

.plan-week-remove-card{
  position: relative;
  width: min(100%, 420px);
  max-width: 420px;
  display: grid;
  gap: .9rem;
  padding: 1.1rem 1.25rem;
  overflow: visible;
}

.pb-badge{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.4);
  font-size: .75rem;
  font-weight: 600;
  color: #8a6a00;
}

.pb-icon{
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: .08rem .26rem;
  border-radius: 999px;
  background: rgba(255,215,0,.18);
  border: 1px solid rgba(255,215,0,.4);
  font-size: .5rem;
  font-weight: 700;
  line-height: 1;
  color: #8a6a00;
  z-index: 1;
}

.pb-toast{
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 1200;
  max-width: 320px;
  width: calc(100% - 2.5rem);
  transition: opacity .18s ease, transform .18s ease;
}

.pb-toast.is-leaving{
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.pb-toast-inner{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  display: grid;
  gap: .5rem;
}

.pb-toast-title{
  font-weight: 700;
}

.pb-toast-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .25rem;
}

.pb-toast-points{
  font-weight: 600;
  color: var(--brand);
}


.video-modal{
  position: fixed;
  inset: 0;
  background: rgba(9,11,9,.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.video-modal.open{
  display: flex;
}

.video-modal-inner{
  width: min(960px, 96vw);
  height: min(540px, 80vh);
  background: #0e110f;
  border-radius: 18px;
  padding: .75rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.video-close{
  align-self: flex-end;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  cursor: pointer;
}

.video-frame{
  flex: 1;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.video-frame iframe{
  width: 100%;
  height: 100%;
}

@media (max-width: 640px){
  .video-modal-inner{
    height: min(70vh, 520px);
  }
}

.pb-summary{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
}

.pb-summary li{
  display: grid;
  gap: .15rem;
  padding: .75rem .85rem;
  border-radius: 14px;
  background: var(--soft);
}

.history-pb-footnote{
  margin-top: auto;
}

.history-pb-empty{
  margin-top: .35rem;
}

#history-pb-results{
  display: grid;
  gap: .5rem;
  min-height: 0;
}

.twofa-grid{
  align-items: start;
}

.twofa-qr{
  max-width: 220px;
  width: 100%;
}

.twofa-secret{
  width: 100%;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.backup-code-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .6rem;
}

.policy-content{
  display: grid;
  gap: .75rem;
}

.policy-content p{
  margin: .1rem 0;
}

.policy-content ul{
  margin: .1rem 0;
  padding-left: 1.1rem;
}

.policy-content li{
  margin: .15rem 0;
}

.tab{
  flex: 1;
  text-align: center;
  padding: .7rem .5rem;
  border-right: 1px solid rgba(227,221,212,.6);
  color: var(--muted);
}

.tab:last-child{
  border-right: none;
}

.tab.active{
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 980px){
  .grid2{
    grid-template-columns: 1fr;
  }
  .history-summary-layout{
    grid-template-columns: 1fr;
  }
  .dashboard-cards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
  }
  .history-layout{
    grid-template-columns: 1fr;
  }
  .history-column{
    display:contents;
  }
  .history-calendar{ order:1; }
  .history-detail{ order:2; }
  .history-summary-card:not(.history-pb-card){ order:3; }
  .history-pb-card{ order:4; }
  .day-layout{
    display: flex;
    flex-direction: column-reverse;
    gap: 1.25rem;
  }
}

@media (max-width: 640px){
  .shell{
    padding-top: 1.1rem;
  }
  .page-head{
    margin-bottom: .75rem;
  }
  .dashboard-cards{
    gap: .6rem;
  }
  .dashboard-cards .card{
    padding: .8rem;
  }
  .dashboard-cards .card p{
    margin: .35rem 0 .6rem;
  }
  .dashboard-cards .card .pill-link{
    padding: .45rem .7rem;
    font-size: .92rem;
  }
  .plan-tools{
    width: 100%;
    margin-left: 0;
  }
  .plan-head-actions{
    width: 100%;
    margin-left: 0;
  }
  .history-checkin-btn{
    width: 100%;
    justify-content: center;
    gap: .7rem;
    min-height: 3rem;
    font-size: 1rem;
  }
  .history-checkin-btn .nav-icon-lucide{
    width: 1.05rem;
    height: 1.05rem;
  }
  .checkin-save-btn{
    min-height: 3rem;
  }
  .history-month-btn{
    width: 2.75rem;
    height: 2.75rem;
  }
  .history-month-btn .nav-icon-lucide{
    width: 1.35rem;
    height: 1.35rem;
  }
}


@media (max-width: 1023px){
  .appbar-inner{
    padding: calc(.7rem + env(safe-area-inset-top)) 0 .55rem;
  }
  .logo{
    gap: .4rem;
    margin-left: .45rem;
    padding-top: .1rem;
  }
  .logo-mark{
    width: 28px;
    height: 28px;
  }
  .logo-text{
    font-size: 1.05rem;
  }
  .logo-tagline{
    font-size: .78rem;
  }


html[data-theme="dark"] .nav-mobile .pill-link{
  color: #0e110f;
  background: #e5e8e5;
  border-color: rgba(14,17,15,.2);
}

  .appbar-actions{
    margin-left: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
  .appbar-workout-timer.mobile-only{
    display: inline-flex !important;
    align-items: center;
    gap: .6rem;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: .12rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .appbar-workout-timer[hidden]{
    display: none !important;
  }
  .appbar-workout-timer-copy{
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: .55rem;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1;
  }
  .appbar-workout-timer-label{
    font-size: .88rem;
    font-weight: 600;
    color: #9fa3a0;
    white-space: nowrap;
    text-transform: none;
  }
  .appbar-workout-timer-value{
    font-size: 1.5rem;
    font-weight: 700;
    color: #161916;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
  }
  /* HH:MM:SS is two digits wider than MM:SS - shrink the readout once hours
     show so it never runs under the timer controls. */
  .appbar-workout-timer.has-hours .appbar-workout-timer-label{
    font-size: .78rem;
  }
  .appbar-workout-timer.has-hours .appbar-workout-timer-value{
    font-size: 1.15rem;
  }
  .appbar-workout-timer.has-hours .appbar-workout-timer-controls{
    gap: .4rem;
  }
  .appbar-workout-timer-controls{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
  }
  .appbar-workout-timer-btn{
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: #161916;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .appbar-workout-timer-btn .nav-icon-lucide{
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }
  .appbar-icon-btn.mobile-only{
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 0;
  }
  .appbar-icon-btn.mobile-only > .nav-badge{
    position:absolute;
    top:-.2rem;
    right:-.25rem;
    z-index:2;
    min-width:17px;
    height:17px;
    padding:0 .25rem;
    margin:0;
    border:2px solid var(--color-bg-primary);
    font-size:.65rem;
    line-height:1;
  }
  .appbar-notifications-btn.mobile-only + .appbar-feed-btn.mobile-only{
    margin-left: -.35rem;
  }
  /* The offline icon joins the bell group on the right instead of being left
     where the free space starts. */
  .appbar-net-status:not([hidden]){
    margin-left: auto;
  }
  .appbar-net-status:not([hidden]) + .appbar-icon-btn.mobile-only{
    margin-left: -.35rem;
  }
  .plan-cta{
    font-size: .85rem;
    padding: .35rem .65rem;
  }
  .nav-mobile{
    width: 100%;
    justify-content: space-between;
  }
  .nav-mobile .pill-link{
    flex: 1;
    text-align: center;
  }
  .nav-desktop{
    display: none;
  }
  .nav-mobile{
    display: flex;
    gap: .35rem;
  }
  .appbar-inner{
    padding-left: .5rem;
    padding-right: .5rem;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .appbar-actions{
    order: 2;
  }
  .nav-mobile{
    order: 3;
  }
  .logo{
    gap: .35rem;
  }
  .logo-mark{
    width: 42px;
    height: 42px;
  }
  .logo-text{
    font-size: 1.05rem;
  }
  .logo-tagline{
    font-size: .82rem;
  }
  .pill-link{
    font-size: .78rem;
    padding: .3rem .5rem;
  }
  .points-pill{
    font-size: .82rem;
  }
  .day-timer{
    font-size: .82rem;
  }
  .day-timer{
    gap: .45rem;
  }
  .day-timer-controls{
    gap: .08rem;
  }
  .day-timer-btn{
    width: 1.9rem;
    height: 1.9rem;
  }
  .page-head .day-timer{
    display: none;
  }
  .shell{
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
  }
  .site-footer{
    padding-bottom: 2.5rem;
  }
  .item-grid{
    grid-template-columns: 1fr 1fr;
  }
  .plan-io{
    grid-template-columns: 1fr;
  }
  .plan-io-card a[role="button"],
  .plan-io-card button{
    width: 100%;
    text-align: center;
  }
  .plan-inline{
    grid-template-columns: 1fr;
  }
  .plan-fields{
    grid-template-columns: 1fr;
  }
  .exercise-actuals .actuals-grid{
    grid-template-columns: 1fr 1fr;
  }
  .twofa-grid{
    grid-template-columns: 1fr;
  }
  .pb-toast{
    right: 1rem;
    bottom: 6.75rem;
    width: calc(100% - 2rem);
  }
}

@media (max-width: 820px){
  .exercise-set-lines-head,
  .exercise-set-line{
    grid-template-columns: 40px minmax(52px, 1fr) minmax(52px, 1fr) minmax(48px, .8fr) 60px;
    gap: .35rem;
  }
  .exercise-set-lines-head{
    font-size: .8rem;
  }
  .exercise-set-lines-head span{
    justify-content: center;
    gap: .16rem;
    text-align: center;
  }
  .exercise-set-line > span{
    justify-content: center;
    text-align: center;
  }
  .exercise-set-line > span:nth-child(2),
  .exercise-set-line > span:nth-child(3),
  .exercise-set-line > span:nth-child(4){
    display: flex;
    justify-content: center;
  }
  .exercise-set-line .set-value-input{
    max-width: 100%;
  }
  .set-done-check{
    width: 100%;
    justify-content: center;
  }
  .exercise-set-lines-head .nav-icon-lucide{
    width: .78rem;
    height: .78rem;
  }
  .workout-builder-page{
    overflow-x: clip;
  }
  .workout-builder-page .card{
    overflow: hidden;
  }
  .workout-builder-page form,
  .workout-builder-page label{
    width: 100%;
  }
  .workout-builder-page input,
  .workout-builder-page select,
  .workout-builder-page textarea{
    width: 100%;
    max-width: 100%;
  }
  .workout-builder-page .page-head{
    gap: .75rem;
  }
  .workout-builder-page .page-head .page-actions{
    width: 100%;
  }
  .workout-builder-page .page-head .page-actions > *{
    width: 100%;
  }
  .workout-builder-page .block-builder{
    gap: .75rem;
  }
  .workout-builder-page .block-builder-head{
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }
  .workout-builder-page .block-builder-head .plan-actions{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .workout-builder-page .block-builder-head .plan-actions form,
  .workout-builder-page .block-builder-head .plan-actions button,
  .workout-builder-page .item-actions form,
  .workout-builder-page .save-on-workout > button,
  .workout-builder-page .item-actions > button,
  .workout-builder-page .item-add > button{
    width: 100%;
  }
  .workout-builder-page .item-grid{
    grid-template-columns: 1fr;
  }
  .workout-builder-page .item-row{
    padding: .7rem;
  }
  .workout-builder-page .item-actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .workout-builder-page .item-row,
  .workout-builder-page .item-add,
  .workout-builder-page .block-builder{
    width: 100%;
  }
  .workout-builder-page .plan-exercise-search-tools{
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .workout-builder-page .plan-exercise-search-dropdown{
    padding: .55rem;
  }
  .workout-builder-page .plan-exercise-search-result{
    gap: .7rem;
    padding: .9rem;
    min-height: 92px;
    align-items: flex-start;
  }
  .workout-builder-page .plan-exercise-search-result-main{
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .75rem;
  }
  .workout-builder-page .plan-exercise-search-result-copy{
    width: 100%;
    gap: .3rem;
    align-self: center;
  }
  .workout-builder-page .plan-exercise-search-results{
    max-height: 280px;
  }
  .workout-builder-page .exercise-category-pill{
    align-self: flex-start;
  }
}

@media (max-width: 560px){
  .workout-builder-page .plan-exercise-search{
    gap: .55rem;
  }
  .workout-builder-page .plan-exercise-search-tools{
    gap: .5rem;
  }
  .workout-builder-page .plan-exercise-search-result{
    display: block;
    padding: .8rem .78rem;
    min-height: 88px;
  }
  .workout-builder-page .plan-exercise-search-dropdown{
    padding: .5rem;
  }
  .workout-builder-page .plan-exercise-search-results{
    max-height: 320px;
  }
  .workout-builder-page .plan-exercise-search-result-icon{
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
  .workout-builder-page .plan-exercise-search-result-main{
    grid-template-columns: 46px minmax(0, 1fr);
    gap: .6rem;
    align-items: center;
  }
  .workout-builder-page .plan-exercise-search-result-title-line{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .28rem;
    overflow: hidden;
  }
  .workout-builder-page .plan-exercise-search-result-name{
    font-size: .88rem;
    line-height: 1.18;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .workout-builder-page .exercise-category-pill{
    display: inline-flex;
    max-width: 100%;
    font-size: .72rem;
    padding: .1rem .45rem;
  }
  .workout-builder-page .plan-exercise-search-result-meta{
    font-size: .7rem;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .workout-builder-page .plan-exercise-search-result-copy{
    gap: .26rem;
  }
  .workout-builder-page .plan-exercise-search-result-title-line,
  .workout-builder-page .plan-exercise-search-result-name,
  .workout-builder-page .plan-exercise-search-result-meta{
    width: 100%;
  }
  .workout-builder-page .plan-exercise-picker-preview{
    gap: .5rem;
  }
  .workout-builder-page .plan-exercise-preview-icon-wrap{
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (max-width: 640px){
  .plan-page .plan-item{
    padding: .7rem .8rem;
  }
  .plan-page .plan-inline{
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .plan-page .plan-inline > button,
  .plan-page .plan-add-form > button{
    width: 100%;
  }
  .plan-page .plan-actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    align-items: stretch;
  }
  .plan-page .plan-open-helper{
    display: block;
    text-align: left;
  }
  .plan-page .plan-actions form,
  .plan-page .plan-actions a[role="button"],
  .plan-page .plan-actions button,
  .plan-page .plan-day-form,
  .plan-page .plan-day-select{
    width: 100%;
  }
  .plan-page .plan-add form{
    flex-wrap: wrap;
  }
  .plan-page .plan-add form > select,
  .plan-page .plan-add form > button{
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (min-width: 720px){
  .exercise-row{
    grid-template-columns: 1.15fr .85fr;
  }
}

@media (min-width: 980px){
  .day-layout{
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (prefers-reduced-motion: no-preference){
  .card,
  article,
  .daycard,
  .workout-section{
    animation: rise .5s ease both;
  }
}

@keyframes rise{
  from{
    opacity: 0;
    transform: translateY(8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode */
html[data-theme="dark"]{
  --session-timer-fill: #5f8c01;
  --session-timer-track: #3e413e;
  --bg: #262926;
  --bg-2: #3b3e3c;
  --ink: #eff3f0;
  --muted: #a1a5a2;
  --card: #3b3e3c;
  --soft: #484b48;
  --border: rgba(159,163,160,.26);
  --shadow: 0 18px 32px rgba(0,0,0,.4);
  --ring: rgba(102,150,2,.35);
}

html[data-theme="dark"] body.app{
  background: linear-gradient(180deg, #18191A 0%, #18191A 100%);
}

html[data-theme="dark"] body.app::before{
  background: none;
}

html[data-theme="dark"] .appbar{
  background: #0c0e0c;
  border-bottom-color: rgba(111,155,41,0.12);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] article,
html[data-theme="dark"] .daycard,
html[data-theme="dark"] .plan-day,
html[data-theme="dark"] .banner,
html[data-theme="dark"] .flash{
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .nav a.active{
  background: #eef2ef;
  color: #111412;
}

html[data-theme="dark"] .nav-dropdown .nav-link.active{
  background: #eef2ef;
  color: #111412;
  border-color: transparent;
}

html[data-theme="dark"] .nav a{
  color: #cacecb;
}

html[data-theme="dark"] .nav-dropdown .nav-link{
  color: #cacecb;
}

html[data-theme="dark"] .nav a:hover{
  background: rgba(111,155,41,0.09);
  border-color: rgba(111,155,41,0.2);
  color: #f0f4f8;
}

html[data-theme="dark"] .nav-dropdown .nav-link:hover,
html[data-theme="dark"] .nav-dropdown .nav-link.open{
  background: rgba(111,155,41,0.09);
  border-color: rgba(111,155,41,0.2);
  color: #f0f4f8;
}


html[data-theme="dark"] .nav a:active{
  background: rgba(104,153,1,.35);
  color: #fff;
  transform: translateY(1px);
}

html[data-theme="dark"] .pill-link:active{
  background: rgba(104,153,1,.35);
  color: #fff;
  transform: translateY(1px);
}

html[data-theme="dark"] .daycard{
  background: linear-gradient(180deg, #262926, #1a1c1a);
}

html[data-theme="dark"] .daycard a,
html[data-theme="dark"] .daycard .muted,
html[data-theme="dark"] .daycard strong{
  color: #eef2ef;
}

html[data-theme="dark"] .tabs{
  background: rgba(12,14,12,.96);
  border-top-color: rgba(111,155,41,0.1);
}

html[data-theme="dark"] .site-footer{
  background: rgba(12,14,12,.65);
  border-top-color: rgba(111,155,41,0.1);
}

html[data-theme="dark"] .footer-social-link{
  border-color: rgba(111,155,41,0.3);
}

html[data-theme="dark"] .tab{
  color: #cacecb;
}

html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a[role="button"].secondary{
  color: #f0f4f8;
  background: transparent;
  border-color: rgba(111,155,41,0.22);
}

html[data-theme="dark"] .pill-link,
html[data-theme="dark"] button,
html[data-theme="dark"] a[role="button"]{
  border: 1px solid rgba(111,155,41,0.18);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] a.secondary,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .nutrition-actions a,
html[data-theme="dark"] .nutrition-actions button,
html[data-theme="dark"] .nutrition-actions .pill-link{
  border: 1px solid rgba(111,155,41,0.28);
  box-shadow: none;
}

html[data-theme="dark"] .nutrition-actions a.secondary,
html[data-theme="dark"] .nutrition-actions button.secondary,
html[data-theme="dark"] .nutrition-actions .pill-link.secondary{
  border: 1px solid rgba(111,155,41,0.28) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .secondary,
html[data-theme="dark"] a.secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a[role="button"].secondary,
html[data-theme="dark"] .pill-link.secondary{
  border: 1px solid rgba(111,155,41,0.3) !important;
  box-shadow: none !important;
  background: rgba(111,155,41,0.04);
}

html[data-theme="dark"] .page-actions button.secondary,
html[data-theme="dark"] .page-actions a[role="button"].secondary{
  background: #262926;
  color: #ffffff;
  border-color: rgba(159,163,160,.24);
}

html[data-theme="dark"] .page-actions button.secondary:hover,
html[data-theme="dark"] .page-actions a[role="button"].secondary:hover,
html[data-theme="dark"] .page-actions button.secondary:active,
html[data-theme="dark"] .page-actions a[role="button"].secondary:active{
  background: #2f3230;
  color: #ffffff;
  border-color: rgba(159,163,160,.34);
}

html[data-theme="dark"] .page-actions button.secondary:focus,
html[data-theme="dark"] .page-actions a[role="button"].secondary:focus,
html[data-theme="dark"] .page-actions button.secondary:focus-visible,
html[data-theme="dark"] .page-actions a[role="button"].secondary:focus-visible{
  background: #2f3230;
  color: #ffffff;
  border-color: rgba(159,163,160,.34);
}

html[data-theme="dark"] .page-actions .secondary.force-inactive{
  background: #262926 !important;
  color: #ffffff !important;
  border-color: rgba(159,163,160,.24) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background: rgba(111,155,41,0.06);
  border-color: rgba(111,155,41,0.2);
  color: #f0f4f8;
}

html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup{
  color: #161916;
  background: #ffffff;
}

html[data-theme="dark"] ::placeholder{
  color: rgba(234,238,235,.6);
}

html[data-theme="dark"] .exercise-row{
  background: #191c19;
  border-color: rgba(255,255,255,.12);
}


html[data-theme="dark"] .day-layout .card{
  background: #1a1c1a;
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}

html[data-theme="dark"] .history-layout{
  color: #ebeeeb;
}

html[data-theme="dark"] .calendar-weekdays{
  color: #b9bdba;
}

html[data-theme="dark"] .calendar-day{
  background: #171a18;
  border-color: rgba(255,255,255,.14);
  color: #ebeeeb;
  box-shadow: none;
}

html[data-theme="dark"] .calendar-day.inactive{
  background: #131614;
  color: rgba(235,238,235,.5);
}

html[data-theme="dark"] .calendar-day.selected{
  background: linear-gradient(140deg, rgba(102,150,2,.25), rgba(96,141,4,.2));
  box-shadow: 0 0 0 2px rgba(102,150,2,.35);
}

html[data-theme="dark"] .calendar-dot{
  background: rgba(102,150,2,.45);
}

html[data-theme="dark"] .calendar-dot.complete{
  background: #4ade80;
}

html[data-theme="dark"] .plan-day-preview li,
html[data-theme="dark"] .plan-item{
  background: var(--soft);
  border-color: var(--border);
}

html[data-theme="dark"] .day-timer{
  color: #ebeeeb;
}

html[data-theme="dark"] .day-timer-btn{
  background: transparent;
  color: #ebeeeb;
}

html[data-theme="dark"] .day-timer-btn:hover{
  background: rgba(235,238,235,.1);
}

html[data-theme="dark"] .plan-day-head strong,
html[data-theme="dark"] .plan-day-head .muted{
  color: #eef2ef;
}

html[data-theme="dark"] .plan-actions-toggle{
  background: rgba(111,155,41,0.04);
  border-color: rgba(111,155,41,0.18);
  color: #f0f4f8;
}

html[data-theme="dark"] .plan-actions-toggle:hover{
  background: rgba(111,155,41,0.08);
}

html[data-theme="dark"] .plan-actions-body{
  border-top-color: rgba(111,155,41,0.12);
}

html[data-theme="dark"] .plan-actions-form{
  background: rgba(111,155,41,0.04);
  border-color: rgba(111,155,41,0.16);
}

html[data-theme="dark"] .plan-day-head{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

html[data-theme="dark"] .pillcount,
html[data-theme="dark"] .mini-check{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: #dce0dc;
}

html[data-theme="dark"] .mini-check{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}

html[data-theme="dark"] .item-row{
  background: #191c19;
  border-color: rgba(255,255,255,.12);
}


html[data-theme="dark"] .history-metrics > div,
html[data-theme="dark"] .pillcount,
html[data-theme="dark"] .mini-check,
html[data-theme="dark"] .plan-day-preview li,
html[data-theme="dark"] .plan-item,
html[data-theme="dark"] .item-row,
html[data-theme="dark"] .exercise-actuals .actuals-grid,
html[data-theme="dark"] .daycard,
html[data-theme="dark"] .exercise-row,
html[data-theme="dark"] .day-layout .card,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .plan-day-head,
html[data-theme="dark"] .plan-day,
html[data-theme="dark"] .history-detail,
html[data-theme="dark"] .history-calendar,
html[data-theme="dark"] .video-modal-inner,
html[data-theme="dark"] .week-workout-picker-option{
  background: linear-gradient(160deg, rgba(25,28,26,.98), rgba(17,20,17,.98));
  color: #eff3f0;
  border-color: rgba(102,150,2,.22);
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}

html[data-theme="dark"] .history-metrics > div,
html[data-theme="dark"] .pillcount,
html[data-theme="dark"] .mini-check,
html[data-theme="dark"] .exercise-actuals .actuals-grid{
  background: rgba(255,255,255,.04);
  border-color: rgba(102,150,2,.18);
}

html[data-theme="dark"] .history-metrics > div .muted,
html[data-theme="dark"] .pillcount .muted,
html[data-theme="dark"] .mini-check .muted,
html[data-theme="dark"] .daycard .muted,
html[data-theme="dark"] .workout-section .muted,
html[data-theme="dark"] .block-section .muted,
html[data-theme="dark"] .exercise-row .muted,
html[data-theme="dark"] .day-layout .card .muted,
html[data-theme="dark"] .history-detail .muted,
html[data-theme="dark"] .history-calendar .muted{
  color: rgba(234,238,235,.72);
}

html[data-theme="dark"] .history-pb-search-field input,
html[data-theme="dark"] .pb-summary li{
  background: rgba(22,25,22,.72);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .week-workout-picker-close{
  border-color: rgba(159,163,160,.22);
  background: rgba(255,255,255,.04);
  color: #eff3f0;
}

html[data-theme="dark"] .week-workout-picker-modal .modal-backdrop{
  background: rgba(6,8,6,.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .week-workout-picker-arrow{
  color: rgba(234,238,235,.72);
}

html[data-theme="dark"] .calendar-day.inactive{
  background: rgba(15,18,15,.7);
  color: rgba(234,238,235,.5);
}

html[data-theme="dark"] .calendar-day.selected{
  background: linear-gradient(140deg, rgba(102,150,2,.32), rgba(96,141,4,.22));
  box-shadow: 0 0 0 2px rgba(102,150,2,.35), 0 12px 24px rgba(0,0,0,.25);
}

html[data-theme="dark"] .history-month-btn{
  color: rgba(234,238,235,.72);
  background: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  outline: none;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

html[data-theme="dark"] .history-month-btn:hover,
html[data-theme="dark"] .history-month-btn:focus-visible{
  background: rgba(102,150,2,.14) !important;
  color: #eff3f0;
  border: 0 !important;
  border-color: transparent !important;
  outline: none;
  box-shadow: none !important;
}

html[data-theme="dark"] .history-cal-head .page-actions .history-month-btn,
html[data-theme="dark"] .history-cal-head .page-actions a[role="button"].history-month-btn,
html[data-theme="dark"] .history-cal-head .page-actions .history-month-btn:hover,
html[data-theme="dark"] .history-cal-head .page-actions .history-month-btn:focus,
html[data-theme="dark"] .history-cal-head .page-actions .history-month-btn:focus-visible,
html[data-theme="dark"] .history-cal-head .page-actions .history-month-btn:active{
  background: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .history-page-action-btn,
html[data-theme="dark"] .history-checkin-btn{
  color: #0e110f !important;
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  border: 1px solid rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.24) !important;
}

html[data-theme="dark"] .history-page-action-btn:hover,
html[data-theme="dark"] .history-page-action-btn:focus,
html[data-theme="dark"] .history-page-action-btn:focus-visible,
html[data-theme="dark"] .history-checkin-btn:hover,
html[data-theme="dark"] .history-checkin-btn:focus,
html[data-theme="dark"] .history-checkin-btn:focus-visible{
  color: #0e110f !important;
  background: linear-gradient(135deg, #a3e23d, #8fc735) !important;
  border-color: rgba(177,246,67,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 12px 26px rgba(104,146,36,.28) !important;
}

html[data-theme="dark"] .checkin-label .nav-icon-lucide{
  color: rgba(234,238,235,.72);
}

html[data-theme="dark"] .checkin-save-btn{
  color: #ffffff !important;
  background: #727673 !important;
  border: 1px solid rgba(159,163,160,.34) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] .checkin-save-btn:hover,
html[data-theme="dark"] .checkin-save-btn:focus-visible{
  color: #ffffff !important;
  background: #7e817e !important;
  border-color: rgba(209,213,210,.42) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .checkin-save-btn{
  color: #161917 !important;
  background: #ffffff !important;
  border: 1px solid rgba(229,233,229,.96) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .checkin-save-btn:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .checkin-save-btn:focus,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .checkin-save-btn:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .checkin-save-btn:active{
  color: #161916 !important;
  background: #f8fafc !important;
  border-color: rgba(209,213,210,1) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}


html[data-theme="dark"] .video-launch{
  color: #0e110f;
  background: #e5e8e5;
  border-color: rgba(14,17,15,.2);
}

html[data-theme="dark"] .video-close{
  background: rgba(255,255,255,.08);
  color: #eff3f0;
  border-color: rgba(255,255,255,.2);
}


html[data-theme="dark"] .dashboard-cards .card{
  background: var(--card);
  color: #eff3f0;
  border-color: rgba(159,163,160,.24);
  box-shadow: 0 10px 26px rgba(9,12,10,.42);
}

html[data-theme="dark"] .dashboard-cards .card::before{
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,0) 24%);
}

html[data-theme="dark"] .dashboard-cards .card .muted{
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-cards .card a,
html[data-theme="dark"] .dashboard-cards .card a.secondary{
  color: #0e110f;
}

html[data-theme="dark"] .dashboard-cards .card .secondary{
  background: #dee2df;
  border-color: rgba(14,17,15,.2);
  color: #0e110f;
}

html[data-theme="dark"] .dashboard-cards .card a.pill-link,
html[data-theme="dark"] .dashboard-cards .pill-link{
  background: #262926;
  border-color: rgba(159,163,160,.24);
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-cards .card a.pill-link:hover,
html[data-theme="dark"] .dashboard-cards .card a.pill-link:focus,
html[data-theme="dark"] .dashboard-cards .card a.pill-link:active,
html[data-theme="dark"] .dashboard-cards .pill-link:hover,
html[data-theme="dark"] .dashboard-cards .pill-link:focus,
html[data-theme="dark"] .dashboard-cards .pill-link:active{
  background: #2f3230;
  border-color: rgba(159,163,160,.34);
  color: #ffffff;
}

@media (max-width: 600px){
  .card-head{
    align-items: flex-start;
  }
  .card-head .pill-link{
    margin-left: 0;
  }
}


html[data-theme="dark"] .page-actions .pill-link{
  color: #0e110f;
  background: #e5e8e5;
  border-color: rgba(14,17,15,.2);
}


/* Dark mode unification */
html[data-theme="dark"] .card,
html[data-theme="dark"] article,
html[data-theme="dark"] .daycard,
html[data-theme="dark"] .exercise-row,
html[data-theme="dark"] .day-layout .card,
html[data-theme="dark"] .history-detail,
html[data-theme="dark"] .history-calendar,
html[data-theme="dark"] .plan-day,
html[data-theme="dark"] .plan-day-head,
html[data-theme="dark"] .plan-item,
html[data-theme="dark"] .item-row,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .video-modal-inner{
  background: var(--card);
  border-color: var(--border);
  color: #eff3f0;
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .card .muted,
html[data-theme="dark"] .daycard .muted,
html[data-theme="dark"] .exercise-row .muted,
html[data-theme="dark"] .workout-section .muted,
html[data-theme="dark"] .block-section .muted,
html[data-theme="dark"] .history-detail .muted,
html[data-theme="dark"] .history-calendar .muted{
  color: rgba(234,238,235,.72);
}

html[data-theme="dark"] .daycard.today{
  border-color: rgba(102,150,2,.6);
  box-shadow: 0 0 0 2px rgba(102,150,2,.35), 0 18px 34px rgba(102,150,2,.25);
  background: radial-gradient(circle at top right, rgba(102,150,2,.35), transparent 45%),
              linear-gradient(160deg, rgba(36,39,37,.98), rgba(17,20,17,.98));
}

html[data-theme="dark"] .calendar-day.selected{
  background: linear-gradient(140deg, rgba(102,150,2,.38), rgba(96,141,4,.22));
  box-shadow: 0 0 0 2px rgba(102,150,2,.4), 0 12px 24px rgba(0,0,0,.25);
}

/* Dark mode: Nutrition UI */
html[data-theme="dark"] .results-heading{
  color: var(--ink);
}

html[data-theme="dark"] .snapshot-meal{
  background: rgba(22,25,22,.6);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .target-ring{
  background: conic-gradient(var(--ring-color) calc(var(--ring-pct) * 1%), rgba(159,163,160,.18) 0);
}

html[data-theme="dark"] .water-ring{
  background: conic-gradient(var(--water-color) 0deg, rgba(159,163,160,.18) 0);
  box-shadow: 0 12px 24px rgba(0,0,0,.35);
}

html[data-theme="dark"] .water-ring .ring-center{
  background: #131614;
  color: var(--ink);
  border: 1px solid rgba(159,163,160,.2);
}

html[data-theme="dark"] .target-ring .target-center,
html[data-theme="dark"] .macro-ring .ring-center{
  background: #0f1426;
  color: var(--ink);
  border: 1px solid rgba(148,163,184,.2);
}

html[data-theme="dark"] .macro-ring{
  box-shadow: 0 12px 24px rgba(0,0,0,.35);
}

html[data-theme="dark"] .macro-legend{
  color: var(--muted);
}

html[data-theme="dark"] .food-row-simple{
  background: rgba(22,25,22,.6);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .food-row-simple:hover{
  background: rgba(22,25,22,.6);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .food-title{
  color: var(--ink);
}

html[data-theme="dark"] .food-meta{
  color: var(--muted);
}

html[data-theme="dark"] .food-macro-line{
  color: var(--ink);
}

html[data-theme="dark"] .food-log-row{
  background: rgba(22,25,23,0.9);
  border-color: rgba(159,163,160,0.18);
}

html[data-theme="dark"] .badge{
  background: rgba(159,163,160,.2);
  color: var(--ink);
}

html[data-theme="dark"] .badge.subtle{
  background: rgba(83,118,29,.28);
  color: var(--ink);
}

html[data-theme="dark"] .results-toggle-icon{
  background: rgba(151,211,55,.18);
  border: 1px solid rgba(151,211,55,.38);
  color: #aaeb42;
}

html[data-theme="dark"] .results-toggle-icon[data-lucide="minus"]{
  background: rgba(129,180,48,.24);
  border-color: rgba(129,180,48,.45);
  color: #9cd73d;
}

.settings-section > .settings-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.settings-section > .settings-summary::after{
  content: none !important;
}

.settings-summary-head{
  min-width: 0;
}

.results-toggle-icon.settings-toggle-icon{
  margin-left: auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 10px;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: currentColor !important;
  box-shadow: none !important;
  line-height: 1;
}

html[data-theme="dark"] #nutrition-date::-webkit-calendar-picker-indicator,
html[data-theme="dark"] #water-date::-webkit-calendar-picker-indicator{
  filter: invert(90%) sepia(14%) saturate(1431%) hue-rotate(146deg) brightness(95%) contrast(98%);
}

html[data-theme="dark"] .food-details-toggle{
  border: 0 !important;
  background: transparent !important;
  color: #9fa3a0;
}

html[data-theme="dark"] .food-details-toggle:hover{
  background: transparent;
  color: #e5e9e5;
}

html[data-theme="dark"] .food-inline-icon{
  color: #9fa3a0;
}

html[data-theme="dark"] .food-about-toggle{
  color: #9fa3a0;
}

html[data-theme="dark"] .food-about-toggle:hover{
  color: #e5e9e5;
}

html[data-theme="dark"] .food-details-toggle:hover .food-inline-icon,
html[data-theme="dark"] .food-info-summary:hover .food-inline-icon{
  color: #e5e9e5;
}

html[data-theme="dark"] .water-bar{
  background: rgba(159,163,160,.2);
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] .water-bar-label,
html[data-theme="dark"] .water-meta{
  color: rgba(229,233,229,.9);
}

html[data-theme="dark"] .water-step,
html[data-theme="dark"] .water-custom{
  background: rgba(22,25,22,.6);
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] button.small.water-goal-save-btn{
  color: #ffffff !important;
  background: #727673 !important;
  border: 1px solid rgba(159,163,160,.34) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] button.small.water-goal-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] button.small.water-goal-save-btn:focus-visible{
  color: #ffffff !important;
  background: #7e817e !important;
  border-color: rgba(209,213,210,.42) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .water-goal-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] button.small.water-goal-save-btn{
  color: #161917 !important;
  background: #ffffff !important;
  border: 1px solid rgba(229,233,229,.96) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .water-goal-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .water-goal-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] button.small.water-goal-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] button.small.water-goal-save-btn:focus-visible{
  color: #161916 !important;
  background: #f8fafc !important;
  border-color: rgba(209,213,210,1) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}


  .modal{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }
.modal.is-open{
  display: flex;
}

body.modal-open .site-footer,
body.modal-open #mobile-footer-nav{
  visibility: hidden !important;
  pointer-events: none !important;
}
  .modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(9,11,9,.6);
    backdrop-filter: blur(6px);
  }
  .modal-card{
    position: relative;
    width: min(960px, 92vw);
    max-height: 90vh;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
  }
  .modal-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
  }
  .modal-body{
    padding: 0 1.2rem 1.2rem;
  }
  #strava-embed-frame{
    width: 100%;
    height: min(70vh, 640px);
    border: 0;
    border-radius: 14px;
    background: #0f1222;
  }
  .modal-fallback{
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    flex-wrap: wrap;
  }

@media (max-width: 720px){
  .modal-card{
    width: 94vw;
    max-height: calc(100dvh - 120px);
  }
  #strava-embed-frame{
    height: 60vh;
  }
}

@media (max-width: 720px){
  .coach-library-page .modal-card{
    max-height: calc(100dvh - 96px);
  }
  .coach-library-page .modal-body{
    overflow-y: auto;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
  }
  .coach-library-page .modal-body .grid2{
    grid-template-columns: 1fr;
    gap: .65rem;
  }
  .coach-library-page .modal-body label{
    min-width: 0;
  }
}


/* Strava detail */
.strava-summary{
  overflow: hidden;
}
.strava-summary-grid{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}
.strava-meta{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .85rem 1.1rem;
}
.strava-map{
  width: 100%;
  height: 360px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0d1020;
}

@media (max-width: 900px){
  .strava-summary-grid{
    grid-template-columns: 1fr;
  }
  .strava-map{
    height: 300px;
  }
}


/* legacy secondary button theme removed in favor of the shared button system */



.strava-accent{
  color: #fc4c02;
}
html[data-theme="dark"] .strava-accent{
  color: #fc4c02;
}



.strava-actions{
  gap: .6rem;
  flex-wrap: wrap;
}
.strava-actions .pill-link{
  background: #f5f7fb;
  border: 1px solid #cfd6e6;
  color: #1f2438;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(31,36,56,.12);
}
.strava-actions .pill-link:hover{
  background: #eef2f9;
}
html[data-theme="dark"] .strava-actions .pill-link{
  background: #e9edf7;
  border-color: #cfd6e6;
  color: #0c0f1d;
  box-shadow: 0 10px 24px rgba(10,12,22,.25);
}

@media (max-width: 420px){
  .exercise-actuals .actuals-grid{
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .admin-shell{
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 760px){
  .exercise-thumb-inline{
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }
  .exercise-row.is-complete .exercise-thumb-inline{
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  #day-exercises .exercise-thumb-inline{
    width: 66px;
    height: 66px;
    flex-basis: 66px;
  }
  #day-exercises .exercise-row.is-complete .exercise-thumb-inline{
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .workout-builder .exercise-thumb-inline{
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .workout-builder .exercise-row.is-complete .exercise-thumb-inline{
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
  .item-grid.has-thumb{
    grid-template-columns: 1fr;
  }
  .item-grid.has-thumb .exercise-thumb-inline{
    width: 40px;
    height: 40px;
  }
}

html[data-theme="dark"] .admin-shell::before{
  content: none;
}

html[data-theme="dark"] .admin-shell::after{
  content: none;
}

html[data-theme="dark"] .admin-shell .card{
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .admin-shell .page-actions .pill-link{
  background: transparent;
  color: inherit;
  border-color: var(--border);
}

html[data-theme="dark"] .admin-shell .page-actions .pill-link.admin-back{
  border-color: var(--border);
}

html[data-theme="dark"] .admin-shell input,
html[data-theme="dark"] .admin-shell select,
html[data-theme="dark"] .admin-shell textarea{
  background: rgba(22,25,22,.65);
  border-color: rgba(159,163,160,.2);
  color: #e5e9e5;
}

html[data-theme="dark"] .admin-ops-tab{
  background:rgba(31,34,32,.84);
  border-color:rgba(99,138,37,.28);
  color:#e4e8e4;
}

html[data-theme="dark"] .admin-ops-tab:hover,
html[data-theme="dark"] .admin-ops-tab:focus-visible{
  background:rgba(86,127,0,.18);
  border-color:rgba(151,211,55,.4);
}

html[data-theme="dark"] .admin-ops-card{
  background: linear-gradient(180deg, #131614 0%, #0d0f0d 100%);
  border-color: rgba(123,172,44,.28);
  box-shadow: none;
}

html[data-theme="dark"] .admin-card-toggle-badge{
  background: transparent;
  border: 0;
  color: var(--brand-2);
}

html[data-theme="dark"] .admin-card-toggle-icon{
  color: #eaedea;
}

html[data-theme="dark"] .admin-card-toggle-action{
  background: transparent;
  border-color: rgba(159,163,160,.25);
}

html[data-theme="dark"] .admin-card-body{
  border-top-color:rgba(99,138,37,.2);
}

html[data-theme="dark"] .admin-ops-card .table-wrap{
  border-color:rgba(99,138,37,.18);
  background:rgba(14,17,15,.28);
}

html[data-theme="light"] .admin-ops-tab{
  background:#ffffff;
  border-color:rgba(140,144,141,.28);
  color:#272a27;
}

html[data-theme="light"] .admin-ops-tab:hover,
html[data-theme="light"] .admin-ops-tab:focus-visible{
  background:rgba(123,172,44,.08);
  border-color:rgba(123,172,44,.28);
  color:#161916;
}

html[data-theme="light"] .admin-ops-tab.is-active{
  background:linear-gradient(135deg, #92ca39 0%, #86ba32 100%);
  border-color:rgba(123,172,44,.3);
  color:#1c1f1d;
}

html[data-theme="light"] .admin-ops-card{
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: rgba(214,217,214,.9);
  box-shadow: 0 18px 40px rgba(22,25,22,.08);
}

html[data-theme="light"] .admin-card-toggle-copy strong{
  color:#161916;
}

html[data-theme="light"] .admin-card-toggle-copy small{
  color:#707471;
}

html[data-theme="light"] .admin-card-toggle-badge{
  background: transparent;
  border: 0;
  color: var(--brand-2);
}

html[data-theme="light"] .admin-card-toggle-icon{
  color: #638c21;
}

html[data-theme="light"] .admin-card-toggle-action{
  background: transparent;
  border-color: rgba(214,217,214,.8);
}

html[data-theme="light"] .admin-card-body{
  border-top-color:rgba(214,217,214,.8);
}

html[data-theme="light"] .admin-ops-card .table-wrap{
  border-color:rgba(214,217,214,.82);
  background:#f8fbff;
}

html[data-theme="light"] .admin-dashboard-detail{
  border-top-color: rgba(214,217,214,.82);
}

html[data-theme="light"] .admin-dashboard-detail > summary::after{
  border-color: rgba(214,217,214,.8);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}



/* Normalize button appearance across light/dark (excluding subscription CTAs) */
html[data-theme="dark"] button:not(.icon-btn),
html[data-theme="dark"] a[role="button"]:not(.icon-btn),
html[data-theme="dark"] .pill-link,
html[data-theme="dark"] .nav a,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] a[role="button"].secondary,
html[data-theme="dark"] .page-actions button.secondary,
html[data-theme="dark"] .page-actions a[role="button"].secondary,
html[data-theme="dark"] .secondary-button{
  background: #262926;
  color: #ffffff;
  border: 1px solid rgba(159,163,160,.24);
  box-shadow: none;
}

html[data-theme="dark"] button:not(.icon-btn):hover,
html[data-theme="dark"] a[role="button"]:not(.icon-btn):hover,
html[data-theme="dark"] .pill-link:hover,
html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] button.secondary:hover,
html[data-theme="dark"] a[role="button"].secondary:hover,
html[data-theme="dark"] .page-actions button.secondary:hover,
html[data-theme="dark"] .page-actions a[role="button"].secondary:hover,
html[data-theme="dark"] .secondary-button:hover{
  background: #2f3230;
  color: #ffffff;
  border-color: rgba(159,163,160,.34);
  transform: none;
  box-shadow: none;
}


html[data-theme="dark"] button:not(.icon-btn):active,
html[data-theme="dark"] a[role="button"]:not(.icon-btn):active,
html[data-theme="dark"] .pill-link:active,
html[data-theme="dark"] .nav a:active,
html[data-theme="dark"] button.secondary:active,
html[data-theme="dark"] a[role="button"].secondary:active,
html[data-theme="dark"] .page-actions button.secondary:active,
html[data-theme="dark"] .page-actions a[role="button"].secondary:active,
html[data-theme="dark"] .secondary-button:active{
  background: #2f3230;
  color: #ffffff;
  border-color: rgba(159,163,160,.34);
  transform: none;
  box-shadow: none;
}

html[data-theme="dark"] .workout-builder-page .plan-save-btn{
  color: #eafff0;
  border-color: rgba(21,128,61,.62);
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(22,163,74,.12));
  box-shadow: inset 0 0 0 1px rgba(21,128,61,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="dark"] .workout-builder-page .plan-save-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-save-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-save-btn:active{
  color: #f0fdf4;
  border-color: rgba(22,163,74,.78);
  background: linear-gradient(180deg, rgba(34,197,94,.24), rgba(22,163,74,.16));
  box-shadow: inset 0 0 0 1px rgba(21,128,61,.32), inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="dark"] .workout-builder-page .plan-delete-btn{
  color: #ffe8e8;
  border-color: rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="dark"] .workout-builder-page .plan-delete-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-delete-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-delete-btn:active{
  color: #fff1f2;
  border-color: rgba(252,165,165,.52);
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13));
}

html[data-theme="dark"] .workout-builder-page .item-actions .plan-delete-btn,
html[data-theme="dark"] .workout-builder-page .item-actions .plan-delete-btn:hover,
html[data-theme="dark"] .workout-builder-page .item-actions .plan-delete-btn:focus,
html[data-theme="dark"] .workout-builder-page .item-actions .plan-delete-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .item-actions .plan-delete-btn:active{
  min-height: 2.85rem !important;
  height: 2.85rem !important;
  padding: .72rem 1.18rem !important;
  gap: .45rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

html[data-theme="dark"] .workout-builder-page .plan-add-btn{
  color: #e6eae6;
  border-color: rgba(104,153,1,.62);
  background: linear-gradient(180deg, rgba(104,153,1,.18), rgba(86,127,0,.12));
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.22), inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="dark"] .workout-builder-page .plan-add-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-add-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-add-btn:active{
  color: #f3f6f3;
  border-color: rgba(86,127,0,.78);
  background: linear-gradient(180deg, rgba(104,153,1,.24), rgba(86,127,0,.16));
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.3), inset 0 1px 0 rgba(255,255,255,.08);
}

html[data-theme="dark"] button:not(.icon-btn):focus-visible,
html[data-theme="dark"] a[role="button"]:not(.icon-btn):focus-visible,
html[data-theme="dark"] .pill-link:focus-visible,
html[data-theme="dark"] .nav a:focus-visible{
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: 2px;
}


/* Dark mode: enforce standard white/black button scheme for specific UI buttons */
html[data-theme="dark"] .results-more,
html[data-theme="dark"] .custom-food button{
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  border: 1px solid rgba(170,235,66,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.24);
}

html[data-theme="dark"] .results-more:hover,
html[data-theme="dark"] .custom-food button:hover{
  background: linear-gradient(135deg, #aaeb42, #97d337);
  color: #0e110f;
  border-color: rgba(185,253,82,.3);
  transform: translateY(-1px);
}

html[data-theme="dark"] .results-more:active,
html[data-theme="dark"] .custom-food button:active{
  background: linear-gradient(135deg, #90c837, #7bac2c);
  color: #0e110f;
  border-color: rgba(141,195,55,.3);
  transform: translateY(1px);
}

html[data-theme="dark"] .day-stats .day-save-btn,
html[data-theme="dark"] #day-status .day-complete-btn,
html[data-theme="dark"] #day-exercises .day-complete-btn{
  border-color: rgba(74,222,128,.34) !important;
  background: linear-gradient(180deg, rgba(22,101,52,.36), rgba(20,83,45,.2)) !important;
  color: #d1fae5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .day-stats-head-icon{
  background: rgba(104,153,1,.16);
  color: #9bd73c;
  border-color: rgba(104,153,1,.22);
}

html[data-theme="dark"] .day-stats .day-save-btn:hover,
html[data-theme="dark"] .day-stats .day-save-btn:focus-visible,
html[data-theme="dark"] .day-stats .day-save-btn:active,
html[data-theme="dark"] #day-status .day-complete-btn:hover,
html[data-theme="dark"] #day-status .day-complete-btn:focus-visible,
html[data-theme="dark"] #day-status .day-complete-btn:active,
html[data-theme="dark"] #day-exercises .day-complete-btn:hover,
html[data-theme="dark"] #day-exercises .day-complete-btn:focus-visible,
html[data-theme="dark"] #day-exercises .day-complete-btn:active{
  border-color: rgba(110,231,183,.46) !important;
  background: linear-gradient(180deg, rgba(22,101,52,.46), rgba(20,83,45,.28)) !important;
  color: #ecfdf5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .day-timer-btn{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .day-timer-btn:hover,
html[data-theme="dark"] .day-timer-btn:focus-visible,
html[data-theme="dark"] .day-timer-btn:active{
  border: 0 !important;
  box-shadow: none !important;
}


/* Global dark-mode button theme (exclude subscription CTAs) */
html[data-theme="dark"] button:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn),
html[data-theme="dark"] a[role="button"]:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn),
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] .pill-link:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn),
html[data-theme="dark"] .nav a:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn){
  background: linear-gradient(135deg, #9bd73d, #88bd35);
  color: #0e110f;
  border: 1px solid rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.24) !important;
}

html[data-theme="dark"] button:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):hover,
html[data-theme="dark"] a[role="button"]:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):hover,
html[data-theme="dark"] input[type="button"]:hover,
html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] .pill-link:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):hover,
html[data-theme="dark"] .nav a:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):hover{
  background: linear-gradient(135deg, #aaeb42, #97d337);
  color: #0e110f;
  border-color: rgba(185,253,82,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 14px 28px rgba(104,146,36,.28);
  transform: translateY(-1px);
}

html[data-theme="dark"] button:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):active,
html[data-theme="dark"] a[role="button"]:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):active,
html[data-theme="dark"] input[type="button"]:active,
html[data-theme="dark"] input[type="submit"]:active,
html[data-theme="dark"] .pill-link:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):active,
html[data-theme="dark"] .nav a:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):active{
  background: linear-gradient(135deg, #90c837, #7bac2c);
  color: #0e110f;
  border-color: rgba(141,195,55,.3);
  transform: translateY(1px);
}

html[data-theme="dark"] button:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):focus,
html[data-theme="dark"] a[role="button"]:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):not(.icon-btn):focus,
html[data-theme="dark"] input[type="button"]:focus,
html[data-theme="dark"] input[type="submit"]:focus,
html[data-theme="dark"] .pill-link:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):focus,
html[data-theme="dark"] .nav a:not(.plan-cta):not(.plan-cta-btn):not(.pricing-cta):not(.plan-cancel-btn):focus{
  background: linear-gradient(135deg, #90c837, #7bac2c);
  color: #0e110f;
  border-color: rgba(141,195,55,.3);
}

html[data-theme="dark"] .dashboard-workout-cta{
  background: linear-gradient(180deg, rgba(50,53,50,.98), rgba(29,32,29,.98)) !important;
  color: #f8fafc !important;
  border-color: rgba(159,163,160,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 24px rgba(6,8,6,.18) !important;
}

html[data-theme="dark"] .dashboard-workout-cta:hover,
html[data-theme="dark"] .dashboard-workout-cta:focus-visible{
  background: linear-gradient(180deg, rgba(64,67,65,.99), rgba(37,40,37,.99)) !important;
  color: #ffffff !important;
  border-color: rgba(229,233,229,.24) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 12px 28px rgba(6,8,6,.22) !important;
}

html[data-theme="dark"] .dashboard-workout-cta:active{
  background: linear-gradient(180deg, rgba(64,67,65,.99), rgba(37,40,37,.99)) !important;
  color: #ffffff !important;
  border-color: rgba(229,233,229,.24) !important;
}

html[data-theme="dark"] .coach-payments-dashboard-currency .coach-payments-save-btn{
  background: linear-gradient(180deg, rgba(22,163,74,.24), rgba(21,128,61,.14)) !important;
  color: #dcfce7 !important;
  border: 1px solid rgba(20,83,45,.72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.22),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 22px rgba(21,128,61,.16) !important;
}

html[data-theme="dark"] .coach-payments-dashboard-currency .coach-payments-save-btn:hover,
html[data-theme="dark"] .coach-payments-dashboard-currency .coach-payments-save-btn:focus-visible{
  background: linear-gradient(180deg, rgba(22,163,74,.3), rgba(21,128,61,.18)) !important;
  color: #f0fdf4 !important;
  border-color: rgba(22,163,74,.72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.26),
    inset 0 1px 0 rgba(255,255,255,.12),
    0 14px 26px rgba(21,128,61,.2) !important;
}

html[data-theme="light"] .coach-payments-dashboard-currency .coach-payments-save-btn{
  background: linear-gradient(135deg, rgba(220,252,231,.98), rgba(240,253,244,.96)) !important;
  color: #166534 !important;
  border: 1px solid rgba(21,128,61,.58) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.12),
    inset 0 1px 0 rgba(255,255,255,.9),
    0 10px 22px rgba(34,197,94,.08) !important;
}

html[data-theme="light"] .coach-payments-dashboard-currency .coach-payments-save-btn:hover,
html[data-theme="light"] .coach-payments-dashboard-currency .coach-payments-save-btn:focus-visible{
  background: linear-gradient(135deg, rgba(187,247,208,.98), rgba(220,252,231,.96)) !important;
  color: #14532d !important;
  border-color: rgba(21,128,61,.68) !important;
  box-shadow:
    inset 0 0 0 1px rgba(20,83,45,.14),
    inset 0 1px 0 rgba(255,255,255,.92),
    0 14px 26px rgba(34,197,94,.12) !important;
}

html[data-theme="light"] .dashboard-workout-cta,
html[data-theme="light"] .dashboard-desktop .dashboard-workout-cta,
html[data-theme="light"] .mobile-dashboard .dashboard-workout-cta,
html[data-theme="light"] #continue-card .dashboard-workout-cta,
html[data-theme="light"] #desk-continue-card .dashboard-workout-cta{
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .dashboard-workout-cta:hover,
html[data-theme="light"] .dashboard-workout-cta:focus-visible,
html[data-theme="light"] .dashboard-workout-cta:active,
html[data-theme="light"] .dashboard-desktop .dashboard-workout-cta:hover,
html[data-theme="light"] .dashboard-desktop .dashboard-workout-cta:focus-visible,
html[data-theme="light"] .mobile-dashboard .dashboard-workout-cta:hover,
html[data-theme="light"] .mobile-dashboard .dashboard-workout-cta:focus-visible,
html[data-theme="light"] #continue-card .dashboard-workout-cta:hover,
html[data-theme="light"] #continue-card .dashboard-workout-cta:focus-visible,
html[data-theme="light"] #desk-continue-card .dashboard-workout-cta:hover,
html[data-theme="light"] #desk-continue-card .dashboard-workout-cta:focus-visible{
  background: #f8fafc !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] a.secondary,
html[data-theme="dark"] a.small,
html[data-theme="dark"] a.small.secondary,
html[data-theme="dark"] button.small,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .page-actions .secondary,
html[data-theme="dark"] .nutrition-actions .secondary{
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  color: #0e110f !important;
  border-color: rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.24) !important;
}

.week-page-head .page-actions .week-page-action{
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  color: #0e110f !important;
  border: 1px solid rgba(170,235,66,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 10px 24px rgba(104,146,36,.18) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .45rem !important;
  padding: .6rem 1.1rem !important;
  min-height: 44px !important;
  border-radius: 999px !important;
  text-decoration: none !important;
}

.week-page-head .page-actions .week-page-action:hover,
.week-page-head .page-actions .week-page-action:focus,
.week-page-head .page-actions .week-page-action:focus-visible{
  background: linear-gradient(135deg, #aaeb42, #97d337) !important;
  color: #0e110f !important;
  border-color: rgba(185,253,82,.3) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 14px 28px rgba(104,146,36,.22) !important;
}

.week-page-head .page-actions .week-page-action:active{
  background: linear-gradient(135deg, #90c837, #7bac2c) !important;
  color: #0e110f !important;
  border-color: rgba(141,195,55,.3) !important;
}

html[data-theme="dark"] a.secondary:active,
html[data-theme="dark"] a.small:active,
html[data-theme="dark"] a.small.secondary:active,
html[data-theme="dark"] button.small:active,
html[data-theme="dark"] button.secondary:active,
html[data-theme="dark"] .page-actions .secondary:active,
html[data-theme="dark"] .nutrition-actions .secondary:active,
html[data-theme="dark"] a.secondary:focus,
html[data-theme="dark"] a.small:focus,
html[data-theme="dark"] a.small.secondary:focus,
html[data-theme="dark"] button.small:focus,
html[data-theme="dark"] button.secondary:focus,
html[data-theme="dark"] .page-actions .secondary:focus,
html[data-theme="dark"] .nutrition-actions .secondary:focus{
  background: linear-gradient(135deg, #90c837, #7bac2c) !important;
  color: #0e110f !important;
  border-color: rgba(141,195,55,.3) !important;
}

html[data-theme="dark"] .workout-builder-page .plan-save-btn{
  color: #eafff0 !important;
  border-color: rgba(21,128,61,.62) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(22,163,74,.12)) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .workout-builder-page .plan-save-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-save-btn:focus,
html[data-theme="dark"] .workout-builder-page .plan-save-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-save-btn:active{
  color: #f0fdf4 !important;
  border-color: rgba(22,163,74,.78) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.24), rgba(22,163,74,.16)) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .workout-builder-page .plan-delete-btn{
  color: #ffe8e8 !important;
  border-color: rgba(248,113,113,.34) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1)) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .workout-builder-page .plan-delete-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-delete-btn:focus,
html[data-theme="dark"] .workout-builder-page .plan-delete-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-delete-btn:active{
  color: #fff1f2 !important;
  border-color: rgba(252,165,165,.52) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13)) !important;
}

html[data-theme="dark"] .workout-builder-page .plan-add-btn{
  color: #ffffff !important;
  border-color: rgba(159,163,160,.34) !important;
  background: #727673 !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] .workout-builder-page .plan-add-btn:hover,
html[data-theme="dark"] .workout-builder-page .plan-add-btn:focus,
html[data-theme="dark"] .workout-builder-page .plan-add-btn:focus-visible,
html[data-theme="dark"] .workout-builder-page .plan-add-btn:active{
  color: #ffffff !important;
  border-color: rgba(209,213,210,.42) !important;
  background: #7e817e !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] .plan-week-add{
  color: #e6eae6 !important;
  border-color: rgba(104,153,1,.62) !important;
  background: linear-gradient(180deg, rgba(104,153,1,.18), rgba(86,127,0,.12)) !important;
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.22), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] .plan-week-add:hover,
html[data-theme="dark"] .plan-week-add:focus,
html[data-theme="dark"] .plan-week-add:focus-visible,
html[data-theme="dark"] .plan-week-add:active{
  color: #f3f6f3 !important;
  border-color: rgba(86,127,0,.78) !important;
  background: linear-gradient(180deg, rgba(104,153,1,.24), rgba(86,127,0,.16)) !important;
  box-shadow: inset 0 0 0 1px rgba(59,89,2,.3), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] .plan-week-remove{
  color: #ffe8e8 !important;
  border-color: rgba(248,113,113,.34) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.14), rgba(185,28,28,.1)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] .plan-week-remove:hover,
html[data-theme="dark"] .plan-week-remove:focus,
html[data-theme="dark"] .plan-week-remove:focus-visible,
html[data-theme="dark"] .plan-week-remove:active,
html[data-theme="dark"] .plan-week-remove:visited{
  color: #fff1f2 !important;
  border-color: rgba(252,165,165,.52) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.2), rgba(185,28,28,.13)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
}


/* Pressed state class for Android WebView taps */
html[data-theme="dark"] .is-pressed{
  background: #2f3230 !important;
  color: #ffffff !important;
  border-color: rgba(159,163,160,.34) !important;
}


/* Nutrition/workout action buttons: force pressed state in dark mode */
html[data-theme="dark"] .page-actions .secondary.is-pressed,
html[data-theme="dark"] .page-actions .secondary:active,
html[data-theme="dark"] .page-actions .secondary:focus,
html[data-theme="dark"] .page-actions .secondary:focus-visible,
html[data-theme="dark"] .page-actions .secondary:hover,
html[data-theme="dark"] .nutrition-actions .secondary.is-pressed,
html[data-theme="dark"] .nutrition-actions .secondary:active,
html[data-theme="dark"] .nutrition-actions .secondary:focus,
html[data-theme="dark"] .nutrition-actions .secondary:focus-visible,
html[data-theme="dark"] .nutrition-actions .secondary:hover,
html[data-theme="dark"] a.small.secondary.is-pressed,
html[data-theme="dark"] a.small.secondary:active,
html[data-theme="dark"] a.small.secondary:focus,
html[data-theme="dark"] a.small.secondary:focus-visible,
html[data-theme="dark"] a.small.secondary:hover{
  background: #2f3230 !important;
  color: #ffffff !important;
  border-color: rgba(159,163,160,.34) !important;
}




.settings-links{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.settings-links li{
  margin: 0;
}
.settings-links li + li{
  border-top: 1px solid rgba(159,163,160,.35);
}
.settings-links a{
  display: block;
  padding: .55rem .75rem;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}
.settings-links a.settings-external-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.settings-external-link .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  opacity: .72;
}

.settings-app-version{
  margin-top: 1rem;
  text-align: right;
  font-size: .82rem;
  color: #111111;
}

html[data-theme="dark"] .settings-links li + li{
  border-top: 1px solid rgba(159,163,160,.4);
}
html[data-theme="dark"] .settings-links a{
  background: transparent;
  color: #ffffff;
}

html[data-theme="dark"] .settings-app-version{
  color: #ffffff;
}

@media (max-width: 820px){
  .site-footer{
    display: none;
  }
}


html[data-theme="dark"] body{
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

html[data-theme="dark"] body.app{
  background: #242725 !important;
  background-color: #242725 !important;
  background-image: none !important;
}

/* Desktop dashboard layout */
.dashboard-desktop{
  display: none;
}

@media (min-width: 821px){
  .mobile-dashboard{
    display: none;
  }
  .dashboard-desktop{
    display: block;
  }
  .dashboard-desktop-header{
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    padding: .2rem 0 .55rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr;
    gap: 1.1rem;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
  }
  html[data-theme="dark"] .dashboard-desktop-header{
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
  }
  html:not([data-theme="dark"]) .dashboard-desktop-header{
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
  }
  .dashboard-desktop .dashboard-desktop-header{
    position: static !important;
    top: auto !important;
    inset-block-start: auto !important;
    z-index: auto !important;
  }
  .dashboard-header-left{
    display: grid;
    gap: .3rem;
  }
  .dashboard-header-right{
    justify-self: end;
  }
  .dashboard-kicker{
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .7rem;
    color: #707471;
  }
  html[data-theme="dark"] .dashboard-kicker{
    color: rgba(159,163,160,.8);
  }
  .dashboard-date{
    font-size: 1.34rem;
    font-weight: 700;
  }
  .dashboard-welcome{
    font-size: .94rem;
    color: #525552;
  }
  html[data-theme="dark"] .dashboard-welcome{
    color: rgba(229,233,229,.85);
  }
  .range-toggle{
    display: inline-flex;
    background: rgba(159,163,160,.2);
    border-radius: 999px;
    padding: .25rem;
    gap: .25rem;
  }
  .range-toggle-btn{
    padding: .35rem .9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .85rem;
    color: #3e413e;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
  }
  .range-toggle-btn.active{
    background: var(--color-brand);
    color: var(--color-on-brand);
  }
  html[data-theme="dark"] .range-toggle{
    background: rgba(39,42,39,.72);
    border: 1px solid rgba(159,163,160,.34);
  }
  html[data-theme="dark"] .range-toggle-btn{
    color: rgba(229,233,229,.92);
  }
  html[data-theme="dark"] .range-toggle-btn.active{
    background: var(--color-brand);
    color: var(--color-on-brand);
  }
  .dashboard-actions{
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .dashboard-search input{
    width: 100%;
    padding: .6rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(159,163,160,.3);
    background: rgba(255,255,255,.8);
  }
  html[data-theme="dark"] .dashboard-search input{
    background: rgba(19,22,20,.7);
    border-color: rgba(159,163,160,.35);
    color: #e5e9e5;
  }
  .dashboard-grid{
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 1.1rem;
    margin-top: .35rem;
    align-items: start;
  }
  .dashboard-card{
    background: color-mix(in srgb, var(--card) 92%, transparent);
    border-radius: 18px;
    padding: 1.08rem 1.15rem;
    box-shadow: 0 18px 40px rgba(22,25,22,.08);
    border: 1px solid rgba(159,163,160,.15);
  }
  html[data-theme="dark"] .dashboard-card{
    background: var(--card);
    border-color: rgba(159,163,160,.2);
    box-shadow: 0 18px 40px rgba(6,8,6,.55);
  }
  .dashboard-card-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .72rem;
  }
  .card-title{
    display: inline-flex;
    align-items: center;
    gap: .6rem;
  }
  .dashboard-card-actions{
    margin-top: .78rem;
    display: flex;
    align-items: center;
  }
  .dashboard-workout-cta-desktop{
    min-height: 2.9rem;
    padding: .78rem 1.18rem;
    font-size: .98rem;
    align-self: flex-start;
    gap: .68rem;
  }
  .dashboard-workout-cta-desktop .nav-icon-lucide{
    margin-right: .14rem;
    width: 1.05rem;
    height: 1.05rem;
  }
  .dashboard-card-body{
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .dashboard-chart-card{
    min-height: 0;
  }
  .dashboard-hero-card{
    grid-column: 1 / -1;
  }
  .dashboard-chart-wide{
    grid-column: 1 / 2;
  }
  .dashboard-main-stack{
    grid-column: 1 / 2;
    display: grid;
    gap: 1.1rem;
    align-content: start;
  }
  .dashboard-side-stack{
    grid-column: 2 / 3;
    display: grid;
    grid-template-rows: auto auto;
    gap: 1.1rem;
    align-content: start;
  }
  .dashboard-hero-card{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .85rem 1rem;
    align-items: center;
  }
  .dashboard-hero-card .dashboard-card-head{
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  .dashboard-hero-card .dashboard-card-body{
    min-width: 0;
  }
  .dashboard-hero-card .dashboard-card-actions{
    margin-top: 0;
    align-self: center;
    justify-self: start;
  }
  .dashboard-side-card{
    min-height: 0;
  }
  .dashboard-primary{
    grid-column: span 2;
  }
  .dashboard-metrics .dashboard-metric-grid,
  .dashboard-card .dashboard-metric-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .82rem;
  }
  .metric-tile{
    background: rgba(159,163,160,.12);
    border-radius: 14px;
    padding: .68rem .82rem;
  }
  html[data-theme="dark"] .metric-tile{
    background: rgba(159,163,160,.08);
  }
  .metric-label{
    font-size: .76rem;
    color: #707471;
  }
  .metric-value{
    font-size: 1.08rem;
    font-weight: 700;
  }
  .progress-ring{
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 3px solid rgba(104,153,1,.35);
    display: grid;
    place-items: center;
    color: #496d02;
    font-weight: 700;
  }
  .macro-bars .macro-row{
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: .65rem;
    margin-bottom: .5rem;
  }
  .macro-bar{
    height: 6px;
    border-radius: 999px;
    background: rgba(159,163,160,.3);
    position: relative;
    overflow: hidden;
  }
  .macro-bar::after{
    content: "";
    position: absolute;
    inset: 0;
    width: min(100%, calc(var(--bar, 0) * 1%));
    background: linear-gradient(90deg, #83b532, #567f00);
  }
  .macro-bar.protein::after{
    background: linear-gradient(90deg, #ff4d6d, #ef4444);
  }
  .macro-bar.carbs::after{
    background: linear-gradient(90deg, #22c55e, #16a34a);
  }
  .macro-bar.fat::after{
    background: linear-gradient(90deg, #fb923c, #f97316);
  }
  .dashboard-chart-shell{
    margin-top: .8rem;
    padding: .8rem .85rem .68rem;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0)),
      linear-gradient(180deg, rgba(159,163,160,.08), rgba(159,163,160,.02));
    border: 1px solid rgba(159,163,160,.14);
    display: grid;
    gap: .55rem;
    overflow: hidden;
  }
  html[data-theme="dark"] .dashboard-chart-shell{
    background:
      linear-gradient(180deg, rgba(131,181,50,.07), rgba(131,181,50,0)),
      linear-gradient(180deg, rgba(39,42,39,.9), rgba(22,25,22,.72));
    border-color: rgba(131,181,50,.12);
  }
  .dashboard-chart-shell-soft{
    border-color: rgba(34,197,94,.12);
  }
  html[data-theme="dark"] .dashboard-chart-shell-soft{
    border-color: rgba(34,197,94,.14);
  }
  .dashboard-chart-caption{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }
  .dashboard-chart-caption strong{
    font-size: .88rem;
    line-height: 1.2;
  }
  .dashboard-chart-caption span{
    font-size: .71rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #707471;
    white-space: nowrap;
  }
  html[data-theme="dark"] .dashboard-chart-caption span{
    color: rgba(159,163,160,.76);
  }
  .mini-chart{
    display: flex;
    align-items: flex-end;
    gap: .32rem;
    height: 116px;
    margin-top: 0;
    padding-top: .4rem;
    position: relative;
  }
  .mini-chart::before{
    content: "";
    position: absolute;
    inset: .35rem 0 0;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(159,163,160,.08) 0 1px, transparent 1px) 0 0 / 100% 25%,
      linear-gradient(90deg, rgba(159,163,160,.03), rgba(159,163,160,0));
    pointer-events: none;
  }
  .mini-chart-bar{
    flex: 1;
    background: linear-gradient(180deg, #83b532, #567f00);
    border-radius: 10px 10px 3px 3px;
    min-width: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(86,127,0,.22);
  }
  .mini-chart-dots{
    align-items: end;
    justify-content: space-between;
    gap: .3rem;
    height: auto;
    min-height: 18px;
    padding-top: 0;
  }
  .dashboard-chart-shell:has(.mini-chart-dots){
    gap: .34rem;
    padding-bottom: .55rem;
  }
  .mini-chart-dots::before{
    content: none;
  }
  .mini-chart-dot{
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: rgba(159,163,160,.28);
    border: 1px solid rgba(159,163,160,.14);
  }
  .mini-chart-training .mini-chart-dot.active{
    background: linear-gradient(180deg, #83b532, #567f00);
    border-color: rgba(104,153,1,.4);
    box-shadow: 0 8px 18px rgba(86,127,0,.18);
  }
  .mini-chart-nutrition .mini-chart-dot.active{
    background: linear-gradient(180deg, #97d337, #83b632);
    border-color: rgba(151,211,55,.42);
    box-shadow: 0 8px 18px rgba(131,182,50,.18);
  }
  html[data-theme="dark"] .mini-chart-dot{
    background: rgba(82,85,82,.42);
    border-color: rgba(82,85,82,.26);
  }
  html[data-theme="dark"] .mini-chart-training .mini-chart-dot.active{
    background: linear-gradient(180deg, #83b532, #689901);
    border-color: rgba(131,181,50,.42);
    box-shadow: 0 10px 20px rgba(104,153,1,.24);
  }
  html[data-theme="dark"] .mini-chart-nutrition .mini-chart-dot.active{
    background: linear-gradient(180deg, #97d337, #83b632);
    border-color: rgba(151,211,55,.44);
    box-shadow: 0 10px 20px rgba(131,182,50,.24);
  }
  .mini-chart-soft .mini-chart-bar{
    background: linear-gradient(180deg, #8dc337, #83b632);
    box-shadow: 0 10px 20px rgba(131,182,50,.18);
  }
  .dashboard-insights{
    grid-column: span 1;
  }
  .insight-list{
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .45rem;
    color: #525552;
    font-size: .94rem;
  }
  html[data-theme="dark"] .insight-list{
    color: rgba(229,233,229,.85);
  }
  .dashboard-card.loading{
    position: relative;
    overflow: hidden;
  }
  .dashboard-card.loading::after{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(159,163,160,.15) 45%, rgba(255,255,255,0) 90%);
    transform: translateX(-100%);
    animation: dash-shimmer 1.6s ease-in-out infinite;
  }
  html[data-theme="dark"] .dashboard-card.loading::after{
    background: linear-gradient(120deg, rgba(19,22,20,0) 0%, rgba(159,163,160,.2) 45%, rgba(19,22,20,0) 90%);
  }
}

@media (min-width: 821px) and (max-width: 1199px){
  .dashboard-desktop-header{
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .dashboard-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-primary{
    grid-column: span 2;
  }
  .dashboard-hero-card{
    grid-column: 1 / -1;
  }
  .dashboard-chart-card{
    min-height: 360px;
  }
  .dashboard-chart-wide{
    grid-column: span 2;
  }
  .dashboard-side-stack{
    grid-column: span 2;
  }
  .dashboard-insights{
    grid-column: span 2;
  }
}

@media (min-width: 1280px){
  body.user-dashboard-page .dashboard-desktop-header{
    grid-template-columns:minmax(0, 1fr) auto;
    padding:.35rem 0 .9rem;
  }

  body.user-dashboard-page .dashboard-header-center{
    display:none;
  }

  body.user-dashboard-page .dashboard-grid{
    grid-template-columns:minmax(0, 1.8fr) minmax(340px, .82fr);
    gap:1.25rem;
  }

  body.user-dashboard-page .dashboard-hero-card{
    grid-column:1 / 2;
    grid-row:1;
    min-height:176px;
  }

  body.user-dashboard-page .dashboard-main-stack{
    grid-column:1 / 2;
    grid-row:2;
    gap:1.25rem;
  }

  body.user-dashboard-page .dashboard-side-stack{
    grid-column:2 / 3;
    grid-row:1 / span 3;
    gap:1.25rem;
    position:sticky;
    top:1.5rem;
  }

  body.user-dashboard-page .dashboard-card{
    padding:1.2rem 1.3rem;
  }

  body.user-dashboard-page .dashboard-metrics .dashboard-metric-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }

  body.user-dashboard-page .dashboard-chart-shell{
    padding:1rem 1.05rem .8rem;
  }

  body.user-dashboard-page .dashboard-chart-card .mini-chart{
    min-height:28px;
  }
}

@keyframes dash-shimmer{
  0%{ transform: translateX(-100%); }
  100%{ transform: translateX(100%); }
}

@media (max-width: 820px){
  h1{
    font-size: 1.85rem;
    line-height: 1.2;
    margin: 0 0 .4rem 0;
  }
  h2{
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0 0 .35rem 0;
  }
  .page-head{
    gap: .75rem;
    margin-bottom: .8rem;
  }
}

/* WhatsApp-like messaging layout */
.messages-app{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(159,163,160,.25);
  background: #f8fafc;
}

.messages-sidebar{
  padding: 1rem;
  background: rgba(248,250,252,.95);
  border-right: 1px solid rgba(159,163,160,.25);
  height: calc(100vh - 140px);
  overflow: auto;
}

.messages-sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.messages-sidebar-header h2{
  margin: 0;
  font-size: 1.2rem;
}

.messages-sidebar-actions{
  display: flex;
  gap: .4rem;
}

.messages-sidebar-actions .pill-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  font-size: .9rem;
  border-radius: 999px;
}

.messages-sidebar-actions .nav-badge-wrap{
  position: static;
  top: auto;
  right: auto;
  display: inline-flex;
}

.messages-sidebar-actions img{
  width: 26px;
  height: 26px;
  display: block;
  opacity: 1;
}

.toolbar-icon-img{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.icon-btn .toolbar-icon-img{
  opacity: 1;
}

.messages-sidebar-actions .toolbar-icon-img,
.messages-conversation .toolbar-icon-img{
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal;
  display: block;
}

.icon-btn{
  width: var(--ui-icon-btn-size);
  min-width: var(--ui-icon-btn-size);
  height: var(--ui-icon-btn-size);
  min-height: var(--ui-icon-btn-size);
  border-radius: var(--ui-icon-btn-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  padding: 0;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  box-shadow: none;
  color: var(--ui-icon-btn-fg);
}

.messages-sidebar-actions .icon-btn .nav-icon-lucide,
.messages-conversation .icon-btn .nav-icon-lucide,
.messages-appbar .icon-btn .nav-icon-lucide,
.messages-appbar .kebab-menu summary .nav-icon-lucide{
  width: 20px;
  height: 20px;
  color: #f8fafc;
}

html[data-theme="dark"] .messages-sidebar-actions .icon-btn .nav-icon-lucide,
html[data-theme="dark"] .messages-conversation .icon-btn .nav-icon-lucide,
html[data-theme="dark"] .messages-appbar .icon-btn .nav-icon-lucide,
html[data-theme="dark"] .messages-appbar .kebab-menu summary .nav-icon-lucide{
  color: #f8fafc;
}

.icon-btn .nav-badge{
  position: absolute;
  top: -4px;
  right: -6px;
}

.nav-badge-wrap{
  display: inline-flex;
  gap: .25rem;
  position: absolute;
  top: -4px;
  right: -6px;
}
.nav-badge-wrap.htmx-swapping .nav-badge{opacity:0;transform:scale(.7)}
.nav-badge-wrap .nav-badge.htmx-added{opacity:0;transform:scale(.82)}

.nav-desktop a{
  position: relative;
}

.nav-desktop a .nav-badge-wrap{
  top: -10px;
  right: -6px;
}

.nav a{
  position: relative;
}

.nav-badge-secondary{
  background: #f59e0b;
}

.icon-btn-message,
.icon-btn-archive,
.icon-btn-friends{
  background: rgba(255,255,255,.08);
}

.messages-sidebar-actions .icon-btn,
.messages-conversation .icon-btn,
.messages-appbar .kebab-menu summary{
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .icon-btn{
  background: transparent;
  border-color: transparent;
}

html[data-theme="dark"] .toolbar-icon-img{
  filter: brightness(0) invert(1);
  opacity: 1;
}

.icon-btn:hover{
  background: var(--ui-icon-btn-hover-bg);
}

html[data-theme="dark"] .toolbar-icon-img{
  filter: invert(1) brightness(1.2);
  opacity: 1;
}

html[data-theme="dark"] .messages-sidebar-actions .icon-btn,
html[data-theme="dark"] .messages-conversation .icon-btn,
html[data-theme="dark"] .messages-appbar .kebab-menu summary{
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .messages-sidebar-actions .toolbar-icon-img,
html:not([data-theme="dark"]) .messages-conversation .toolbar-icon-img,
html:not([data-theme="dark"]) .messages-appbar .kebab-menu .toolbar-icon-img{
  filter: invert(1) brightness(1.5) !important;
}

html:not([data-theme="dark"]) .messages-sidebar-actions .icon-btn,
html:not([data-theme="dark"]) .messages-conversation .icon-btn,
html:not([data-theme="dark"]) .messages-appbar .kebab-menu summary{
  background: transparent !important;
  border-color: transparent !important;
}

.messages-sidebar-actions .icon-btn{
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .messages-sidebar-actions .toolbar-icon-img,
html[data-theme="dark"] .messages-conversation .toolbar-icon-img,
html[data-theme="dark"] .messages-appbar .kebab-menu .toolbar-icon-img{
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

.kebab-menu summary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.composer-send{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
}

html[data-theme="dark"] .nav-badge-secondary{
  color: #262927;
}

.messages-search{
  display: grid;
  gap: .3rem;
  margin-bottom: .75rem;
}

.messages-search input{
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.3);
  padding: .55rem .9rem;
  background: #fff;
}

.messages-tabs{
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

@media (max-width: 640px){
  .messages-sidebar-header{
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .6rem;
  }
  .messages-sidebar-header > div{
    flex: 1 1 100%;
    min-width: 0;
  }
  .messages-sidebar-actions{
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .messages-sidebar-actions .pill-link{
    padding: .35rem .7rem;
    font-size: .85rem;
  }
}

.messages-tabs .pill-badge{
  background: #fff;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.messages-tabs .pill-badge:hover,
.messages-tabs .pill-badge:focus{
  background: rgba(95,140,1,.12);
  color: #426301;
  border-color: rgba(95,140,1,.3);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(95,140,1,.2);
}

/* Messages toolbar icon fix + pill tabs shadow reset */
.messages-sidebar-actions .icon-btn,
.messages-conversation .icon-btn,
.messages-appbar .icon-btn,
.messages-appbar .kebab-menu summary{
  width: 40px;
  height: 40px;
  background: transparent !important;
  border: 1px solid rgba(22,25,22,.18) !important;
  box-shadow: none !important;
}

.messages-sidebar-actions .toolbar-icon-img,
.messages-conversation .toolbar-icon-img,
.messages-appbar .toolbar-icon-img{
  width: 22px;
  height: 22px;
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .messages-sidebar-actions .icon-btn,
html[data-theme="dark"] .messages-conversation .icon-btn,
html[data-theme="dark"] .messages-appbar .icon-btn,
html[data-theme="dark"] .messages-appbar .kebab-menu summary{
  background: #262926 !important;
  border-color: rgba(159,163,160,.4) !important;
}

html[data-theme="dark"] .messages-sidebar-actions .toolbar-icon-img,
html[data-theme="dark"] .messages-conversation .toolbar-icon-img,
html[data-theme="dark"] .messages-appbar .toolbar-icon-img{
  filter: brightness(0) invert(1) !important;
}

.messages-tabs .pill-badge,
.messages-tabs .pill-badge.is-active,
.messages-tabs a.pill-badge{
  box-shadow: none !important;
  text-decoration: none;
}
.messages-tabs .pill-badge,
.messages-tabs a.pill-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.messages-tabs a.pill-badge{
  background: transparent;
  color: inherit;
  border-color: rgba(159,163,160,.35);
}

.messages-tabs a.pill-badge-ghost{
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .messages-tabs a.pill-badge-ghost{
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}


.messages-tabs a.pill-badge:hover,
.messages-tabs a.pill-badge:focus{
  background: rgba(95,140,1,.12);
  color: #426301;
  border-color: rgba(95,140,1,.3);
  box-shadow: 0 6px 14px rgba(95,140,1,.2);
}

html[data-theme="dark"] .messages-tabs .pill-badge,
html[data-theme="dark"] .messages-tabs a.pill-badge{
  background: transparent;
  color: #ffffff;
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] .messages-tabs .pill-badge:hover,
html[data-theme="dark"] .messages-tabs a.pill-badge:hover,
html[data-theme="dark"] .messages-tabs .pill-badge:focus,
html[data-theme="dark"] .messages-tabs a.pill-badge:focus{
  background: rgba(159,163,160,.2);
  color: #ffffff;
  border-color: rgba(159,163,160,.35);
}

/* Final override for message toolbar icons (light + dark) */
.messages-sidebar-actions .icon-btn,
.messages-conversation .icon-btn,
.messages-appbar .icon-btn{
  background: #fff !important;
  border-color: rgba(159,163,160,.35) !important;
  box-shadow: none !important;
}

.messages-sidebar-actions .toolbar-icon-img,
.messages-conversation .toolbar-icon-img,
.messages-appbar .toolbar-icon-img{
  width: 26px !important;
  height: 26px !important;
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .messages-sidebar-actions .icon-btn,
html[data-theme="dark"] .messages-conversation .icon-btn,
html[data-theme="dark"] .messages-appbar .icon-btn{
  background: #262926 !important;
  border-color: rgba(159,163,160,.4) !important;
}

html[data-theme="dark"] .messages-sidebar-actions .toolbar-icon-img,
html[data-theme="dark"] .messages-conversation .toolbar-icon-img,
html[data-theme="dark"] .messages-appbar .toolbar-icon-img{
  filter: brightness(0) invert(1) !important;
}

.messages-tabs .pill-badge.is-active{
  background: rgba(95,140,1,.18);
  color: #426301;
  border-color: rgba(95,140,1,.4);
}

.message-start-row{
  border: 1px dashed rgba(95,140,1,.4);
  background: rgba(95,140,1,.08);
}
.messages-panel{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  background: #f1f5f9;
}

.messages-panel .messages-sidebar{
  margin: 0 1.25rem 1.25rem;
  border: 1px solid rgba(159,163,160,.25);
  border-radius: 18px;
  background: rgba(248,250,252,.95);
}

.messages-empty{
  display: grid;
  place-items: center;
  height: calc(100vh - 140px);
  padding: 1.5rem;
}

.messages-announcements{
  margin: 1rem 1.25rem 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.25);
  padding: .75rem 1rem;
}

.messages-announcements summary{
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.messages-announcements summary::-webkit-details-marker{
  display: none;
}

.messages-announcements-count{
  background: rgba(95,140,1,.15);
  color: #426301;
  border-radius: 999px;
  padding: .1rem .5rem;
  font-size: .75rem;
  font-weight: 700;
}

.messages-announcements-toggle{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.messages-announcements-toggle .toggle-minus{
  display: none;
}

.messages-announcements[open] .messages-announcements-toggle .toggle-plus{
  display: none;
}

.messages-announcements[open] .messages-announcements-toggle .toggle-minus{
  display: inline-block;
}

.messages-announcements-body{
  display: grid;
  gap: .6rem;
  margin-top: .75rem;
}

html[data-theme="dark"] .messages-announcements{
  background: rgba(22,25,22,.85);
  border-color: rgba(159,163,160,.3);
}

.messages-empty-card{
  text-align: center;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 18px 36px rgba(22,25,22,.08);
}

.messages-empty-actions{
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.messages-conversation{
  background: #f3f6fb;
  height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px) - var(--shell-padding-top, 0px) - var(--shell-padding-bottom, 0px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
  overflow: visible;
  min-height: 0;
}

body.messages-page .shell{
  padding: 0;
}

body.app.messages-page[data-desktop-sidebar="1"] .shell{
  padding-top: 0;
}

body.messages-page .shell > .container{
  max-width: none;
  padding: 0;
}

body.messages-page .messages-conversation{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px));
}

body.messages-page .messages-conversation.dm-view{
  height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px));
}

body.messages-page .message-composer{
  margin-bottom: 0;
}

@media (max-width: 820px){
  body.messages-page .messages-conversation,
  body.messages-page .messages-conversation.dm-view{
    height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px) - var(--mobile-nav-height, 0px));
  }
  body.messages-page .message-composer{
    margin-bottom: 0;
  }
}

@media (min-width: 821px){
  body.messages-page .messages-conversation{
    width: min(100%, calc(100vw - 1.25rem));
    margin-left: auto;
    margin-right: auto;
    margin-top: .35rem;
    border-radius: 18px;
    overflow: hidden;
  }
  body.messages-page .message-composer{
    padding-bottom: .12rem;
  }
}

body.messages-page .site-footer .container{
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

body.messages-page .site-footer{
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
}

body.messages-page .message-thread{
  padding-bottom: 1rem;
}

@media (max-width: 820px){
  body.messages-page .message-thread{
    padding-bottom: .75rem;
  }
}

.messages-conversation.dm-view{
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px) - var(--shell-padding-top, 0px) - var(--shell-padding-bottom, 0px));
}

.messages-appbar{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .9rem;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(159,163,160,.2);
  box-shadow: 0 6px 16px rgba(22,25,22,.06);
  position: sticky;
  top: 0;
  z-index: 3;
  flex: 0 0 auto;
}

.message-search-bar{
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .7rem;
  background: rgba(22,25,22,.82);
  border: 1px solid rgba(159,163,160,.25);
  border-radius: 14px;
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 92%);
  z-index: 6;
  box-shadow: 0 14px 30px rgba(22,25,22,.35);
  backdrop-filter: blur(12px);
}

.message-search-bar input{
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.25);
  padding: .4rem .7rem;
  background: transparent;
  color: #f8fafc;
}

.message-search-bar .icon-btn{
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  line-height: 1;
  background: rgba(159,163,160,.18);
  border-color: rgba(159,163,160,.35);
}

html:not([data-theme="dark"]) .message-search-bar{
  background: rgba(255,255,255,.98);
  border-color: rgba(159,163,160,.25);
  box-shadow: 0 12px 26px rgba(22,25,22,.15);
}

html:not([data-theme="dark"]) .message-search-bar input{
  background: #fff;
  color: var(--ink);
  border-color: rgba(159,163,160,.35);
}

html:not([data-theme="dark"]) .message-search-bar input::placeholder{
  color: var(--muted);
}

html:not([data-theme="dark"]) .message-search-bar .icon-btn{
  background: var(--soft);
  border-color: rgba(159,163,160,.35);
  color: var(--ink);
}

.message-search-bar[hidden]{
  display: none !important;
}

.appbar-back{
  background: #e5e7eb;
  border: 1px solid rgba(159,163,160,.32);
  display: grid;
  place-items: center;
  color: #161917 !important;
}

.appbar-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(95,140,1,.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #426301;
  overflow: hidden;
}

.appbar-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.appbar-meta{
  flex: 1;
}

.appbar-title{
  font-weight: 700;
}

.appbar-actions{
  display: flex;
  gap: .4rem;
  align-items: center;
}

.kebab-menu{
  position: relative;
  z-index: 40;
}

.kebab-menu[open]{
  z-index: 240;
}

.kebab-menu summary{
  list-style: none;
  cursor: pointer;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
}

.kebab-menu summary::-webkit-details-marker{
  display: none;
}

.message-menu-trigger,
.messages-appbar .kebab-menu summary.message-menu-trigger,
.messages-inbox-modern .messages-workspace-actions .kebab-menu summary.message-menu-trigger{
  width: 2rem !important;
  height: 2rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #f8fafc;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.message-menu-trigger:hover,
.message-menu-trigger:focus-visible,
.messages-appbar .kebab-menu summary.message-menu-trigger:hover,
.messages-appbar .kebab-menu summary.message-menu-trigger:focus-visible,
.messages-inbox-modern .messages-workspace-actions .kebab-menu summary.message-menu-trigger:hover,
.messages-inbox-modern .messages-workspace-actions .kebab-menu summary.message-menu-trigger:focus-visible{
  background: rgba(255,255,255,.04) !important;
  outline: 1px solid rgba(159,163,160,.2) !important;
  outline-offset: 0 !important;
  border-radius: 8px !important;
}

.kebab-panel{
  position: absolute;
  right: 0;
  top: 120%;
  background: #fff;
  border-radius: 12px;
  padding: .4rem;
  border: 1px solid rgba(159,163,160,.25);
  min-width: 160px;
  box-shadow: 0 12px 24px rgba(22,25,22,.12);
  display: grid;
  gap: .3rem;
  z-index: 260;
}

html:not([data-theme="dark"]) .kebab-panel{
  color: var(--ink);
}

html:not([data-theme="dark"]) .kebab-panel .menu-item{
  color: var(--ink);
}

.kebab-panel .menu-item{
  background: transparent;
  border: none;
  text-align: left;
  padding: .5rem .6rem;
  border-radius: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  justify-content: flex-start;
}

.kebab-panel .menu-item:hover{
  background: rgba(159,163,160,.15);
}

.kebab-panel .menu-item .nav-icon-lucide{
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: currentColor !important;
}

.kebab-panel .menu-item-danger{
  color: #fecaca;
  border-color: rgba(248,113,113,.28);
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.kebab-panel .menu-item-danger:hover,
.kebab-panel .menu-item-danger:focus-visible{
  color: #fee2e2;
  border-color: rgba(248,113,113,.42);
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1));
}

html[data-theme="dark"] .kebab-panel .menu-item-danger{
  color: #fecaca;
}

html:not([data-theme="dark"]) .kebab-panel .menu-item-danger{
  color: #b91c1c;
  border-color: rgba(239,68,68,.24);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08);
}

html:not([data-theme="dark"]) .kebab-panel .menu-item-danger:hover,
html:not([data-theme="dark"]) .kebab-panel .menu-item-danger:focus-visible{
  color: #991b1b;
  border-color: rgba(239,68,68,.32);
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94));
}

.message-thread{
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0 1rem;
  border-radius: 0;
  padding: 1rem 0 1.35rem;
  margin-top: .5rem;
  max-height: none;
  overflow-y: auto;
  padding-bottom: calc(1.5rem + var(--mobile-footer-offset));
  min-height: 0;
  overscroll-behavior: contain;
  flex: 1 1 auto;
}

@media (max-width: 820px){
  .messages-conversation{
    height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px) - var(--shell-padding-top, 0px) - var(--shell-padding-bottom, 0px));
  }
  .messages-conversation.dm-view{
    height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px) - var(--shell-padding-top, 0px) - var(--shell-padding-bottom, 0px));
  }
  .message-composer{
    margin-bottom: calc(var(--mobile-footer-offset) * 0.45);
    padding-bottom: calc(.85rem + env(safe-area-inset-bottom));
  }
}

.message-thread::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(circle at 10px 10px, rgba(22,25,22,.2) 2px, transparent 2px),
    radial-gradient(circle at 40px 30px, rgba(22,25,22,.2) 2px, transparent 2px);
}

.message-thread > *{
  position: relative;
  z-index: 1;
}

.message-bubble{
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(22,25,22,.08);
  padding: .6rem .7rem .6rem;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 52px;
  position: relative;
}

.message-row.self .message-bubble{
  background: rgba(86,127,0,.12);
  border-radius: 10px;
}

.message-bubble-wrap{
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: .25rem;
  overflow: visible;
}

.message-row{
  padding: .15rem 0;
}

.message-row.self{
  justify-content: flex-end;
}

.bubble-menu{
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 3;
  padding: .1rem .35rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background .15s ease;
}

.bubble-menu .nav-icon-lucide{
  width: 14px;
  height: 14px;
}

.group-panel{
  margin: .5rem .9rem 0;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.2);
  background: rgba(255,255,255,.85);
  padding: .35rem .6rem;
}

.group-panel summary{
  cursor: pointer;
  font-weight: 600;
}

.group-panel-body{
  display: grid;
  gap: .5rem;
  margin-top: .5rem;
}

.group-member-row{
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.group-member-actions{
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
}

.group-add-form{
  display: flex;
  gap: .5rem;
  align-items: end;
  flex-wrap: wrap;
}

.group-add-form select{
  min-width: 220px;
}

html[data-theme="dark"] .group-panel{
  background: rgba(22,25,22,.85);
  border-color: rgba(159,163,160,.3);
}

.message-bubble-wrap:hover .bubble-menu{
  opacity: 1;
}

.bubble-menu:focus-visible,
.message-bubble-wrap:active .bubble-menu{
  opacity: 1;
  color: var(--ink);
}

.message-meta{
  display: inline-flex;
  justify-content: flex-end;
  font-size: .68rem;
  gap: .35rem;
  align-items: center;
  position: static;
  margin-top: .25rem;
  white-space: nowrap;
  color: rgba(22,25,22,.65);
}

.message-body{
  white-space: pre-wrap;
  word-break: break-word;
}

.message-time{
  white-space: nowrap;
}

.message-status{
  font-size: .75rem;
  color: rgba(22,25,22,.7);
  display: inline-flex;
  align-items: center;
}

.message-status.read{
  color: #689901;
  font-weight: 600;
}

.message-status .nav-icon-lucide{
  width: 13px;
  height: 13px;
}

.message-composer{
  padding: .65rem .9rem .85rem;
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(159,163,160,.18);
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
}

.composer-field{
  display: flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border-radius: 16px;
  padding: .2rem 0;
  border: none;
  box-shadow: none;
}

.composer-field textarea{
  flex: 1;
  border: 1px solid rgba(159,163,160,.25);
  background: rgba(255,255,255,.85);
  border-radius: 14px;
  padding: .5rem .7rem;
  min-height: 30px;
  resize: none;
}

.composer-send{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
}

.messages-booking-banner{
  margin: .35rem .9rem .85rem;
  padding: .95rem 1rem;
  border: 1px solid rgba(159,163,160,.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  box-shadow: 0 10px 22px rgba(22,25,22,.05);
  position: relative;
  overflow: hidden;
}

.messages-booking-banner[hidden]{
  display: none !important;
}

.messages-booking-banner::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #97d337, #567f00);
  opacity: .9;
}

.messages-booking-banner.is-collapsed{
  padding: .72rem .9rem;
}

.messages-booking-banner-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.messages-booking-banner-head{
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.messages-booking-banner-icon{
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(86,127,0,.08), rgba(104,153,1,.14));
  color: #496d02;
}

.messages-booking-banner-copy{
  min-width: 0;
  display: grid;
  gap: .18rem;
}

.messages-booking-banner-copy strong{
  display: block;
  font-size: .97rem;
  line-height: 1.25;
}

.messages-booking-banner-copy .muted{
  line-height: 1.35;
}

.messages-booking-banner-kicker{
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #707471;
}

.messages-booking-banner-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .8rem;
  position: relative;
  z-index: 1;
}

.messages-booking-banner-actions[hidden]{
  display: none !important;
}

.messages-bookings-panel,
.messages-inbox-modern .messages-announcements{
  margin: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  border: 1px solid rgba(86,127,0,.14);
  box-shadow: none;
}

.messages-bookings-panel{
  grid-area: book;
}

.messages-bookings-panel summary,
.messages-inbox-modern .messages-announcements summary{
  min-height: 3.4rem;
  padding: .1rem 1rem;
}

.messages-bookings-panel summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
}

.messages-bookings-panel summary::-webkit-details-marker{
  display: none;
}

.messages-bookings-label{
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #eaedea;
  font-weight: 600;
}

.messages-bookings-icon{
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.2);
  background: rgba(151,211,55,.08);
}

.messages-bookings-icon .nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: #97d337;
}

.messages-bookings-toggle{
  width: 22px;
  height: 22px;
  color: #9ea29f;
}

.messages-bookings-toggle .toggle-open{
  display: none;
}

.messages-bookings-panel[open] .messages-bookings-toggle .toggle-open{
  display: inline-block;
}

.messages-bookings-panel[open] .messages-bookings-toggle .toggle-closed{
  display: none;
}

.messages-bookings-body{
  padding: 0 1rem 1rem;
  display: grid;
  gap: .75rem;
}

.messages-bookings-copy{
  margin-top: -.2rem;
}

.messages-booking-banner-shell{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.messages-booking-banner-meta{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex: 0 0 auto;
}

.messages-booking-banner-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0 .72rem;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(34,197,94,.1);
  color: #166534;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.messages-booking-banner-toggle-icon{
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #707471;
  background: rgba(241,245,249,.85);
  border: 1px solid rgba(159,163,160,.18);
}

.messages-booking-banner-collapsed-icon{
  display: none;
}

.messages-booking-banner.is-collapsed .messages-booking-banner-copy .muted{
  display: none;
}

.messages-booking-banner.is-collapsed .messages-booking-banner-copy{
  gap: .08rem;
}

.messages-booking-banner.is-collapsed .messages-booking-banner-copy strong{
  font-size: .93rem;
}

.messages-booking-banner.is-collapsed .messages-booking-banner-expanded-icon{
  display: none;
}

.messages-booking-banner.is-collapsed .messages-booking-banner-collapsed-icon{
  display: inline-block;
}

.messages-booking-primary{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 40px;
  border-radius: 12px;
  box-shadow: none;
}

.messages-booking-chip{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.24);
  background: rgba(255,255,255,.9);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.messages-booking-chip:hover{
  background: rgba(248,250,252,.98);
  border-color: rgba(86,127,0,.22);
  transform: translateY(-1px);
}

.booking-viewer{
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.booking-viewer[aria-hidden="false"]{
  display: flex;
}

.booking-viewer-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(22,25,22,.5);
  backdrop-filter: blur(4px);
}

.booking-viewer-card{
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  background: rgba(255,255,255,.985);
  box-shadow: none;
  overflow: hidden;
}

.booking-viewer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(159,163,160,.2);
  backdrop-filter: blur(10px);
}

.booking-viewer-head-copy{
  min-width: 0;
  display: grid;
  gap: .1rem;
}

.booking-viewer-kicker{
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #707471;
}

.booking-viewer-head-actions{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.booking-viewer-external-btn{
  color: var(--ink);
}

.booking-viewer-body{
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: rgba(248,250,252,.92);
}

.booking-viewer-body iframe{
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.booking-viewer[data-frame-state="fallback"] .booking-viewer-body iframe{
  opacity: 0;
  pointer-events: none;
}

.booking-viewer-loading,
.booking-viewer-fallback{
  position: absolute;
  inset: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .45rem;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  border: 1px dashed rgba(159,163,160,.4);
}

.booking-viewer-loading[hidden],
.booking-viewer-fallback[hidden]{
  display: none !important;
}

.booking-viewer-fallback{
  top: 1rem;
  right: 1rem;
  bottom: auto;
  left: 1rem;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  gap: .9rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(22,25,22,.12);
  z-index: 2;
}

.booking-viewer-fallback.is-hidden{
  display: none;
}

.booking-viewer-fallback[data-mode="slow"]{
  background: rgba(255,255,255,.82);
  border-style: solid;
}

.booking-viewer-fallback[data-mode="error"]{
  inset: 1rem;
  bottom: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .85rem;
  padding: 1.35rem 1.25rem;
}

.booking-viewer-fallback-copy{
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.booking-viewer-fallback-actions{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.booking-viewer-fallback-close{
  flex: 0 0 auto;
}

.booking-viewer-fallback-open{
  margin-top: .45rem;
}

.booking-links-settings-list{
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}

.booking-links-section{
  border-color: rgba(73,109,2,.14);
  background: linear-gradient(180deg, #111411 0%, #0f110f 100%);
}

.booking-links-section .settings-body{
  border-top-color: rgba(159,163,160,.12);
}

html[data-theme="light"] .booking-links-section{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.98) 100%);
}

html[data-theme="light"] .booking-links-section .settings-body{
  border-top-color: rgba(159,163,160,.18);
}

.booking-links-summary{
  align-items: center;
}

.booking-links-summary-head{
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}

.booking-links-summary-icon{
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22,25,22,.7), rgba(13,15,13,.85));
  border: 1px solid rgba(131,181,50,.14);
  color: #eaedea;
}

.booking-links-summary-copy{
  min-width: 0;
  display: grid;
  gap: .15rem;
}

.booking-links-summary-copy strong{
  font-size: 1.02rem;
}

.booking-links-summary-copy .muted{
  font-size: .88rem;
  display: none;
}

.booking-links-section[open] .booking-links-summary-copy .muted{
  display: block;
}

.booking-links-summary-meta{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
  padding-right: .3rem;
}

.booking-links-count-badge{
  display: none !important;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0 .75rem;
  border-radius: 999px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: .82rem;
  font-weight: 700;
}

.booking-link-settings-card{
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.14);
  background: var(--soft);
  box-shadow: none;
}

.booking-link-settings-card.is-inactive{
  opacity: .82;
}

.booking-link-settings-form{
  display: grid;
  gap: .8rem;
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px dashed rgba(159,163,160,.18);
}

.booking-link-settings-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
}

.booking-link-settings-head-main{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.booking-link-grip{
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #9fa3a0;
  background: rgba(255,255,255,.04);
}

.booking-link-settings-head-copy{
  min-width: 0;
  display: grid;
  gap: .25rem;
}

.booking-link-settings-title-row{
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.booking-link-preview{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  color: #9fa3a0;
  text-decoration: none;
  font-size: .92rem;
}

.booking-link-preview span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-link-preview:hover{
  color: #567f00;
}

.booking-link-inline-actions{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.booking-link-toggle{
  width: 2.9rem !important;
  height: 1.7rem !important;
  min-width: 2.9rem !important;
  min-height: 1.7rem !important;
  padding: .14rem !important;
  border: 1px solid rgba(159,163,160,.3) !important;
  border-radius: 999px !important;
  background: rgba(159,163,160,.16) !important;
  background-color: rgba(159,163,160,.16) !important;
  background-image: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  transform: none !important;
  filter: none !important;
}

.booking-link-toggle.is-active{
  background: #22c55e !important;
  background-color: #22c55e !important;
  border-color: #22c55e !important;
}

.booking-link-toggle-thumb{
  width: 1.24rem !important;
  height: 1.24rem !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(22,25,22,.22) !important;
  transition: transform .18s ease !important;
  pointer-events: none;
}

.booking-link-toggle.is-active .booking-link-toggle-thumb{
  transform: translateX(1.08rem) !important;
}

.booking-link-toggle:focus-visible{
  outline: 2px solid rgba(86,127,0,.55);
  outline-offset: 2px;
}

.booking-link-icon-btn{
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(159,163,160,.2);
  background: rgba(255,255,255,.04);
  color: #d1d5d2;
}

.booking-link-icon-btn:hover:not(:disabled){
  color: var(--ink);
  border-color: rgba(86,127,0,.22);
}

.booking-link-icon-btn:disabled{
  opacity: .4;
}

.booking-link-settings-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.booking-link-status-pill{
  display: inline-flex;
  align-items: center;
  padding: .24rem .55rem;
  border-radius: 999px;
  background: rgba(159,163,160,.16);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.booking-link-status-pill.is-active{
  background: rgba(16,185,129,.16);
  color: #51721e;
}

.booking-link-settings-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.booking-link-save-btn,
.booking-link-add-btn{
  width: 100%;
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 12px;
  border: 1px solid rgba(86,127,0,.16);
  background: linear-gradient(180deg, rgba(6,8,6,.98), rgba(5,7,5,.98));
  color: #f8fafc;
  font-weight: 700;
}

.booking-link-create-card{
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(9,11,9,.72), rgba(9,11,9,.5));
}

.booking-link-create-head{
  margin-bottom: .85rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9fa3a0;
}

.booking-link-create-form{
  display: grid;
  gap: .85rem;
}

.booking-links-empty-state{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(159,163,160,.16);
  background: rgba(255,255,255,.03);
}

.booking-links-empty-icon{
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #83b532;
  background: rgba(86,127,0,.14);
}

.booking-link-action-form{
  margin: 0;
}

.booking-link-action-form .hidden-submit{
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  display: block !important;
}

.booking-link-icon-btn.is-disabled{
  opacity: .4;
  pointer-events: none;
}

html[data-theme="light"] .booking-links-summary-icon{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.96));
  color: #525552;
}

html[data-theme="light"] .booking-links-summary-copy .muted,
html[data-theme="light"] .booking-link-create-head,
html[data-theme="light"] .booking-link-preview,
html[data-theme="light"] .booking-link-grip{
  color: #707471;
}

html[data-theme="light"] .booking-links-count-badge{
  background: var(--color-brand);
  color: var(--color-on-brand);
}

html[data-theme="light"] .booking-link-settings-card{
  border-color: rgba(159,163,160,.18);
  background: var(--soft);
  box-shadow: 0 8px 20px rgba(22,25,22,.04);
}

html[data-theme="light"] .booking-link-settings-form{
  border-top-color: rgba(159,163,160,.18);
}

html[data-theme="light"] .booking-link-grip{
  background: rgba(241,245,249,.92);
}

html[data-theme="light"] .booking-link-preview:hover{
  color: #385402;
}

html[data-theme="light"] .booking-link-toggle{
  background: rgba(229,233,229,.92);
  border-color: rgba(159,163,160,.26);
}

html[data-theme="light"] .booking-link-toggle.is-active{
  background: #22c55e;
  border-color: #22c55e;
}

html[data-theme="light"] .booking-link-icon-btn{
  background: rgba(255,255,255,.98);
  border-color: rgba(159,163,160,.2);
  color: #525552;
}

html[data-theme="light"] .booking-link-icon-btn[aria-label*="Delete"]{
  border-color: rgba(239,68,68,.24);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.94));
  color: #b91c1c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 20px rgba(239,68,68,.08);
}

html[data-theme="light"] .booking-link-icon-btn:hover:not(:disabled){
  color: #161916;
  background: rgba(248,250,252,.98);
  border-color: rgba(86,127,0,.22);
}

html[data-theme="light"] .booking-link-icon-btn[aria-label*="Delete"]:hover:not(:disabled),
html[data-theme="light"] .booking-link-icon-btn[aria-label*="Delete"]:focus-visible{
  border-color: rgba(239,68,68,.32);
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.94));
  color: #991b1b;
}

html[data-theme="light"] .booking-link-save-btn,
html[data-theme="light"] .booking-link-add-btn{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  color: #161916;
}

html[data-theme="light"] .booking-link-create-card{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
}

html[data-theme="light"] .booking-links-empty-state{
  border-color: rgba(159,163,160,.18);
  background: rgba(248,250,252,.88);
}

html[data-theme="light"] .booking-links-empty-icon{
  background: rgba(86,127,0,.1);
  color: #567f00;
}

html[data-theme="light"] .booking-link-status-pill{
  background: rgba(229,233,229,.9);
  color: #707471;
}

html[data-theme="light"] .booking-link-status-pill.is-active{
  background: rgba(16,185,129,.12);
  color: #51721e;
}

.message-sheet{
  position: absolute;
  inset: 0;
  display: none;
  z-index: 12;
  padding: 1rem;
  align-items: center;
  justify-items: center;
}

.message-sheet[aria-hidden="false"]{
  display: grid;
}

.sheet-backdrop{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,8,6,.14), rgba(6,8,6,.32));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-panel{
  position: relative;
  width: min(100%, 430px);
  border-radius: 24px;
  border: 1px solid rgba(159,163,160,.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96)),
    linear-gradient(135deg, rgba(151,211,55,.08), rgba(104,153,1,.04));
  box-shadow: 0 32px 70px rgba(22,25,22,.34);
  padding: 1rem;
  display: grid;
  gap: .55rem;
  max-height: min(calc(100% - 1rem), 520px);
  overflow: auto;
}

.sheet-handle{
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(159,163,160,.38);
  margin: 0 auto .15rem;
}

.sheet-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
}

.library-row-edit-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: #fbbf24;
  transform: translateY(0);
  transition: color .18s ease, transform .16s ease;
}

.library-row-edit-icon .nav-icon-lucide{
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.1;
}

.exercise-row-summary:hover .library-row-edit-icon,
.exercise-row-summary:focus-visible .library-row-edit-icon{
  color: #fde68a;
  transform: translateY(-1px);
}

.exercise-row-summary:active .library-row-edit-icon{
  transform: translateY(1px);
}

html:not([data-theme="dark"]) .library-row-edit-icon{
  color: #161916;
}

html:not([data-theme="dark"]) .exercise-row-summary:hover .library-row-edit-icon,
html:not([data-theme="dark"]) .exercise-row-summary:focus-visible .library-row-edit-icon{
  color: #161916;
}

html[data-theme="dark"] .library-row-edit-icon{
  color: #ffffff;
}

html[data-theme="dark"] .exercise-row-summary:hover .library-row-edit-icon,
html[data-theme="dark"] .exercise-row-summary:focus-visible .library-row-edit-icon{
  color: #ffffff;
}

.sheet-head-copy{
  display: grid;
  gap: .18rem;
}

.sheet-kicker{
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #689224;
}

.sheet-subtitle{
  font-size: .88rem;
  line-height: 1.4;
}

.sheet-close{
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.sheet-close .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.sheet-item{
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  padding: .5rem .1rem;
  color: inherit;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: transform .16s ease, color .16s ease;
}

.sheet-item.danger{
  color: #dc2626;
}

.sheet-item:hover{
  transform: translateY(-1px) scale(1.02);
}

.sheet-item:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sheet-item-icon{
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #385402;
  border: 0;
  transform: translateY(0) scale(1);
  transition: transform .16s ease, color .16s ease;
}

.sheet-item.danger .sheet-item-icon{
  background: transparent;
  color: #dc2626;
  border: 0;
}

.sheet-item-icon .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.sheet-item-copy{
  display: grid;
  gap: .12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.sheet-item-label{
  font-weight: 700;
  line-height: 1.2;
}

.sheet-item-note{
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
  transition: transform .16s ease, color .16s ease;
}

.sheet-panel form{
  margin: 0;
}

.sheet-hint{
  font-size: .75rem;
  line-height: 1.35;
  padding: .2rem .15rem 0;
}

.messages-inbox-modern .messages-workspace-card{
  position: relative;
}

html[data-theme="dark"] .sheet-panel{
  background:
    linear-gradient(180deg, rgba(17,19,17,.98), rgba(12,15,13,.98)),
    linear-gradient(135deg, rgba(151,211,55,.08), rgba(104,153,1,.05));
  border-color: rgba(159,163,160,.14);
  box-shadow: 0 34px 80px rgba(6,8,6,.58);
}

html[data-theme="dark"] .sheet-close{
  background: transparent;
  border: 0;
}

html[data-theme="dark"] .sheet-item{
  background: transparent;
  border: 0;
}

html[data-theme="dark"] .sheet-item:hover{
  background: transparent;
}

.sheet-item:hover .sheet-item-icon,
.sheet-item:focus .sheet-item-icon,
.sheet-item:focus-visible .sheet-item-icon,
.sheet-item:hover .sheet-item-copy,
.sheet-item:focus .sheet-item-copy,
.sheet-item:focus-visible .sheet-item-copy{
  transform: translateY(-1px) scale(1.03);
}

.sheet-item:focus,
.sheet-item:focus-visible{
  outline: none;
  box-shadow: none;
}

.sheet-item:active{
  transform: translateY(1px) scale(.98);
}

html[data-theme="dark"] .sheet-item-note{
  color: #9fa3a0;
}

@media (max-width: 900px){
  .messages-app{
    grid-template-columns: 1fr;
    border-radius: 0;
    border: none;
  }
  .messages-sidebar{
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(159,163,160,.25);
  }
  .messages-empty{
    height: auto;
  }
  .messages-conversation{
    min-height: auto;
  }
  .message-thread{
    margin: 0 1rem;
  }
  .messages-empty-card{
    max-width: 280px;
    padding: 1.1rem 1.25rem;
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    border: 1px solid rgba(159,163,160,.35);
  }
  .messages-empty{
    display: none;
  }
  .message-sheet{
    align-items: end;
    padding: .75rem;
  }
  .sheet-panel{
    width: min(100%, 100%);
    border-radius: 24px 24px 18px 18px;
    max-height: calc(100% - .5rem);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  .messages-inbox-modern .messages-bookings-panel{
    order: 1;
  }

  .messages-inbox-modern .messages-announcements{
    order: 2;
  }

  .messages-inbox-modern .messages-sidebar{
    order: 3;
  }
}

html[data-theme="dark"] .messages-app{
  background: #101311;
  border-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .messages-sidebar{
  background: rgba(22,25,22,.9);
  border-right-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .messages-panel .messages-sidebar{
  background: rgba(22,25,22,.9);
  border-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .messages-search input{
  background: rgba(22,25,22,.8);
  color: #f8fafc;
}

html[data-theme="dark"] .messages-panel,
html[data-theme="dark"] .messages-conversation{
  background: var(--card);
  border-color: var(--border);
}

html[data-theme="dark"] .messages-conversation-header,
html[data-theme="dark"] .message-composer{
  background: rgba(22,25,22,.95);
  border-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .message-search-bar{
  background: rgba(22,25,22,.95);
  border-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .message-search-bar input{
  background: rgba(22,25,22,.8);
  color: #f8fafc;
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] .message-thread{
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .message-bubble{
  background: rgba(39,42,39,.9);
  color: #f8fafc;
}

html[data-theme="dark"] .message-row.self .message-bubble{
  background: rgba(104,153,1,.2);
}

html[data-theme="dark"] .composer-field textarea{
  background: rgba(22,25,22,.75);
  border-color: rgba(159,163,160,.35);
  color: #e5e9e5;
}

html[data-theme="dark"] .messages-booking-banner{
  border-color: rgba(159,163,160,.18);
  background: linear-gradient(180deg, rgba(25,28,25,.96), rgba(18,21,19,.96));
  box-shadow: 0 16px 32px rgba(0,0,0,.18);
}

html[data-theme="dark"] .messages-booking-banner-icon{
  border-color: rgba(131,181,50,.18);
  background: linear-gradient(180deg, rgba(131,181,50,.12), rgba(104,153,1,.18));
  color: #9bd73c;
}

html[data-theme="dark"] .messages-booking-banner-kicker,
html[data-theme="dark"] .booking-viewer-kicker{
  color: #9fa3a0;
}

html[data-theme="dark"] .messages-booking-banner-toggle-icon{
  color: #d1d5d2;
  background: rgba(255,255,255,.05);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .messages-booking-banner-badge{
  border-color: rgba(34,197,94,.22);
  background: rgba(34,197,94,.14);
  color: #bbf7d0;
}

html[data-theme="dark"] .messages-booking-banner-dismiss{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.18);
  color: #d1d5d2;
}

html[data-theme="dark"] .messages-booking-chip{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.22);
  color: #e9edea;
}

html[data-theme="dark"] .messages-booking-chip:hover{
  background: rgba(255,255,255,.08);
}

html[data-theme="dark"] .booking-viewer-card{
  background: rgba(17,20,18,.985);
}

html[data-theme="dark"] .booking-viewer-head{
  background: rgba(17,20,18,.92);
  border-bottom-color: rgba(159,163,160,.18);
}

html[data-theme="dark"] .booking-viewer-body{
  background: rgba(11,14,12,.96);
}

html[data-theme="dark"] .booking-viewer-loading,
html[data-theme="dark"] .booking-viewer-fallback{
  background: rgba(22,25,22,.9);
  border-color: rgba(159,163,160,.28);
}

html[data-theme="dark"] .booking-links-section{
  border-color: rgba(73,109,2,.14);
  background: linear-gradient(180deg, #111411 0%, #0f110f 100%);
}

html[data-theme="dark"] .booking-links-section .settings-body{
  border-top-color: rgba(159,163,160,.12);
}

html[data-theme="dark"] .booking-links-summary-icon{
  border-color: rgba(131,181,50,.14);
  background: linear-gradient(180deg, rgba(22,25,22,.7), rgba(13,15,13,.85));
  color: #eaedea;
}

html[data-theme="dark"] .booking-links-summary-copy .muted,
html[data-theme="dark"] .booking-link-create-head,
html[data-theme="dark"] .booking-link-preview,
html[data-theme="dark"] .booking-link-grip{
  color: #9fa3a0;
}

html[data-theme="dark"] .booking-link-settings-card{
  border-color: rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.88), rgba(12,15,13,.9));
  box-shadow: none;
}

html[data-theme="dark"] .booking-link-settings-form{
  border-top-color: rgba(159,163,160,.12);
}

html[data-theme="dark"] .booking-link-toggle{
  background: rgba(159,163,160,.12);
  background-color: rgba(159,163,160,.12);
  border-color: rgba(159,163,160,.22);
}

html[data-theme="dark"] .booking-link-toggle.is-active{
  background: #97d13c !important;
  background-color: #97d13c !important;
  border-color: #97d13c !important;
  box-shadow: 0 0 0 1px rgba(151,209,60,.22);
}

html[data-theme="dark"] .booking-link-icon-btn{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.18);
  color: #d1d5d2;
}

html[data-theme="dark"] .booking-link-icon-btn[aria-label*="Delete"]{
  border-color: rgba(248,113,113,.28);
  background: linear-gradient(180deg, rgba(239,68,68,.1), rgba(185,28,28,.07));
  color: #fecaca;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 20px rgba(127,29,29,.12);
}

html[data-theme="dark"] .booking-link-icon-btn[aria-label*="Delete"]:hover:not(:disabled),
html[data-theme="dark"] .booking-link-icon-btn[aria-label*="Delete"]:focus-visible{
  border-color: rgba(248,113,113,.42);
  background: linear-gradient(180deg, rgba(239,68,68,.16), rgba(185,28,28,.1));
  color: #fee2e2;
}

html[data-theme="dark"] .booking-link-save-btn,
html[data-theme="dark"] .booking-link-add-btn{
  border-color: rgba(86,127,0,.16);
  background: linear-gradient(180deg, rgba(6,8,6,.98), rgba(5,7,5,.98));
  color: #f8fafc;
}

html[data-theme="dark"] .booking-link-create-card{
  border-color: rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(9,11,9,.72), rgba(9,11,9,.5));
}

html[data-theme="dark"] .booking-links-empty-state{
  border-color: rgba(159,163,160,.16);
  background: rgba(255,255,255,.03);
}

html[data-theme="dark"] .booking-links-empty-icon{
  background: rgba(86,127,0,.14);
  color: #83b532;
}

html[data-theme="dark"] .booking-link-status-pill{
  background: rgba(159,163,160,.18);
  color: rgba(234,238,235,.76);
}

html[data-theme="dark"] .booking-link-status-pill.is-active{
  background: rgba(16,185,129,.2);
  color: #6ee7b7;
}

html[data-theme="dark"] .messages-appbar,
html[data-theme="dark"] .kebab-panel,
html[data-theme="dark"] .sheet-panel,
html[data-theme="dark"] .composer-field{
  background: rgba(22,25,22,.95);
  border-color: rgba(159,163,160,.3);
  color: #f8fafc;
}

html[data-theme="dark"] .bubble-menu{
  background: transparent;
  border-color: transparent;
  color: rgba(229,233,229,.8);
}

/* Messages toolbar icons: single source of truth */
.messages-sidebar-actions .icon-btn,
.messages-conversation .icon-btn,
.messages-appbar .icon-btn,
.messages-appbar .kebab-menu summary{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--ui-icon-btn-size) !important;
  min-width: var(--ui-icon-btn-size) !important;
  height: var(--ui-icon-btn-size) !important;
  min-height: var(--ui-icon-btn-size) !important;
  border-radius: var(--ui-icon-btn-radius) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  color: var(--ui-icon-btn-fg) !important;
}

.messages-sidebar-actions .toolbar-icon-img,
.messages-conversation .toolbar-icon-img,
.messages-appbar .toolbar-icon-img{
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  opacity: 1 !important;
  filter: none !important;
}

.messages-tabs .pill-badge,
.messages-tabs a.pill-badge{
  box-shadow: none !important;
  text-decoration: none;
}
.messages-tabs .pill-badge:hover,
.messages-tabs a.pill-badge:hover{
  background: rgba(95,140,1,.12);
  color: #426301;
  border-color: rgba(95,140,1,.3);
  box-shadow: 0 6px 14px rgba(95,140,1,.2);
}

/* Coach import workflow */
.coach-import-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.coach-import-actions .small{
  font-size: .8rem;
}

.coach-import-seed select,
.coach-copy-form select{
  background: #ffffff;
  color: #0e100e;
  border: 1px solid rgba(159,163,160,.45);
}

.coach-import-seed select option,
.coach-copy-form select option{
  color: #0e100e;
}

.coach-import-seed select:focus,
.coach-copy-form select:focus{
  outline: none;
  border-color: rgba(86,127,0,.6);
  box-shadow: 0 0 0 3px rgba(86,127,0,.15);
}

.coach-library-stage{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .6rem .75rem;
  border-radius: 14px;
  border: 1px dashed rgba(159,163,160,.4);
  background: rgba(255,255,255,.08);
  min-height: 44px;
}

.coach-library-chip{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: rgba(123,172,44,.15);
  color: #161916;
  font-weight: 600;
  font-size: .8rem;
}

.coach-library-upload label,
.coach-copy-form label,
.coach-import-seed label{
  display: grid;
  gap: .4rem;
  font-weight: 600;
}

.modal-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: .9rem;
}

.coach-library-list{
  margin-top: 1rem;
  display: grid;
  gap: .6rem;
}

.coach-library-header{
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.coach-library-files{
  display: grid;
  gap: .5rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: .4rem;
}

.library-section-stack{
  display: grid;
  gap: .6rem;
}

.library-plan-form{
  display: grid;
  gap: .45rem;
  padding: .55rem;
  border: 1px solid rgba(159,163,160,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.library-toolbar{
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: .8rem;
  align-items: end;
  margin-top: .5rem;
}

.library-toolbar .inline-form{
  margin: 0 !important;
}

.library-toolbar > label{
  margin: 0;
}

@media (max-width: 760px){
  .library-toolbar{
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.coach-library-page .library-panel-modern{
  background: linear-gradient(180deg, #131614 0%, #0d0f0d 100%);
  border: 1px solid rgba(123,172,44,.28);
  border-radius: 18px;
  padding: 1.05rem;
  overflow: hidden;
}

.coach-library-page .library-master-body{
  display: none;
  padding-top: .85rem;
  border-top: 1px solid rgba(159,163,160,.2);
}

.coach-library-page .library-panel-modern.is-expanded .library-master-body{
  display: block;
}

.coach-library-page .library-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.coach-library-page .library-panel-title-wrap{
  display: flex;
  gap: .8rem;
  align-items: flex-start;
}

.coach-library-page .library-panel-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(123,172,44,.16);
  border: 1px solid rgba(123,172,44,.35);
  color: #aaeb42;
}

.coach-library-page .library-panel-icon svg{
  width: 20px;
  height: 20px;
}

.coach-library-page .library-title-line{
  display: flex;
  align-items: center;
  gap: .55rem;
}

.coach-library-page .library-title-line strong{
  font-size: 1.45rem;
  color: #eaedea;
}

.coach-library-page .library-count-pill{
  background: var(--color-brand);
  color: var(--color-on-brand);
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
}

.coach-library-page .library-week-builder-btn{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 12px;
  padding: .55rem .9rem;
}

.coach-library-page .library-collapse-btn{
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.coach-library-page .library-collapse-glyph,
.feed-expand-glyph,
.results-toggle-icon.settings-toggle-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 800;
}

.coach-library-page .library-modern-tools{
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: .7rem;
  align-items: center;
  margin: .85rem 0;
}

.coach-library-page .library-top-actions{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.coach-library-page .library-search-input-wrap{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(159,163,160,.25);
  background: rgba(22,25,22,.45);
  border-radius: 12px;
  padding: .55rem .7rem;
}

.coach-library-page .library-search-input-wrap input{
  border: none;
  outline: none;
  background: transparent;
  color: #e0e4e1;
  width: 100%;
  padding: 0;
  box-shadow: none !important;
}

.coach-library-page .library-search-input-wrap .nav-icon-lucide{
  color: #9fa3a0;
}

.coach-library-page .library-modern-list{
  border-top: 1px solid rgba(159,163,160,.18);
  padding-top: .75rem;
  max-height: 380px;
}
.coach-library-page .library-plan-section{
  display: grid;
  gap: .48rem;
}
.coach-library-page .library-plan-section + .library-plan-section{
  margin-top: .55rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(159,163,160,.2);
}
.coach-library-page .library-plan-section-head,
.routine-section .library-plan-section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin: 0 .1rem .1rem;
}
.coach-library-page .library-plan-section-head strong,
.routine-section .library-plan-section-head strong{
  font-size: .8rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #9dd93f;
}
.coach-library-page .library-plan-section-count,
.routine-section .library-plan-section-count{
  font-size: .72rem;
  color: #b1b5b1;
  border: 1px solid rgba(159,163,160,.28);
  border-radius: 999px;
  padding: .08rem .46rem;
  line-height: 1.2;
}

.coach-library-page .library-plan-row{
  background: #364e11;
  border: 1px solid rgba(159,163,160,.2);
  border-radius: 14px;
  padding: .75rem .9rem;
}

.coach-library-page .library-plan-row-stock{
  border-color: rgba(159,163,160,.25);
}

.coach-library-page .library-plan-main{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .85rem;
  min-width: 0;
}

.coach-library-page .library-plan-icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #97d337;
  background: rgba(151,211,55,.14);
  flex: 0 0 40px;
}

.coach-library-page .library-plan-actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .7rem;
}

.coach-library-page .library-plan-actions .inline-form{
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.coach-library-page .library-plan-actions > a,
.coach-library-page .library-plan-actions > span,
.coach-library-page .library-plan-actions .inline-form > button,
.coach-library-page .library-plan-actions .inline-form > span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  line-height: 1;
  text-decoration: none;
  transform: translateY(0) scale(1);
  transition: color .16s ease, transform .16s ease, opacity .16s ease;
}

.coach-library-page .library-plan-icon-action{
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  text-decoration: none;
  line-height: 1;
  transform: translateY(0);
  transition: color .18s ease, transform .16s ease, opacity .18s ease;
}

.coach-library-page .library-plan-icon-action .nav-icon-lucide{
  width: 1.12rem;
  height: 1.12rem;
  stroke-width: 2.1;
  color: inherit !important;
  stroke: currentColor !important;
}

html:not([data-theme="dark"]) .coach-library-page .library-plan-icon-action.is-edit{
  color: #161917;
}

.coach-library-page .library-plan-icon-action.is-download{
  color: #97d337;
}

.coach-library-page .library-plan-icon-action.is-danger{
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f87171;
}

.coach-library-page .library-plan-icon-action.is-danger .nav-icon-lucide{
  color: #f87171 !important;
  stroke: #f87171 !important;
  opacity: 1 !important;
}

button.library-plan-icon-action.is-danger,
a.library-plan-icon-action.is-danger,
span.library-plan-icon-action.is-danger{
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.coach-library-page .library-plan-icon-action.is-danger:hover .nav-icon-lucide,
.coach-library-page .library-plan-icon-action.is-danger:focus .nav-icon-lucide,
.coach-library-page .library-plan-icon-action.is-danger:focus-visible .nav-icon-lucide{
  color: #fca5a5 !important;
  stroke: #fca5a5 !important;
}

.coach-library-page .library-plan-icon-action:hover,
.coach-library-page .library-plan-icon-action:focus,
.coach-library-page .library-plan-icon-action:focus-visible{
  background: transparent;
  box-shadow: none;
  outline: none;
  transform: translateY(-1px);
}

html:not([data-theme="dark"]) .coach-library-page .library-plan-icon-action.is-edit:hover,
html:not([data-theme="dark"]) .coach-library-page .library-plan-icon-action.is-edit:focus,
html:not([data-theme="dark"]) .coach-library-page .library-plan-icon-action.is-edit:focus-visible{
  color: #161917;
}

.coach-library-page .library-plan-icon-action.is-download:hover,
.coach-library-page .library-plan-icon-action.is-download:focus,
.coach-library-page .library-plan-icon-action.is-download:focus-visible{
  color: #aaeb42;
}

.coach-library-page .library-plan-icon-action.is-danger:hover,
.coach-library-page .library-plan-icon-action.is-danger:focus,
.coach-library-page .library-plan-icon-action.is-danger:focus-visible{
  color: #fca5a5;
}

.coach-library-page .library-plan-icon-action:active{
  transform: translateY(1px);
}

.coach-library-page .library-plan-icon-action.is-disabled,
.coach-library-page .library-plan-icon-action[aria-disabled="true"]{
  opacity: .4;
  pointer-events: none;
}

.coach-library-page .library-icon-btn{
  min-width: 38px;
  height: 38px;
  padding: .35rem .6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.coach-library-page .library-plan-actions .library-icon-btn{
  appearance: none !important;
  -webkit-appearance: none !important;
  min-width: 2rem !important;
  width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #97d337 !important;
  transform: translateY(0);
  transition: transform .16s ease, color .16s ease !important;
}

.coach-library-page .library-plan-actions .library-icon-btn .nav-icon-lucide{
  width: 1.12rem;
  height: 1.12rem;
  stroke-width: 2.1;
  color: #97d337 !important;
  stroke: #97d337 !important;
  opacity: 1 !important;
}

.coach-library-page .library-plan-actions > a:hover,
.coach-library-page .library-plan-actions > a:focus,
.coach-library-page .library-plan-actions > a:focus-visible,
.coach-library-page .library-plan-actions > span:hover,
.coach-library-page .library-plan-actions > span:focus,
.coach-library-page .library-plan-actions > span:focus-visible,
.coach-library-page .library-plan-actions .inline-form > button:hover,
.coach-library-page .library-plan-actions .inline-form > button:focus,
.coach-library-page .library-plan-actions .inline-form > button:focus-visible,
.coach-library-page .library-plan-actions .inline-form > span:hover,
.coach-library-page .library-plan-actions .inline-form > span:focus,
.coach-library-page .library-plan-actions .inline-form > span:focus-visible{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transform: translateY(-1px) scale(1.05);
}

.coach-library-page .library-plan-actions .library-icon-btn:hover,
.coach-library-page .library-plan-actions .library-icon-btn:focus,
.coach-library-page .library-plan-actions .library-icon-btn:focus-visible{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: #aaeb42 !important;
  transform: translateY(-1px);
}

.coach-library-page .library-plan-actions .library-icon-btn:hover .nav-icon-lucide,
.coach-library-page .library-plan-actions .library-icon-btn:focus .nav-icon-lucide,
.coach-library-page .library-plan-actions .library-icon-btn:focus-visible .nav-icon-lucide{
  color: #aaeb42 !important;
  stroke: #aaeb42 !important;
}

.coach-library-page .library-plan-actions .icon-btn:focus,
.coach-library-page .library-plan-actions .icon-btn:focus-visible,
.coach-library-page .library-plan-actions .library-plan-icon-action:focus,
.coach-library-page .library-plan-actions .library-plan-icon-action:focus-visible{
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  filter: drop-shadow(0 0 6px rgba(141,195,55,.18));
}

.coach-library-page .library-plan-actions .library-icon-btn:active{
  transform: translateY(1px) scale(.98);
}

.coach-library-page .library-plan-icon-action:active,
.coach-library-page .library-plan-actions .inline-form > button:active,
.coach-library-page .library-plan-actions .inline-form > span:active,
.coach-library-page .library-plan-actions > a:active,
.coach-library-page .library-plan-actions > span:active{
  transform: translateY(1px) scale(.98);
}

.coach-library-page .library-icon-btn.upload-drop{
  width: auto;
}

.coach-library-page .library-icon-btn.is-disabled,
.coach-library-page .library-icon-btn[aria-disabled="true"]{
  opacity: .5;
  pointer-events: none;
}

.coach-library-page .library-icon-btn-danger{
  color: #fecaca !important;
  border-color: rgba(248,113,113,.45) !important;
  background: rgba(127,29,29,.28) !important;
}

.coach-library-page .locker-panel-modern{
  margin-top: 1rem;
}

.coach-library-page .locker-master-body{
  border-top-color: rgba(159,163,160,.14);
}

.coach-library-page .locker-usage-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.coach-library-page .locker-usage-track{
  margin-top: .5rem;
  height: 9px;
  border-radius: 999px;
  background: rgba(159,163,160,.22);
  overflow: hidden;
}

.coach-library-page .locker-usage-fill{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #557e02 0%, #659306 52%, #699a05 100%);
  box-shadow: 0 0 0 1px rgba(101,147,6,.18), 0 0 16px rgba(101,147,6,.22);
}

.coach-library-page .locker-usage-fill.is-visible{
  min-width: 10px;
}
html:not([data-theme="dark"]) .coach-library-page .locker-usage-track{
  background: rgba(159,163,160,.2);
}

html:not([data-theme="dark"]) .coach-library-page .locker-usage-fill{
  background: linear-gradient(90deg, #557e02 0%, #659306 52%, #699a05 100%);
  box-shadow: 0 0 0 1px rgba(85,126,2,.12), 0 0 14px rgba(101,147,6,.14);
}

.coach-library-page .locker-list{
  max-height: 410px;
}

.coach-library-page .locker-file-row{
  border-color: rgba(159,163,160,.2);
  padding: .8rem 1rem;
}

.coach-library-page .locker-file-icon{
  color: #97d337;
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.1);
}

.coach-library-page .locker-file-icon.is-pdf{
  color: #ef4444;
}

.coach-library-page .locker-file-icon.is-doc{
  color: #97d337;
}

.coach-library-page .locker-shared-meta{
  color: #97d337;
  font-weight: 600;
}

.coach-library-page .locker-file-row .coach-library-file-actions{
  gap: .7rem;
}

.coach-library-page .locker-action-btn{
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: auto;
  height: auto;
  min-height: 32px;
  padding: 4px;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #d3d7d4;
  box-shadow: none;
  outline: none;
  transform: translateY(0);
  transition: color .18s ease, transform .16s ease;
}

.coach-library-page a.locker-action-btn,
.coach-library-page button.locker-action-btn,
.coach-library-page .locker-action-btn.pill-link,
.coach-library-page .locker-action-btn.library-icon-btn{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.coach-library-page .locker-action-btn .nav-icon-lucide{
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2.05;
}

.coach-library-page .locker-action-btn:hover{
  color: #f8fbff;
  transform: translateY(-1px);
}

.coach-library-page .locker-action-btn:focus-visible{
  outline: none;
  border: 0;
  box-shadow: none;
  transform: translateY(-1px);
}

.coach-library-page .locker-action-btn:active{
  transform: translateY(1px);
}

.coach-library-page .locker-upload-modal-card{
  width: min(100%, 26rem);
  gap: .9rem;
}

.coach-library-page .locker-upload-modal-head{
  display: grid;
  gap: .25rem;
}

.coach-library-page .locker-upload-progress-track{
  height: 10px;
  border-radius: 999px;
  background: rgba(159,163,160,.18);
  overflow: hidden;
}

.coach-library-page .locker-upload-progress-fill{
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #97d337 0%, #557e02 100%);
  transition: width .18s ease;
}

.coach-library-page .locker-upload-progress-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: #d3d7d4;
  font-size: .9rem;
}

.coach-library-page .locker-upload-modal-actions{
  display: flex;
  justify-content: flex-end;
}

.coach-library-page .locker-share-action-btn{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}

.coach-library-page .locker-share-action-btn:hover,
.coach-library-page .locker-share-action-btn:focus,
.coach-library-page .locker-share-action-btn:focus-visible,
.coach-library-page .locker-share-action-btn:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}

.coach-library-page .locker-action-btn-danger{
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f87171 !important;
}

.coach-library-page .locker-action-btn-danger:hover,
.coach-library-page .locker-action-btn-danger:focus-visible{
  background: transparent !important;
  box-shadow: none !important;
  color: #fca5a5 !important;
}

.coach-library-page .exercise-master-body{
  border-top-color: rgba(159,163,160,.14);
}

.coach-library-page .exercise-list-modern{
  max-height: 460px;
}

.coach-library-page .exercise-category-group{
  display: grid;
  gap: .7rem;
  min-width: 0;
}

.coach-library-page .exercise-category-group + .exercise-category-group{
  margin-top: .45rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--color-border);
}

.coach-library-page .exercise-category-group-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
  padding: 0 .15rem;
}

.coach-library-page .exercise-category-group-head > strong{
  min-width: 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.coach-library-page .exercise-category-group .library-plan-section{
  gap: .55rem;
  min-width: 0;
  padding-left: .8rem;
  border-left: 2px solid var(--color-border);
}

.coach-library-page .exercise-category-group .library-plan-section + .library-plan-section{
  margin-top: .15rem;
  padding-top: .65rem;
}

.coach-library-page .exercise-category-group .library-plan-section-head{
  padding-inline: .1rem;
}

.coach-library-page .exercise-row-card{
  border-color: rgba(159,163,160,.2);
}

.coach-library-page .exercise-row-summary{
  padding: .25rem 0;
}

.coach-library-page .exercise-row-summary .pill-static{
  pointer-events: none;
}

.coach-library-page .exercise-row-icon{
  color: #9fa3a0;
  background: rgba(159,163,160,.14);
}

.coach-library-page .exercise-row-title-line{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .2rem;
}

.coach-library-page .exercise-category-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .14rem .55rem;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid rgba(159,163,160,.25);
  background: rgba(39,42,39,.45);
  color: #d1d5d2;
}

.coach-library-page .exercise-category-pill.cat-mobility{
  color: #97d337;
  border-color: rgba(151,211,55,.45);
  background: rgba(104,146,36,.18);
}

.coach-library-page .exercise-category-pill.cat-core{
  color: #f59e0b;
  border-color: rgba(245,158,11,.42);
  background: rgba(146,64,14,.2);
}

.coach-library-page .exercise-category-pill.cat-cardio{
  color: #fb7185;
  border-color: rgba(251,113,133,.42);
  background: rgba(159,18,57,.2);
}

.coach-library-page .exercise-category-pill.cat-strength{
  color: #8dc337;
  border-color: rgba(141,195,55,.45);
  background: rgba(78,111,24,.2);
}

.coach-library-page .exercise-category-pill.cat-functional{
  color: #34d399;
  border-color: rgba(52,211,153,.45);
  background: rgba(63,90,22,.22);
}

.coach-library-page .exercise-category-pill.cat-hiit{
  color: #f97316;
  border-color: rgba(249,115,22,.45);
  background: rgba(154,52,18,.2);
}

.coach-library-page .exercise-category-pill.cat-legs{
  color: #97d337;
  border-color: rgba(151,211,55,.45);
  background: rgba(104,146,36,.18);
}

.coach-library-page .exercise-category-pill.cat-shoulders{
  color: #81b430;
  border-color: rgba(129,180,48,.42);
  background: rgba(61,91,0,.2);
}

.coach-library-page .exercise-category-pill.cat-back{
  color: #22c55e;
  border-color: rgba(34,197,94,.42);
  background: rgba(20,83,45,.25);
}

.coach-library-page .exercise-category-pill.cat-chest{
  color: #ef4444;
  border-color: rgba(239,68,68,.42);
  background: rgba(127,29,29,.25);
}

.coach-library-page .exercise-category-pill.cat-yoga{
  color: #81b430;
  border-color: rgba(129,180,48,.42);
  background: rgba(50,76,0,.22);
}

.coach-library-page .exercise-category-pill.cat-rehab{
  color: #facc15;
  border-color: rgba(250,204,21,.45);
  background: rgba(133,77,14,.24);
}

.coach-library-page .exercise-category-pill.cat-calisthenics{
  color: #22c55e;
  border-color: rgba(34,197,94,.42);
  background: rgba(22,101,52,.24);
}

.coach-library-page .exercise-category-pill.cat-gymnastics{
  color: #9bd73c;
  border-color: rgba(155,215,60,.45);
  background: rgba(59,89,2,.25);
}

.coach-library-page .exercise-filter-chips{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.coach-library-page .exercise-filter-chips[hidden]{
  display: none !important;
}

.coach-library-page .exercise-filter-tools{
  display: flex;
  align-items: center;
  gap: .5rem;
}

.coach-library-page .exercise-filter-tools .library-search-input-wrap{
  flex: 1;
}

.coach-library-page .exercise-filter-toggle{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #9fa3a0;
  padding: .2rem;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.coach-library-page .exercise-filter-toggle:hover,
.coach-library-page .exercise-filter-toggle[aria-expanded="true"]{
  color: #97d337;
}

.coach-library-page .exercise-filter-chip{
  border: 1px solid rgba(159,163,160,.2);
  background: rgba(22,25,22,.4);
  color: #9fa3a0;
  border-radius: 999px;
  padding: .32rem .75rem;
  font-weight: 600;
  cursor: pointer;
}

.coach-library-page .exercise-filter-chip.is-active{
  color: #97d337;
  border-color: rgba(151,211,55,.45);
  background: rgba(104,146,36,.18);
}

.coach-library-page .library-add-btn{
  width: auto;
}

.coach-library-page .library-stock-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .1rem .45rem;
  background: rgba(123,172,44,.15);
  border: 1px solid rgba(123,172,44,.35);
  color: #9bd73c;
  font-weight: 600;
}

.coach-library-page .library-meta-dot{
  padding: 0 .2rem;
}

html:not([data-theme="dark"]) .coach-library-page .library-panel-modern{
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f2 100%);
  border-color: rgba(86,127,0,.2);
  box-shadow: 0 10px 22px rgba(22,25,22,.08);
}

html:not([data-theme="dark"]) .coach-library-page .library-master-body{
  border-top-color: rgba(86,127,0,.14);
}

html:not([data-theme="dark"]) .coach-library-page .library-title-line strong{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-library-page .library-panel-icon{
  background: rgba(123,172,44,.12);
  border-color: rgba(123,172,44,.3);
  color: #7bac2c;
}

html:not([data-theme="dark"]) .coach-library-page .page-actions .admin-back.back-link{
  background: #161916;
  border-color: rgba(22,25,22,.85);
  color: #f8fafc !important;
  box-shadow: none;
}

html:not([data-theme="dark"]) .coach-library-page .page-actions .admin-back.back-link:hover,
html:not([data-theme="dark"]) .coach-library-page .page-actions .admin-back.back-link:focus-visible{
  background: #272a27;
  border-color: rgba(39,42,39,.7);
  color: #f8fafc !important;
}

html:not([data-theme="dark"]) .coach-library-page .library-search-input-wrap{
  background: #fff;
  border-color: rgba(159,163,160,.4);
}

html:not([data-theme="dark"]) .coach-library-page .library-search-input-wrap input{
  color: #161916;
}

html:not([data-theme="dark"]) .workout-builder-page .library-search-input-wrap{
  background: #fff;
  border-color: rgba(159,163,160,.4);
}

html:not([data-theme="dark"]) .workout-builder-page .library-search-input-wrap input{
  color: #161916;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result,
html:not([data-theme="dark"]) .workout-builder-page button.plan-exercise-search-result{
  border-color: rgba(159,163,160,.22);
  background: #e3e7e3;
  color: #161916;
  box-shadow: none;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result:hover,
html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result:focus-visible,
html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result.is-selected,
html:not([data-theme="dark"]) .workout-builder-page button.plan-exercise-search-result:hover,
html:not([data-theme="dark"]) .workout-builder-page button.plan-exercise-search-result:focus-visible,
html:not([data-theme="dark"]) .workout-builder-page button.plan-exercise-search-result.is-selected{
  border-color: rgba(151,211,55,.3);
  background: #e3e7e3;
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.12);
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result-name{
  color: #161916;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result-meta{
  color: #707471;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-result-icon{
  background: rgba(123,172,44,.14);
  color: #689224;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-dropdown{
  background: rgba(255,255,255,.85);
  border-color: rgba(159,163,160,.26);
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-search-dropdown.is-idle{
  background: transparent;
  border-color: transparent;
}

html[data-theme="dark"] .workout-builder-page button.plan-exercise-search-result{
  background: #364e11 !important;
  color: #f8fbff !important;
  border: 1px solid rgba(131,181,50,.18) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .workout-builder-page button.plan-exercise-search-result:hover,
html[data-theme="dark"] .workout-builder-page button.plan-exercise-search-result:focus-visible,
html[data-theme="dark"] .workout-builder-page button.plan-exercise-search-result.is-selected{
  background: #364e11 !important;
  color: #f8fbff !important;
  border-color: rgba(151,211,55,.38) !important;
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.18) !important;
}

html[data-theme="dark"] .workout-builder-page button.plan-exercise-search-result .plan-exercise-search-result-name{
  color: #f8fbff !important;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-save-btn{
  color: #166534;
  border-color: rgba(22,163,74,.52);
  background: linear-gradient(180deg, rgba(240,253,244,.96), rgba(220,252,231,.88));
  box-shadow: inset 0 0 0 1px rgba(22,163,74,.12), 0 10px 24px rgba(34,197,94,.1);
}

html:not([data-theme="dark"]) .workout-builder-page .plan-save-btn:hover,
html:not([data-theme="dark"]) .workout-builder-page .plan-save-btn:focus-visible{
  border-color: rgba(21,128,61,.64);
  background: linear-gradient(180deg, rgba(220,252,231,.98), rgba(187,247,208,.92));
  box-shadow: inset 0 0 0 1px rgba(21,128,61,.18), 0 12px 28px rgba(34,197,94,.12);
}

html:not([data-theme="dark"]) .workout-builder-page .plan-delete-btn{
  color: #b91c1c;
  border-color: rgba(248,113,113,.34);
  background: linear-gradient(180deg, rgba(254,242,242,.98), rgba(254,226,226,.9));
  box-shadow: 0 10px 24px rgba(248,113,113,.08);
}

html:not([data-theme="dark"]) .workout-builder-page .plan-delete-btn:hover,
html:not([data-theme="dark"]) .workout-builder-page .plan-delete-btn:focus-visible{
  border-color: rgba(248,113,113,.45);
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(254,202,202,.92));
}

html:not([data-theme="dark"]) .workout-builder-page .plan-add-btn{
  color: #161917 !important;
  border-color: rgba(229,233,229,.96) !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-add-btn:hover,
html:not([data-theme="dark"]) .workout-builder-page .plan-add-btn:focus-visible{
  color: #161916 !important;
  border-color: rgba(209,213,210,1) !important;
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) .workout-builder-page .plan-exercise-preview-icon-wrap{
  background: #fff;
  border-color: rgba(159,163,160,.32);
}

html:not([data-theme="dark"]) .exercise-thumb-fallback-inline{
  background: #fff;
  border-color: rgba(159,163,160,.32);
  color: #707471;
}

html:not([data-theme="dark"]) .coach-library-page .library-plan-row{
  background: #ffffff;
  border-color: rgba(159,163,160,.32);
}
html:not([data-theme="dark"]) .coach-library-page .library-plan-section + .library-plan-section{
  border-top-color: rgba(159,163,160,.24);
}
html:not([data-theme="dark"]) .coach-library-page .library-plan-section-head strong,
html:not([data-theme="dark"]) .routine-section .library-plan-section-head strong{
  color: #3e413e;
}
html:not([data-theme="dark"]) .coach-library-page .library-plan-section-count,
html:not([data-theme="dark"]) .routine-section .library-plan-section-count{
  color: #525552;
  border-color: rgba(159,163,160,.32);
  background: rgba(241,245,249,.78);
}

html:not([data-theme="dark"]) .coach-library-page .library-plan-row-stock{
  background: #f8fafc;
}

html:not([data-theme="dark"]) .coach-library-page .library-plan-icon{
  background: rgba(123,172,44,.14);
  color: #689224;
}

html:not([data-theme="dark"]) .coach-library-page .locker-action-btn{
  color: #616562;
}

html:not([data-theme="dark"]) .coach-library-page .locker-action-btn:hover{
  color: #161916;
}

html:not([data-theme="dark"]) .coach-library-page .locker-share-action-btn{
  color: #638c21;
}

html:not([data-theme="dark"]) .coach-library-page .locker-share-action-btn:hover{
  color: #4e6f18;
}

html:not([data-theme="dark"]) .coach-library-page .exercise-row-icon{
  color: #707471;
  background: rgba(112,116,113,.14);
}

html:not([data-theme="dark"]) .coach-library-page .exercise-filter-chip{
  background: #f0f4f0;
  color: #3e413e;
  border-color: rgba(159,163,160,.4);
}

html:not([data-theme="dark"]) .coach-library-page .exercise-filter-chip.is-active{
  color: #364e11;
  border-color: rgba(83,118,29,.45);
  background: rgba(151,211,55,.2);
}

html:not([data-theme="dark"]) .coach-library-page .library-stock-pill{
  background: rgba(123,172,44,.12);
  border-color: rgba(123,172,44,.3);
  color: #4e6f18;
}

@media (max-width: 760px){
  .coach-library-page .library-panel-head{
    align-items: flex-start;
  }
  .coach-library-page .library-panel-icon{
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex: 0 0 38px;
  }
  .coach-library-page .library-title-line strong{
    font-size: 1.2rem;
  }
  .coach-library-page .library-title-line{
    gap: .45rem;
    flex-wrap: wrap;
  }
  .coach-library-page .library-panel-head .library-collapse-btn{
    margin-left: auto;
  }
  .coach-library-page .library-modern-tools{
    grid-template-columns: 1fr;
  }
  .coach-library-page .library-top-actions{
    flex-wrap: wrap;
    width: 100%;
  }
  .coach-library-page .library-top-actions .inline-form{
    width: 100%;
  }
  .coach-library-page .library-top-actions .library-icon-btn{
    width: 100%;
    justify-content: center;
  }
  .coach-library-page .library-search-input-wrap{
    width: 100%;
  }
  .coach-library-page .library-plan-row{
    padding: .7rem;
  }
  .coach-library-page .coach-library-plan{
    flex-direction: column;
    align-items: stretch;
    gap: .65rem;
  }
  .coach-library-page .library-plan-actions,
  .coach-library-page .coach-library-file-actions{
    width: 100%;
    justify-content: flex-start;
  }
  .coach-library-page .locker-file-row{
    padding: .85rem;
  }
  .coach-library-page .library-plan-main{
    align-items: flex-start;
  }
  .coach-library-page .library-plan-main .coach-library-file-name{
    overflow-wrap: anywhere;
  }
}

.coach-library-file{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .6rem;
  align-items: center;
  padding: .5rem .65rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.25);
  background: rgba(255,255,255,.06);
}

.coach-library-plan{
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: center;
}

.coach-library-file-main{
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.exercise-thumb-preview{
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: .35rem;
  border: 1px solid rgba(159,163,160,.35);
  background: rgba(22,25,22,.2);
}

.coach-library-file-name{
  font-weight: 600;
}

.coach-library-file-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.inline-form{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}

.inline-file-label{
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}

.pill-input{
  color: inherit;
  border-radius: 999px;
  padding: .35rem .6rem;
  border: 1px solid rgba(159,163,160,.35);
  background: rgba(255,255,255,.1);
}

.pill-input::file-selector-button{
  border: none;
  border-radius: 999px;
  padding: .35rem .8rem;
  margin-right: .5rem;
  background: #fff;
  color: #101311;
  font-weight: 600;
}

html[data-theme="dark"] .pill-input{
  background: rgba(255,255,255,.08);
  border-color: rgba(159,163,160,.3);
}

html[data-theme="dark"] .pill-input::file-selector-button{
  background: #fff;
  color: #101311;
}

.coach-library-file-actions .pill-link.small,
.exercise-actions .pill-link.small{
  padding: .3rem .8rem;
}


.inline-file-label input[type="file"]{
  max-width: 220px;
}

.coach-library-plan .pill-link{
  padding: .35rem .9rem;
}

.coach-library-file details,
details.coach-library-file{
  display: block;
}

.coach-library-summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.coach-library-summary::-webkit-details-marker{
  display: none;
}

.exercise-inline{
  margin-top: .75rem;
  display: grid;
  gap: .6rem;
}

.exercise-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.exercise-thumb-actions{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.exercise-thumb-disabled{
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(159,163,160,.3);
  border-radius: 10px;
  background: rgba(159,163,160,.15);
  color: #9fa3a0;
  padding: .55rem .7rem;
}

.upload-drop-small{
  min-height: 36px;
  padding: .3rem .85rem;
}

.coach-library-file input{
  accent-color: #567f00;
}

.pill-link.is-loading{
  opacity: .7;
  pointer-events: none;
}

.pill-link.is-disabled,
.pill-link[aria-disabled="true"]{
  opacity: .6;
  pointer-events: none;
}

@media (max-width: 720px){
  .modal-grid{
    grid-template-columns: 1fr;
  }
}


.upload-drop{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .4rem 1.1rem;
  border-radius: 999px;
  border: 1px dashed rgba(159,163,160,.5);
  color: inherit;
  background: rgba(255,255,255,.08);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.upload-drop:hover{
  border-color: rgba(104,153,1,.6);
  background: rgba(104,153,1,.08);
}

.upload-drop input[type="file"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.upload-drop:focus-within{
  outline: none;
  box-shadow: 0 0 0 3px rgba(104,153,1,.25);
}

html[data-theme="dark"] .upload-drop{
  background: rgba(255,255,255,.06);
  border-color: rgba(159,163,160,.35);
}

html[data-theme="dark"] .upload-drop:hover{
  border-color: rgba(141,195,55,.6);
  background: rgba(141,195,55,.08);
}

input::-webkit-search-cancel-button,
input::-webkit-search-decoration,
input::-webkit-search-results-button,
input::-webkit-search-results-decoration{
  -webkit-appearance: none;
}

input:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(104,153,1,.25);
}

html[data-theme="dark"] input:focus{
  box-shadow: 0 0 0 3px rgba(141,195,55,.25);
}


.coach-library-page .pill-link{
  text-decoration: none;
}

.coach-library-page .pill-link:hover,
.coach-library-page .pill-link:focus,
.coach-library-page .pill-link:active{
  text-decoration: none;
  box-shadow: none;
}

.coach-library-page .modal{
  z-index: 4000;
}

.coach-library-page .modal-backdrop{
  position: fixed;
}

.coach-library-page .modal-card{
  position: relative;
  z-index: 1;
  background: var(--card);
  opacity: 1;
}


.coach-library-page .pill-link{
  box-shadow: none !important;
}

.coach-library-page .pill-link:hover,
.coach-library-page .pill-link:focus,
.coach-library-page .pill-link:active{
  box-shadow: none !important;
}

.feed-page{
  display: grid;
  gap: 1rem;
  overflow-x: clip;
}

/* Contacts shortcut pinned to the true top-right of the feed header.
   Absolute positioning keeps it out of the flex flow entirely, so the
   heading and subtitle keep their full width (a flex-based pin collapsed
   the copy to one word per line on mobile). */
body.app .feed-page .page-head{
  position: relative;
  flex-wrap: nowrap;
  align-items: flex-start;
}

body.app .feed-page .page-head > div:first-child{
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 2.75rem;
}

/* Pin the contacts shortcut to the far right of the header and pull it into
   the container's side padding so it hugs the screen edge, not the inner
   content edge. margin-left:auto is a fallback if the pin is ever ignored. */
body.app .feed-page .page-actions{
  position: absolute !important;
  top: .1rem;
  right: -0.5rem !important;
  left: auto !important;
  width: auto !important;
  margin: 0 0 0 auto !important;
  /* Opt out of the generic 2-column .page-actions grid below 760px so the
     lone contacts icon isn't parked in the left grid cell. */
  display: flex !important;
  grid-template-columns: none !important;
  z-index: 3;
}

body.app .feed-page .feed-contact-shortcut{
  justify-content: flex-end;
}

.feed-contact-shortcut,
.feed-contact-shortcut:hover,
.feed-contact-shortcut:focus,
.feed-contact-shortcut:focus-visible,
.feed-contact-shortcut:active{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  text-decoration: none;
  color: var(--color-text-primary, #e5e9e5);
  transition: color .15s ease, transform .15s ease;
}

.feed-contact-shortcut:hover,
.feed-contact-shortcut:focus-visible{
  color: var(--color-text-primary, #e5e9e5);
  transform: translateY(-1.5px);
}

.feed-contact-shortcut:active{
  transform: scale(.86);
}

.feed-contact-shortcut .nav-icon-lucide{
  width: 20px;
  height: 20px;
}

.feed-list{
  display: grid;
  gap: 1rem;
}

.feed-card{
  padding: 1rem 1.1rem;
  min-width: 0;
  overflow-x: clip;
}

.feed-header{
  display: flex;
  align-items: center;
  gap: .75rem;
}

.feed-owner-menu,
.feed-owner-menu:hover,
.feed-owner-menu:focus,
.feed-owner-menu:focus-visible,
.feed-owner-menu:active{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
}

.feed-owner-menu:hover,
.feed-owner-menu:focus-visible{
  color: var(--ink);
}

.feed-owner-menu:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.feed-owner-menu .nav-icon-lucide{
  width: 20px;
  height: 20px;
}

.feed-card.is-removing{
  opacity: 0;
  transform: scale(.985);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.feed-avatar{box-sizing:border-box;flex:0 0 42px;width:42px;min-width:42px;max-width:42px;height:42px;min-height:42px;max-height:42px;aspect-ratio:1;border-radius:50%;overflow:hidden}
.feed-avatar img{
  display:block;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.feed-avatar-placeholder{
  box-sizing:border-box;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 50%;
  background: rgba(159,163,160,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.feed-name{
  font-weight: 600;
}

.feed-time{
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.feed-expand{
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 32px;
  margin-top: .1rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.feed-expand:hover{
  color: var(--brand);
  background: transparent;
}

.feed-expand:focus-visible{
  color: var(--brand);
  background: transparent;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.feed-main{
  margin-top: .7rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  /* Block-level flex that fills the card and lets a long workout name wrap
     instead of overflowing into the card's overflow-x: clip (which cut it off). */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}
.feed-main > span{
  flex: 1 1 12rem;
  min-width: 0;
  /* break-word (not anywhere): wraps normal text at spaces and breaks a long
     unbreakable word, but does NOT shrink the flex item's min-content — which
     is what caused text to stack one character per line on narrow mobile. */
  overflow-wrap: break-word;
}

.feed-strava-badge{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, #fc4c02 14%, transparent);
  color: #fc4c02;
  white-space: nowrap;
}

/* RepTotal GPS activity type badge: match the achievement banner's brand colour
   and hug the text instead of stretching wide. */
.feed-gps-badge{
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
}

.feed-map{
  margin-top: .75rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent);
}

.feed-map svg{
  display: block;
  width: 100%;
  height: auto;
}

/* Live OSM map upgrade for route cards. */
.feed-map.feed-map-live{
  aspect-ratio: 600 / 240;
  background: var(--color-bg-secondary, #161916);
}
.feed-map .leaflet-container{
  width: 100%;
  height: 100%;
  background: transparent;
  font: inherit;
}
html[data-theme="dark"] .feed-map .leaflet-tile-pane{
  filter: invert(.9) hue-rotate(180deg) saturate(.65) brightness(.72) contrast(1.12);
}
.feed-map.feed-map-expandable{ cursor: pointer; }

/* Full-screen route map opened from a feed card. */
.feed-map-modal{
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
}
.feed-map-modal.is-open{ display: flex; }
.feed-map-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6,8,6,.72);
  backdrop-filter: blur(2px);
}
.feed-map-modal-body{
  position: relative;
  width: min(100%, 60rem);
  height: min(85vh, 46rem);
  border-radius: var(--radius, 16px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(6,8,6,.45);
}
.feed-map-modal-canvas{ position: absolute; inset: 0; }
.feed-map-modal-canvas .leaflet-container{ width: 100%; height: 100%; background: var(--color-bg-secondary, #161916); font: inherit; }
html[data-theme="dark"] .feed-map-modal-canvas .leaflet-tile-pane{
  filter: invert(.9) hue-rotate(180deg) saturate(.65) brightness(.72) contrast(1.12);
}
.feed-map-modal-close{
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 1000;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  color: var(--color-text-primary);
  backdrop-filter: blur(8px);
}

.feed-map-route{
  stroke: #80b22e;
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
  paint-order: stroke;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .85));
}

.feed-map-start{ fill: #16a34a; stroke: #fff; stroke-width: 2; }
.feed-map-end{ fill: #dc2626; stroke: #fff; stroke-width: 2; }

/* Labelled stat columns (Distance / Duration / RPE ...) instead of pill
   badges - small muted label over a bold value, like the big fitness apps. */
.feed-stats{
  margin-top: .7rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
}

.feed-stat{
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.feed-stat-label{
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.feed-stat-value{
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* Estimated steps: its own left-aligned block under the tiles, label on top. */
.feed-steps{
  margin-top: .55rem;
  display: grid;
  gap: .1rem;
  justify-items: start;
}

/* Distance personal-best achievements (fastest 5k/10k/...). */
.feed-achievements{
  margin-top: .7rem;
  display: grid;
  gap: .4rem;
}
.feed-achievement{
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}
.feed-achievement-icon.nav-icon-lucide{
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex: 0 0 auto;
}
.feed-achievement-text{
  font-weight: 700;
  font-size: .92rem;
  min-width: 0;
}
.feed-achievement-delta{
  margin-left: auto;
  font-weight: 700;
  font-size: .82rem;
  color: #16a34a;
  white-space: nowrap;
}

/* Kudos avatars + reaction chips + count sit on their own line above the
   action bar. Wraps as a whole so many people's reactions never collide
   with the count or overflow the card. */
.feed-social-row{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .5rem;
  margin-top: .75rem;
  min-height: 24px;
  min-width: 0;
}

.feed-kudos-count{
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.feed-reactions{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  min-width: 0;
}

.feed-reactions:empty{
  display: none;
}

.feed-reaction-chip{
  display: inline-flex;
  align-items: center;
  gap: .24rem;
  padding: .1rem .3rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: .92rem;
  line-height: 1.3;
}

.feed-reaction-chip b{
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
}

/* All reaction chips are transparent - no box, mine included. Your own
   reaction is marked by a slightly stronger count colour, not a fill. */
.feed-reaction-chip.is-mine{
  background: transparent;
}

.feed-reaction-chip.is-mine b{
  color: var(--brand-2);
}

/* Selected reaction is indicated by the chip in the social row, not a box
   on the picker - keep the option transparent. */
.feed-emoji-option.is-active{
  background: transparent !important;
}

/* In-app share sheet: branded card preview + explicit actions, used when
   the native share sheet can't take an image file. */
.feed-share-modal{
  position: fixed;
  inset: 0;
  z-index: 5400;
  display: none;
}

.feed-share-modal.is-open{
  display: block;
}

.feed-share-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(7,9,7,.6);
  backdrop-filter: blur(4px);
}

.feed-share-sheet{
  position: relative;
  z-index: 1;
  width: min(24rem, calc(100% - 2rem));
  max-height: 86vh;
  margin: 6vh auto 0;
  padding: 1rem;
  overflow-y: auto;
  display: grid;
  gap: .75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.feed-share-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.feed-share-head strong{
  font-size: 1rem;
  letter-spacing: -.01em;
}

.feed-share-preview{
  display: block;
  width: 100%;
  border-radius: 14px;
}

.feed-share-to-label{
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Equal-width grid keeps every target identical in size regardless of
   label length or element type (anchor vs button). */
.feed-share-targets{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
  gap: .7rem .4rem;
  justify-items: center;
}

/* html body prefix + doubled class: outranks every glossy/pill button rule
   (including the !important dark-theme ones) so the button-based targets
   render exactly like the anchor-based ones. */
html body button.feed-share-target.feed-share-target,
html body a.feed-share-target.feed-share-target,
html body span.feed-share-target.feed-share-target,
html body button.feed-share-target.feed-share-target:hover,
html body a.feed-share-target.feed-share-target:hover,
html body span.feed-share-target.feed-share-target:hover,
html body button.feed-share-target.feed-share-target:focus,
html body a.feed-share-target.feed-share-target:focus,
html body span.feed-share-target.feed-share-target:focus,
html body button.feed-share-target.feed-share-target:focus-visible,
html body a.feed-share-target.feed-share-target:focus-visible,
html body span.feed-share-target.feed-share-target:focus-visible,
html body button.feed-share-target.feed-share-target:active,
html body a.feed-share-target.feed-share-target:active,
html body span.feed-share-target.feed-share-target:active{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: grid !important;
  grid-template-columns: none !important;
  justify-items: center !important;
  gap: .3rem !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: .2rem 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  outline: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  /* base `button` sets overflow: hidden, which clipped the label */
  overflow: visible !important;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
}

html body .feed-share-target.feed-share-target[hidden]{
  display: none !important;
}

.feed-share-target-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  color: #fff;
  background: var(--soft);
}

.feed-share-target-icon .nav-icon-lucide{
  width: 1.3rem;
  height: 1.3rem;
}

.feed-share-target[data-target="whatsapp"] .feed-share-target-icon{ background: #25d366; }
.feed-share-target[data-target="facebook"] .feed-share-target-icon{ background: #608d02; }
.feed-share-target[data-target="instagram"] .feed-share-target-icon{
  background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #476900);
}
.feed-share-target[data-target="x"] .feed-share-target-icon{ background: #76a625; }
.feed-share-target[data-target="telegram"] .feed-share-target-icon{ background: #76a42e; }
.feed-share-target[data-share-native] .feed-share-target-icon{
  background: var(--soft);
  color: var(--ink);
}

.feed-share-target:hover .feed-share-target-icon,
.feed-share-target:focus-visible .feed-share-target-icon{
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.feed-share-actions{
  display: grid;
  gap: .5rem;
}

/* html body prefix + doubled class pins both actions (button and anchor)
   to identical dimensions - the shared !important button/anchor rules
   otherwise give the anchor a different height, padding, and radius. */
html body button.feed-share-action.feed-share-action,
html body a.feed-share-action.feed-share-action,
html body button.feed-share-action.feed-share-action:hover,
html body a.feed-share-action.feed-share-action:hover,
html body button.feed-share-action.feed-share-action:focus,
html body a.feed-share-action.feed-share-action:focus,
html body button.feed-share-action.feed-share-action:focus-visible,
html body a.feed-share-action.feed-share-action:focus-visible,
html body button.feed-share-action.feed-share-action:active,
html body a.feed-share-action.feed-share-action:active{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .5rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 2.75rem !important;
  max-height: none !important;
  margin: 0 !important;
  padding: .55rem .9rem !important;
  border-radius: 12px !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}

html body .feed-share-action.feed-share-action[hidden]{
  display: none !important;
}

.feed-share-toast{
  position: absolute;
  left: 50%;
  bottom: .9rem;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  padding: .45rem .95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 3;
}

.feed-share-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Fixed loading toast shown the instant Share is tapped */
.feed-global-toast{
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  z-index: 6000;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.feed-global-toast::before{
  content: "";
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent, #97d337) 40%, transparent);
  border-top-color: var(--accent, #97d337);
  animation: feedToastSpin .6s linear infinite;
}

.feed-global-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

.feed-share-btn.is-loading{
  opacity: .55;
  pointer-events: none;
}

@keyframes feedToastSpin{
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce){
  .feed-global-toast::before{ animation: none; }
}

/* Bottom-sheet presentation on phones: anchored to the bottom edge with
   safe-area padding so the last button is never clipped. */
@media (max-width: 620px){
  .feed-share-modal.is-open{
    display: flex;
    align-items: flex-end;
  }

  .feed-share-sheet{
    width: 100%;
    max-height: calc(100dvh - 3rem);
    margin: 0;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

.feed-share-action .nav-icon-lucide{
  width: 1.05rem;
  height: 1.05rem;
}

.feed-actions{
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: .25rem;
  min-width: 0;
}

.feed-emoji-picker{
  display: flex;
  align-items: center;
  gap: .15rem;
  width: max-content;
  max-width: 100%;
  margin-top: .5rem;
  padding: .3rem .45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.feed-emoji-picker[hidden]{
  display: none !important;
}

/* Doubled class + icon-btn escape hatch: the global dark-theme button rules
   force glossy backgrounds/borders on plain buttons, which boxed these in. */
button.feed-emoji-option.feed-emoji-option,
.feed-emoji-option{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem !important;
  min-width: 2.1rem !important;
  max-width: 2.1rem !important;
  height: 2.1rem !important;
  min-height: 2.1rem !important;
  max-height: 2.1rem !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

button.feed-emoji-option.feed-emoji-option:hover,
button.feed-emoji-option.feed-emoji-option:focus-visible,
.feed-emoji-option:hover,
.feed-emoji-option:focus-visible{
  background: var(--soft) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: scale(1.12);
}

.feed-emoji-option.is-sent{
  transform: scale(1.3);
}

.feed-kudos-btn{
  color: inherit;
}

.feed-kudos-btn:hover{
  color: var(--brand);
  background: rgba(104,153,1,.08);
}

.feed-kudos-btn:focus-visible{
  color: var(--brand);
  background: rgba(104,153,1,.12);
}

.feed-kudos-btn.is-active{
  color: var(--brand);
  background: rgba(104,153,1,.12);
}

.feed-action-button[data-disabled="true"]{
  opacity: .6;
  cursor: not-allowed;
}

.feed-action-button[data-disabled="true"]:hover,
.feed-action-button[data-disabled="true"]:focus-visible{
  color: inherit;
  background: transparent;
}

.feed-action-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  border: none !important;
  border-radius: 10px;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.feed-action-button:hover{
  color: var(--brand);
  background: rgba(104,153,1,.08) !important;
}

.feed-action-button:focus-visible{
  color: var(--brand);
  background: rgba(104,153,1,.12) !important;
}

html[data-theme="dark"] .feed-expand:hover{
  color: #83b532;
  background: transparent !important;
}

html[data-theme="dark"] .feed-expand:focus-visible{
  color: #83b532;
  background: transparent !important;
}

html[data-theme="dark"] .feed-kudos-btn:hover{
  color: #83b532;
  background: rgba(131,181,50,.12) !important;
}

html[data-theme="dark"] .feed-kudos-btn:focus-visible{
  color: #83b532;
  background: rgba(131,181,50,.16) !important;
}

html[data-theme="dark"] .feed-kudos-btn.is-active{
  color: #83b532;
  background: rgba(131,181,50,.16);
}

.feed-kudos-stack{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  isolation: isolate;
}

.feed-kudos-avatar{
  box-sizing: border-box;
  flex: 0 0 24px;
  position: relative;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--card);
  margin-left: -8px;
  background: var(--card);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 18%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.feed-kudos-avatar:first-child{
  margin-left: 0;
}

/* Most recent reactor (first in the list) sits on top; earlier ones stack
   behind it, descending. */
.feed-kudos-avatar:nth-child(1){ z-index: 5; }
.feed-kudos-avatar:nth-child(2){ z-index: 4; }
.feed-kudos-avatar:nth-child(3){ z-index: 3; }
.feed-kudos-avatar:nth-child(4){ z-index: 2; }
.feed-kudos-avatar:nth-child(n+5){ z-index: 1; }

.feed-kudos-avatar img{
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.feed-kudos-placeholder{
  color: var(--text);
}

.feed-expanded{
  margin-top: .75rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  display: grid;
  gap: .5rem;
}

.feed-breakdown{
  display: flex;
  flex-direction: column;
}

.feed-breakdown-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: .92rem;
  min-width: 0;
  padding: .5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.feed-breakdown-row:first-child{
  padding-top: 0;
}

/* Exercise name: flexes to fill and wraps a long/unbreakable name rather than
   being clipped by the card's overflow-x: clip. */
.feed-breakdown-row > span:first-child{
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: break-word;
  font-weight: 600;
}

.feed-breakdown-row-hidden{
  display: none !important;
}

.feed-breakdown-row[hidden]{
  display: none !important;
}

/* The single More opens into labelled groups, so exercises and muscles stay
   told apart once both are on screen. */
.feed-detail-group{
  display: grid;
  gap: .3rem;
}
.feed-detail-title{
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Collapsed, the muscles are one wrapping line beside the map rather than a
   paragraph each, which is what made a short post tall on a phone. */
.feed-muscle-line{
  margin: .15rem 0 0;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.feed-breakdown-note{
  color: var(--muted);
  font-style: italic;
}
.feed-card > .feed-expand{
  display:flex;
  justify-content:center;
  gap:.4rem;
  width:100%;
  margin:.1rem 0 0;
  padding:.5rem 0;
  border-top:1px solid var(--border);
}
.feed-card > .feed-expand::after{
  content:"";
  width:.42rem;
  height:.42rem;
  margin-top:-.18rem;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
  transition:transform .18s ease, margin .18s ease;
}
.feed-card > .feed-expand.is-open::after{
  margin-top:.18rem;
  transform:rotate(225deg);
}
.feed-card > .feed-expanded{
  max-height:0;
  margin-top:0;
  padding-top:0;
  border-top:0;
  opacity:0;
  overflow:hidden;
  overscroll-behavior:contain;
  transition:max-height .24s ease, opacity .16s ease, margin .2s ease, padding .2s ease;
}
.feed-card > .feed-expanded.is-open{
  max-height:min(55vh, 520px);
  margin-top:.35rem;
  padding:.7rem .2rem .15rem 0;
  border-top:1px solid var(--border);
  opacity:1;
  overflow-y:auto;
  scrollbar-width:thin;
}
@media (max-width:700px){
  .feed-card > .feed-expanded.is-open{
    max-height:48vh;
  }
  .feed-detail-group{
    gap:.15rem;
  }
  .feed-detail-group + .feed-detail-group{
    margin-top:.55rem;
  }
  .feed-detail-title{
    font-size:.7rem;
  }
}
@media (prefers-reduced-motion:reduce){
  .feed-card > .feed-expand::after,
  .feed-card > .feed-expanded{
    transition:none;
  }
}

.feed-breakdown-metrics{
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.feed-breakdown-more{
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: .82rem;
  color: var(--brand-2);
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .45rem .9rem;
  margin: .7rem 0 0;
  cursor: pointer;
  text-align: center;
}

.feed-breakdown-more:hover,
.feed-breakdown-more:focus-visible{
  background: var(--soft);
  border-color: color-mix(in srgb, var(--brand-2) 45%, var(--border));
}

.feed-view{
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 640px){
  .feed-page{
    gap: .85rem;
  }

  .feed-card{
    padding: .9rem;
    border-radius: 16px;
  }

  .feed-header{
    align-items: flex-start;
  }

  .feed-header > div:nth-child(2){
    min-width: 0;
    flex: 1 1 auto;
  }

  .feed-name,
  .feed-time{
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .feed-main{
    align-items: flex-start;
    gap: .45rem;
  }

  .feed-main > span{
    flex-basis: 100%;
  }

  .feed-strava-badge{
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
  }

  .feed-map{
    border-radius: 12px;
  }

  .feed-map svg{
    min-height: 132px;
  }

  .feed-metrics{
    gap: .4rem;
  }

  .feed-stats{
    gap: .5rem 1.2rem;
  }

  .feed-kudos-count{
    min-width: 0;
    overflow-wrap: break-word;
  }

  .feed-expanded{
    overflow: visible;
  }

  .feed-breakdown{
    gap: .15rem;
  }

  .feed-breakdown-row{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .18rem;
    align-items: start;
    padding: .62rem 0;
  }

  .feed-breakdown-row > span:first-child{
    width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.3;
  }

  .feed-breakdown-metrics{
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.3;
  }

}

@media (max-width: 1023px){
  body.app[data-authenticated="1"] .feed-page{
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    gap: .65rem;
  }

  body.app[data-authenticated="1"] .feed-page > .page-head{
    margin-inline: 1rem;
  }

  body.app[data-authenticated="1"] .feed-list{
    gap: .25rem;
  }

  body.app[data-authenticated="1"] .feed-card{
    width: 100%;
    margin: 0;
    padding: 1rem;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.app[data-authenticated="1"] .feed-card .feed-map{
    margin-right: -1rem;
    margin-left: -1rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  body.app[data-authenticated="1"] .feed-page > :is(#feed-empty, #feed-loading, #feed-load-more){
    margin-right: 1rem;
    margin-left: 1rem;
  }
}

@media (max-width: 640px){
  body.app[data-authenticated="1"] .feed-page > .page-head{
    width: 100%;
    margin-inline: 0;
    padding-right: 0;
    padding-left: 1rem;
    box-sizing: border-box;
  }

  body.app[data-authenticated="1"] .feed-page .page-actions{
    right: 0.5rem !important;
  }
}

@media (min-width: 1024px){
  body.app[data-authenticated="1"] .feed-page{
    width: min(100%, 920px);
    margin-inline: auto;
    gap: .75rem;
  }

  body.app[data-authenticated="1"] .feed-list{
    gap: .4rem;
  }

  body.app[data-authenticated="1"] .feed-card{
    border-radius: 8px !important;
    box-shadow: none !important;
  }
}

.pill-static{
  display: inline-flex;
  align-items: center;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(159,163,160,.45);
  font-weight: 600;
  color: inherit;
  background: transparent;
}

html[data-theme="dark"] .pill-static{
  border-color: rgba(159,163,160,.35);
}

.coach-library-page .modal{
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.coach-library-page .modal.is-open{
  display: flex;
}

.coach-library-page .modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 0;
}

.coach-library-page .modal-card{
  position: relative;
  z-index: 1;
  opacity: 1;
}

.coach-library-page .modal-card{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.coach-library-page .modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.coach-library-page .modal-body{
  padding-top: .5rem;
}

.coach-library-page .modal-body .grid2{
  gap: .75rem 1rem;
}

.coach-library-page .modal-body label{
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.coach-library-page .modal-body input,
.coach-library-page .modal-body select,
.coach-library-page .modal-body textarea{
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.coach-library-page .modal-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.messages-segmented{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: .35rem 0 .65rem;
  padding: .2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 82%, transparent);
}

.messages-segment{
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: .38rem .9rem;
  border-radius: 999px;
  cursor: pointer;
}

.messages-segment.is-active{
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 26%, transparent);
}

.messages-documents-panel{
  display: grid;
  gap: .65rem;
}

.messages-documents-panel[hidden]{
  display: none !important;
}

.messages-doc-row{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
}

.messages-doc-icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-doc-main{
  min-width: 0;
}

.messages-doc-title{
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-doc-actions{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.message-attachments{
  margin-top: .35rem;
  display: grid;
  gap: .3rem;
}

.message-attachment-link{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .28rem .55rem;
  width: fit-content;
  max-width: 100%;
}

.message-attachment-link span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(320px, 60vw);
}

.message-attachment-link:hover{
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}

.locker-share-client-list{
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0;
  padding: .25rem;
  border: 1px solid rgba(151,211,55,.14);
  border-radius: 18px;
  background: rgba(14,17,15,.72);
  position: relative;
  z-index: 0;
}

.locker-share-client-row{
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.locker-share-client-row:hover{
  background: rgba(151,211,55,.05);
  border-color: rgba(159,163,160,.16);
}

.locker-share-client-row:has(input[type="checkbox"]:checked){
  background: rgba(151,211,55,.06);
  border-color: rgba(151,211,55,.18);
}

.locker-share-client-row input[type="checkbox"]{
  margin: 0;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.locker-share-client-row-inner{
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  min-height: 4rem;
  padding: .625rem .75rem;
  min-width: 0;
}

.locker-share-toggles{
  display: grid;
  gap: .7rem;
  margin-top: .25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(159,163,160,.12);
}

.locker-share-count{
  margin: .35rem 0 .1rem;
  padding-left: .1rem;
}

.locker-share-modal-card{
  width: min(520px, calc(100vw - 2rem));
  border: 1px solid rgba(197,201,197,.44);
  background: linear-gradient(180deg, rgba(17,19,17,.98), rgba(10,13,11,.99));
  box-shadow: 0 26px 70px rgba(0,0,0,.42);
  border-radius: 22px;
  padding: 1.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.locker-share-modal-card .modal-body{
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0;
}

.locker-share-subtitle{
  margin-top: .22rem;
  color: #9fa29f;
  font-size: .9rem;
}

.locker-share-form{
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.locker-share-file-pill{
  display: flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid rgba(151,211,55,.16);
  border-radius: 14px;
  padding: .75rem .85rem;
  background: rgba(255,255,255,.03);
  color: #f2f6f3;
  font-size: .95rem;
}

.locker-share-file-icon{
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239,68,68,.16);
  border: 1px solid rgba(239,68,68,.24);
  color: #f87171;
}

.locker-share-file-copy{
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.locker-share-file-copy strong{
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locker-share-header{
  align-items: flex-start;
  border-bottom: 0;
  padding: 0;
  margin-bottom: 1.25rem;
}

.locker-share-header-main{
  display: flex;
  align-items: center;
  gap: .9rem;
}

.locker-share-header-main strong{
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.locker-share-header-icon{
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(151,211,55,.14);
  color: #97d337;
  border: 1px solid rgba(151,211,55,.18);
}

.locker-share-close-btn{
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.26);
  background: rgba(255,255,255,.03);
  color: #e3e7e4;
}

.locker-share-close-btn:hover{
  background: rgba(159,163,160,.12);
}

.locker-share-search-panel{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: .7rem;
  width: 100%;
  min-width: 0;
}

.locker-share-search-field{
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border-radius: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.locker-share-search-icon{
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9fa29f;
  pointer-events: none;
}

.locker-share-search-field input{
  width: 100%;
  min-width: 0;
  min-height: 2.95rem;
  padding: 0 .9rem 0 2.7rem;
  border: 1px solid rgba(151,211,55,.42);
  border-radius: 14px;
  background: rgba(11,13,11,.9);
  box-shadow: none;
}

.locker-share-search-field input:focus{
  box-shadow: none;
}

.locker-share-search-field input:focus,
.locker-share-search-field:focus-within input{
  border-color: rgba(151,211,55,.95);
  box-shadow: 0 0 0 3px rgba(151,211,55,.14), inset 0 0 0 1px rgba(151,211,55,.16);
}

.locker-share-tools{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 1.5rem;
  position: static;
  inset: auto;
  transform: none;
}

.locker-share-tools .small{
  color: #97d337;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  position: static;
  inset: auto;
  transform: none;
}

.locker-share-select-all-btn{
  all: unset;
  justify-self: end;
  color: #97d337;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
  position: static;
  inset: auto;
  transform: none;
}

.locker-share-select-all-btn:hover,
.locker-share-select-all-btn:focus-visible{
  color: #aaeb42;
  text-decoration: underline;
  text-underline-offset: .16rem;
  background: transparent;
  box-shadow: none;
}

.locker-share-select-all-btn:focus,
.locker-share-select-all-btn:active{
  background: transparent;
  box-shadow: none;
}

.locker-share-select-all-btn::selection{
  background: transparent;
  color: inherit;
}

.locker-share-select-all-btn::-moz-selection{
  background: transparent;
  color: inherit;
}

.locker-share-field{
  display: grid;
  gap: .45rem;
  width: 100%;
}

.locker-share-client-selector{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: .875rem;
  height: .875rem;
}

.locker-share-client-check{
  width: .875rem;
  height: .875rem;
  border-radius: 999px;
  border: 1.5px solid #97d337;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
  position: relative;
  overflow: visible;
}

.locker-share-client-check::after{
  content: "";
  width: .375rem;
  height: .375rem;
  border-radius: 999px;
  background: #97d337;
  transform: scale(0);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.locker-share-client-row input[type="checkbox"]:checked + .locker-share-client-row-inner .locker-share-client-check{
  border-color: #97d337;
  background: rgba(151,211,55,.14);
  box-shadow: 0 0 0 2px rgba(151,211,55,.12);
}

.locker-share-client-row input[type="checkbox"]:checked + .locker-share-client-row-inner .locker-share-client-check::after{
  transform: scale(1);
  opacity: 1;
}

.locker-share-client-row input[type="checkbox"]:checked + .locker-share-client-row-inner .locker-share-client-avatar{
  border-color: rgba(151,211,55,.52);
  box-shadow: 0 0 0 2px rgba(151,211,55,.14);
}

.locker-share-client-avatar{
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(83,118,29,.3);
  border: 1px solid rgba(151,211,55,.18);
  color: #a6e73e;
  font-weight: 800;
  font-size: .9rem;
  flex: 0 0 auto;
}

.locker-share-client-meta{
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
  text-align: left;
}

.locker-share-client-meta strong{
  font-size: 1rem;
  line-height: 1.2;
  color: #f2f6f3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locker-share-client-meta .small{
  font-size: .9rem;
  line-height: 1.25;
  color: #9fa29f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locker-share-note-label,
.locker-share-option-title{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: #f2f6f3;
}

.locker-share-option-row{
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 14px;
  padding: .1rem 0;
}

.locker-share-option-row input[type="checkbox"]{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.locker-share-option-row-inner{
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  width: 100%;
  min-width: 0;
}

.locker-share-option-control{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding-top: .1rem;
}

.locker-share-option-copy{
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .16rem;
  min-width: 0;
  text-align: left;
}

.locker-share-option-copy .small{
  color: #9fa29f;
}

.locker-share-option-check{
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1.5px solid #97d337;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  pointer-events: none;
}

.locker-share-option-check svg{
  width: .7rem;
  height: .7rem;
}

.locker-share-option-row:has(input[type="checkbox"]:checked) .locker-share-option-check{
  background: #97d337;
  color: #0f1210;
  border-color: #97d337;
}

.locker-share-actions{
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.locker-share-submit{
  min-width: 176px;
  margin-left: auto;
  border-color: transparent;
  background: linear-gradient(90deg, #83b632, #4e7402);
  color: #f8fbff;
  box-shadow: 0 14px 30px rgba(78,116,2,.22);
}

.locker-share-submit:hover{
  filter: brightness(1.04);
}

.locker-share-submit:disabled{
  opacity: .55;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.locker-share-cancel-btn{
  min-width: 116px;
}

.locker-share-field textarea{
  min-height: 5rem;
  resize: vertical;
  width: 100%;
  border-radius: 14px;
  padding: .85rem .95rem;
}

.coach-library-page .modal-body .locker-share-client-row,
.coach-library-page .modal-body .locker-share-option-row{
  display: block;
  flex-direction: row;
  gap: 0;
}

.coach-library-page .modal-body .locker-share-field{
  display: grid;
  gap: .45rem;
}

@media (max-width: 780px){
  .messages-doc-row{
    grid-template-columns: 1fr;
  }
  .messages-doc-actions{
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .locker-share-tools{
    align-items: center;
  }

  .locker-share-client-row{
    padding: 0;
  }

  .locker-share-client-avatar{
    width: 2.3rem;
    height: 2.3rem;
  }

  .locker-share-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .locker-share-actions > *{
    width: 100%;
  }
  .locker-share-modal-card{
    width: min(100vw - 1rem, 520px);
    padding: 1rem;
  }

  .locker-share-client-row-inner{
    min-height: 3.75rem;
    padding: .625rem .75rem;
  }
}

@media (max-width: 720px){
  .locker-share-modal-card{
    width: min(calc(100vw - .75rem), 520px);
    max-height: calc(100dvh - var(--appbar-height, 0px) - .75rem);
    padding: .9rem;
    border-radius: 20px;
  }

  .locker-share-modal-card,
  .locker-share-modal-card *{
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  .locker-share-modal-card .modal-body{
    overflow-y: auto;
    padding-right: 0;
  }

  .locker-share-form{
    gap: .75rem;
    padding-bottom: calc(.25rem + env(safe-area-inset-bottom));
  }

  .locker-share-form > *{
    min-width: 0;
    flex: 0 0 auto;
  }

  .locker-share-header{
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1rem;
  }

  .locker-share-header-main{
    min-width: 0;
    gap: .75rem;
  }

  .locker-share-header-main strong{
    font-size: 1.05rem;
  }

  .locker-share-subtitle{
    font-size: .88rem;
    line-height: 1.3;
  }

  .locker-share-close-btn{
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
  }

  .locker-share-file-pill{
    display: flex;
    gap: .7rem;
    min-height: 4.25rem;
    padding: .7rem .75rem;
  }

  .locker-share-file-icon{
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
  }

  .locker-share-file-copy strong{
    font-size: 1rem;
    line-height: 1.2;
  }

  .locker-share-file-copy .small{
    font-size: .96rem;
    line-height: 1.2;
  }

  .locker-share-search-field input{
    height: 2.8rem;
    min-height: 2.8rem;
    padding-right: .8rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .locker-share-tools{
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: 0;
    min-height: 1.4rem;
    font-size: 1rem;
    line-height: 1.1;
  }

  .locker-share-client-list{
    min-height: 3.85rem;
    max-height: min(26vh, 196px);
    padding: .24rem;
    border-radius: 16px;
  }

  .locker-share-client-row-inner{
    min-height: 3.5rem;
    padding: .58rem .7rem;
    gap: .7rem;
  }

  .locker-share-client-avatar{
    width: 2.15rem;
    height: 2.15rem;
    font-size: .82rem;
  }

  .locker-share-client-meta strong{
    font-size: 1rem;
    line-height: 1.15;
  }

  .locker-share-client-meta .small{
    font-size: .95rem;
    line-height: 1.15;
  }

  .locker-share-field{
    gap: .4rem;
  }

  .locker-share-note-label,
  .locker-share-option-title{
    font-size: 1rem;
    line-height: 1.2;
  }

  .locker-share-field textarea{
    min-height: 4.5rem;
    padding: .8rem .85rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .locker-share-toggles{
    gap: .65rem;
    margin-top: 0;
    padding-top: .85rem;
  }

  .locker-share-option-row{
    padding: 0;
  }

  .locker-share-option-row-inner{
    gap: .65rem;
    align-items: flex-start;
  }

  .locker-share-option-copy .small{
    font-size: .95rem;
    line-height: 1.35;
  }

  .locker-share-actions{
    position: sticky;
    bottom: 0;
    z-index: 2;
    gap: .65rem;
    margin-top: .2rem;
    padding-top: .9rem;
    padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(180deg, rgba(17,19,17,0), rgba(17,19,17,.94) 28%, rgba(10,13,11,.98) 100%);
  }

  .locker-share-submit{
    min-width: 0;
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 520px){
  .locker-share-modal-card{
    width: calc(100vw - .5rem);
    max-height: calc(100dvh - var(--appbar-height, 0px) - .5rem);
    padding: .8rem;
    border-radius: 18px;
  }

  .locker-share-header{
    margin-bottom: .85rem;
  }

  .locker-share-header-main{
    gap: .65rem;
  }

  .locker-share-header-icon{
    width: 2.2rem;
    height: 2.2rem;
  }

  .locker-share-header-main strong{
    font-size: 1rem;
  }

  .locker-share-close-btn{
    width: 2.35rem;
    height: 2.35rem;
  }

  .locker-share-file-pill{
    padding: .65rem .7rem;
  }

  .locker-share-file-icon{
    width: 2.2rem;
    height: 2.2rem;
  }

  .locker-share-search-field input{
    height: 2.7rem;
    min-height: 2.7rem;
  }

  .locker-share-tools .small,
  .locker-share-select-all-btn{
    font-size: .98rem;
  }

  .locker-share-tools .small{
    white-space: normal;
  }

  .locker-share-client-list{
    min-height: 3.6rem;
    max-height: min(22vh, 168px);
  }

  .locker-share-client-row-inner{
    min-height: 3.35rem;
    padding: .55rem .65rem;
  }

  .locker-share-client-avatar{
    width: 2rem;
    height: 2rem;
    font-size: .78rem;
  }

  .locker-share-client-meta strong{
    font-size: .98rem;
  }

  .locker-share-client-meta .small{
    font-size: .92rem;
  }

  .locker-share-field textarea{
    min-height: 4.1rem;
  }

  .locker-share-actions{
    padding-top: .8rem;
  }
}

html:not([data-theme="dark"]) .locker-share-modal-card{
  background: rgba(255,255,255,.98);
  border-color: rgba(214,217,214,.78);
  box-shadow: 0 20px 38px rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .locker-share-close-btn,
html:not([data-theme="dark"]) .locker-share-search-field,
html:not([data-theme="dark"]) .locker-share-client-list,
html:not([data-theme="dark"]) .locker-share-option-row,
html:not([data-theme="dark"]) .locker-share-file-pill{
  color: #161916;
}

html:not([data-theme="dark"]) .locker-share-search-field,
html:not([data-theme="dark"]) .locker-share-client-list{
  background: rgba(248,250,252,.98);
  border-color: rgba(214,217,214,.78);
  box-shadow: none;
}

html:not([data-theme="dark"]) .locker-share-tools .small{
  color: #689224;
}

html:not([data-theme="dark"]) .locker-share-search-field input{
  background: rgba(248,250,252,.98);
  border-color: rgba(214,217,214,.78);
}

html:not([data-theme="dark"]) .locker-share-file-pill{
  background: #f4f7f4;
  border-color: rgba(214,217,214,.9);
}

html:not([data-theme="dark"]) .locker-share-client-row{
  border-color: transparent;
}

html:not([data-theme="dark"]) .locker-share-client-row:hover{
  background: rgba(123,172,44,.08);
  border-color: rgba(214,217,214,.72);
}

html:not([data-theme="dark"]) .locker-share-client-avatar{
  background: rgba(123,172,44,.12);
  color: #4e6f18;
}

html:not([data-theme="dark"]) .locker-share-client-check{
  border-color: #7bac2c;
}

html:not([data-theme="dark"]) .locker-share-client-check::after{
  background: #638c21;
}

html:not([data-theme="dark"]) .locker-share-subtitle{
  color: #707471;
}

html:not([data-theme="dark"]) .locker-share-submit{
  color: #ffffff;
}

html:not([data-theme="dark"]) .locker-share-note-label,
html:not([data-theme="dark"]) .locker-share-option-title,
html:not([data-theme="dark"]) .locker-share-client-meta strong{
  color: #161916;
}

html:not([data-theme="dark"]) .locker-share-client-meta .small{
  color: #707471;
}

html[data-theme="dark"] .locker-share-select-all-btn,
html[data-theme="dark"] .locker-share-select-all-btn:hover,
html[data-theme="dark"] .locker-share-select-all-btn:active,
html[data-theme="dark"] .locker-share-select-all-btn:focus,
html[data-theme="dark"] .locker-share-select-all-btn:focus-visible{
  all: unset;
  display: inline-block;
  cursor: pointer;
  color: #97d337 !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .locker-share-select-all-btn,
html:not([data-theme="dark"]) .locker-share-select-all-btn:hover,
html:not([data-theme="dark"]) .locker-share-select-all-btn:active,
html:not([data-theme="dark"]) .locker-share-select-all-btn:focus,
html:not([data-theme="dark"]) .locker-share-select-all-btn:focus-visible{
  all: unset;
  display: inline-block;
  cursor: pointer;
  color: #689224;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
}

html:not([data-theme="dark"]) .locker-share-client-row:has(input[type="checkbox"]:checked){
  background: rgba(123,172,44,.08);
  border-color: rgba(123,172,44,.26);
}

html:not([data-theme="dark"]) .locker-share-option-copy .small{
  color: #707471;
}

html:not([data-theme="dark"]) .locker-share-option-check{
  border-color: #7bac2c;
}

html:not([data-theme="dark"]) .locker-share-option-row:has(input[type="checkbox"]:checked) .locker-share-option-check{
  background: var(--color-brand);
  border-color: #7bac2c;
  color: var(--color-on-brand);
}


@media (min-width: 900px){
  
}




html[data-theme="light"] 







@media (max-width: 720px){
  .settings-section{
    padding: .85rem .9rem;
  }
  .settings-section summary{
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .settings-section summary::after{
    margin-left: auto;
  }
  .settings-section label{
    display: flex;
    flex-direction: column;
    gap: .35rem;
    max-width: 100%;
  }
  .settings-section input,
  .settings-section select,
  .settings-section textarea{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .settings-section .grid2{
    grid-template-columns: 1fr;
  }
  .settings-section .page-actions{
    flex-wrap: wrap;
    gap: .5rem;
  }
  .coach-payment-link-row{
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "url"
      "remove";
    align-items: stretch;
  }
  .coach-payment-link-field-label{
    grid-area: label;
  }
  .coach-payment-link-field-url{
    grid-area: url;
  }
  .coach-payment-link-field:focus-within{
    padding: .45rem;
    margin: -.2rem;
    border-radius: 14px;
    background: rgba(86,127,0,.08);
    box-shadow: 0 10px 22px rgba(22,25,22,.12);
  }
  .coach-payment-link-row input:focus{
    font-size: 1rem;
  }
  .coach-payment-link-remove{
    grid-area: remove;
    width: 2.7rem;
    min-width: 2.7rem;
    min-height: 2.9rem;
    justify-self: start;
  }
}

@media (max-width: 720px){
  .settings-section form{
    display: flex;
    flex-direction: column;
    gap: .75rem;
  }
  .settings-section input[type="file"]{
    width: 100%;
  }
  .settings-section button{
    width: 100%;
  }
}

.offline-banner{
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22,25,22,.92);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.offline-banner.show{
  opacity: 1;
}

html[data-theme="light"] .offline-banner{
  background: rgba(22,25,22,.9);
}

.message-day{
  display: inline-block;
  margin: 1rem auto;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
  background: rgba(159,163,160,.15);
  align-self: center;
  justify-self: center;
}

html[data-theme="dark"] .message-day{
  background: rgba(159,163,160,.2);
}

.landing-hero{
  padding: 2rem 0 1rem;
  position: relative;
}
.landing-grid{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.35rem;
  align-items: stretch;
}
.landing-kicker{
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
.landing-title{
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin: 0 0 .7rem;
}
.landing-subtitle{
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 1.1rem;
}
.landing-actions{
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.landing-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .66rem 1rem;
  font-weight: 700;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.landing-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(86,127,0,.45);
  box-shadow: 0 8px 18px rgba(86,127,0,.14);
}
.landing-btn.primary{
  border-color: transparent;
  color: var(--color-on-brand);
  background: var(--color-brand);
}
.landing-proof{
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.landing-proof span{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .28rem .62rem;
  font-size: .82rem;
  color: var(--muted);
}
.landing-benefits{
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .4rem;
}
.landing-benefits li{
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
}
.landing-benefits li::before{
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #496d02, #7bac2c);
  position: absolute;
  left: 0;
  top: .42rem;
}
.landing-preview{
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(86,127,0,.08), rgba(123,172,44,.08));
}
.landing-preview-grid{
  margin-top: .35rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.landing-metric{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .7rem;
  background: rgba(159,163,160,.08);
}
.landing-metric .label{
  font-size: .8rem;
  color: var(--ink);
  font-weight: 700;
}
.landing-metric .value{
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: .2rem;
}
.landing-metric .sub{
  margin-top: .32rem;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.3;
}
.landing-chip{
  display: inline-flex;
  align-items: center;
  margin-top: .45rem;
  padding: .2rem .58rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
}
.landing-section{
  margin-top: 1.15rem;
}
.landing-section-head{
  margin-bottom: .75rem;
}
.landing-cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .9rem;
}
.landing-card{
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(159,163,160,.09), rgba(159,163,160,.04));
}
.landing-card h3{
  margin: 0 0 .35rem;
}
.landing-card p{
  margin: 0;
  color: var(--muted);
}
.landing-cta{
  margin: 1.2rem 0 .8rem;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(86,127,0,.08), rgba(123,172,44,.06));
}
.landing-cta h2{
  margin: 0 0 .3rem;
}
html[data-theme="dark"] .landing-btn{
  background: #262926;
  color: #e5e9e5;
}
html[data-theme="dark"] .landing-metric{
  background: rgba(39,42,39,.45);
}
html[data-theme="dark"] .landing-preview{
  background: linear-gradient(155deg, rgba(86,127,0,.16), rgba(123,172,44,.12));
}
html[data-theme="dark"] .landing-card{
  background: rgba(39,42,39,.45);
}
html[data-theme="dark"] .landing-cta{
  background: linear-gradient(165deg, rgba(86,127,0,.2), rgba(123,172,44,.12));
}
@media (max-width: 980px){
  .landing-grid{
    grid-template-columns: 1fr;
  }
  .landing-cards{
    grid-template-columns: 1fr;
  }
}

.coach-kanban-summary{
  margin-top: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
}
.coach-kanban-summary-copy h2{
  margin: 0;
  color: #161916;
}
.coach-kanban-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.coach-kanban-new-btn{
  white-space: nowrap;
  min-height: 2rem;
  padding: .2rem .1rem;
  border-radius: 0;
  font-weight: 700;
  color: #97d13c;
}
.coach-kanban-wrap{
  margin-top: .9rem;
}
.coach-kanban-board{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  overflow-x: visible;
  padding-bottom: .2rem;
}
.coach-kanban-lane{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  padding: .7rem;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  scroll-snap-align: start;
}
.coach-kanban-lane-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
}
.coach-kanban-lane-title-wrap{
  display: flex;
  align-items: center;
  gap: .45rem;
}
.coach-kanban-lane-title{
  margin: 0;
  font-size: .98rem;
}
.coach-kanban-dot{
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
}
.coach-kanban-dot.is-todo{ background: #9fa3a0; }
.coach-kanban-dot.is-progress{ background: #83b632; }
.coach-kanban-dot.is-review{ background: #f59e0b; }
.coach-kanban-dot.is-done{ background: #22c55e; }
.coach-kanban-count{
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: .08rem .5rem;
  font-size: .75rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.coach-kanban-add-btn{
  width: auto;
  height: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0;
  line-height: 1.1;
  font-weight: 600;
  color: #81b430;
  font-size: 1.3rem;
}
.coach-kanban-add-btn:hover,
.coach-kanban-add-btn:focus,
.coach-kanban-add-btn:focus-visible{
  color: #e6eae6;
  background: transparent !important;
}
.coach-kanban-dropzone{
  display: grid;
  gap: .6rem;
  align-content: start;
  min-height: 420px;
  padding: .15rem;
  border-radius: 12px;
  transition: background .18s ease;
}
.coach-kanban-dropzone.is-over{
  background: color-mix(in srgb, var(--brand) 9%, transparent);
}
.coach-kanban-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .72rem;
  background: color-mix(in srgb, #2d2f2d 92%, transparent);
  display: grid;
  gap: .52rem;
  cursor: grab;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.coach-kanban-card.is-dragging{
  opacity: .9;
  transform: rotate(1deg);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--border));
  box-shadow: 0 12px 24px rgba(22,25,22,.22);
}
.coach-kanban-card-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .4rem;
}
.coach-kanban-card-head h4{
  margin: 0;
  line-height: 1.3;
  font-size: 1.02rem;
}
.coach-kanban-edit-btn,
.coach-kanban-delete-btn{
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  color: #a0a4a1;
  padding: 0;
  border-radius: 0;
  height: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.coach-kanban-edit-btn:hover,
.coach-kanban-delete-btn:hover{
  color: #ecf0ec;
  background: transparent !important;
}
.coach-kanban-delete-btn{
  color: #ef4444;
}
.coach-kanban-card-desc{
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}
.coach-kanban-tags{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.coach-kanban-tag{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .1rem .5rem;
  font-size: .72rem;
  color: var(--muted);
}
.coach-kanban-meta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .78rem;
}
.coach-kanban-priority{
  border-radius: 999px;
  border: 1px solid transparent;
  padding: .1rem .5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .03em;
}
.coach-kanban-priority.is-low{
  color: #83b532;
  border-color: rgba(131,181,50,.35);
  background: rgba(131,181,50,.1);
}
.coach-kanban-priority.is-medium{
  color: #f59e0b;
  border-color: rgba(245,158,11,.38);
  background: rgba(245,158,11,.1);
}
.coach-kanban-priority.is-high{
  color: #f43f5e;
  border-color: rgba(244,63,94,.38);
  background: rgba(244,63,94,.1);
}
.coach-kanban-assignee{
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: .1rem .45rem;
}
#task-modal .modal-backdrop{
  z-index: 0 !important;
  pointer-events: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(7,9,7,.34) !important;
}
#task-modal .modal-card{
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  background-image: none !important;
  width: min(640px, calc(100vw - 1rem)) !important;
  max-height: calc(100dvh - 1rem) !important;
  overflow-y: auto !important;
  box-shadow: 0 24px 58px rgba(7,9,7,.52) !important;
}
#task-modal .modal-header{
  padding: 1rem 1.25rem !important;
}
#task-modal .modal-body{
  padding: .9rem 1.25rem 1.25rem !important;
}
#task-modal #task-modal-title{
  color: var(--text) !important;
  font-size: 1.2rem;
}
#task-modal .modal-body label{
  display: grid;
  gap: .35rem;
  color: var(--text) !important;
  font-weight: 600;
}
#task-modal .modal-body input,
#task-modal .modal-body select,
#task-modal .modal-body textarea{
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  color: var(--text) !important;
  background: color-mix(in srgb, var(--card) 96%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border)) !important;
}
#task-modal .modal-body textarea{
  min-height: 96px;
  resize: vertical;
}
#task-modal .modal-body input::placeholder,
#task-modal .modal-body textarea::placeholder{
  color: color-mix(in srgb, var(--text) 52%, transparent) !important;
  opacity: 1;
}
#task-modal .modal-body .grid2{
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .7rem;
}
#task-modal .modal-actions{
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
html[data-theme="dark"] #task-modal .modal-card{
  background: #152300 !important;
  border-color: rgba(55,83,1,.85) !important;
}
html[data-theme="light"] #task-modal .modal-card{
  background: #ffffff !important;
  border-color: rgba(159,163,160,.35) !important;
}
html[data-theme="dark"] #task-modal .modal-body input,
html[data-theme="dark"] #task-modal .modal-body select,
html[data-theme="dark"] #task-modal .modal-body textarea{
  background: rgba(21,35,0,.96) !important;
  border-color: rgba(80,113,28,.72) !important;
  color: #eff3ef !important;
}
html[data-theme="dark"] #task-modal .modal-body label,
html[data-theme="dark"] #task-modal #task-modal-title{
  color: #eff3ef !important;
}
@media (max-width: 720px){
  #task-modal .modal-card{
    width: calc(100vw - .5rem) !important;
    max-height: calc(100dvh - .5rem) !important;
    border-radius: 14px !important;
  }
  #task-modal .modal-header{
    padding: .85rem 1rem !important;
  }
  #task-modal .modal-body{
    padding: .75rem 1rem 1rem !important;
  }
  #task-modal .modal-body .grid2{
    grid-template-columns: 1fr;
  }
  #task-modal .modal-actions{
    justify-content: stretch;
  }
  #task-modal .modal-actions .task-action{
    flex: 1 1 auto;
    min-height: 2.6rem;
  }
}

.task-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  color: #a0a4a1;
  text-decoration: none;
  border: 0;
  background: transparent;
}
.task-action:hover,
.task-action:focus,
.task-action:focus-visible{
  color: #ecf0ed;
  outline: none;
}
.task-action-primary{
  color: #97d13c;
  font-weight: 700;
}
.task-action-danger{
  color: #f87171;
  font-weight: 700;
}

html[data-theme="dark"] .coach-kanban-lane{
  background: linear-gradient(180deg, rgba(12,15,13,.92), rgba(8,10,8,.9));
  border-color: rgba(41,62,5,.82);
}
html[data-theme="dark"] .coach-kanban-card{
  background: rgba(40,43,40,.9);
  border-color: rgba(89,93,90,.58);
}
html[data-theme="dark"] .coach-kanban-count,
html[data-theme="dark"] .coach-kanban-tag,
html[data-theme="dark"] .coach-kanban-assignee{
  border-color: rgba(61,91,4,.75);
}
html[data-theme="dark"] .coach-kanban-dropzone.is-over{
  background: rgba(151,209,60,.08);
}
html[data-theme="dark"] .coach-kanban-card.is-dragging{
  box-shadow: 0 14px 26px rgba(6,8,6,.62);
}
html[data-theme="dark"] .coach-kanban-summary{
  background: linear-gradient(180deg, rgba(16,18,16,.96), rgba(11,13,11,.95));
  border-color: rgba(41,62,5,.82);
}
html[data-theme="dark"] .coach-kanban-summary-copy h2{
  color: #ffffff;
}
html[data-theme="dark"] .coach-kanban-lane-title{
  color: #ecefec;
}
html[data-theme="dark"] .coach-kanban-card-head h4{
  color: #ebefeb;
}

html[data-theme="light"] .coach-kanban-summary{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.98));
}
html[data-theme="light"] .coach-kanban-summary-copy h2{
  color: #161916;
}
html[data-theme="light"] .coach-kanban-lane{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
}
html[data-theme="light"] .coach-kanban-card{
  background: rgba(255,255,255,.94);
}

html[data-theme="dark"] .settings-summary-head > .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="dark"] .settings-summary-head > .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  width: 2.15rem !important;
  height: 2.15rem !important;
  flex: 0 0 2.15rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 2.15rem !important;
  min-height: 2.15rem !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(131,181,50,.14) !important;
  background: linear-gradient(180deg, rgba(22,25,22,.7), rgba(13,15,13,.85)) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="dark"] .settings-summary-head > .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] .settings-summary-head > .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html[data-theme="light"] .settings-summary-head > .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="light"] .settings-summary-head > .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  width: 2.15rem !important;
  height: 2.15rem !important;
  flex: 0 0 2.15rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 2.15rem !important;
  min-height: 2.15rem !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border: 1px solid #161916 !important;
  background: #161916 !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] .settings-summary-head > .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="light"] .settings-summary-head > .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}
@media (max-width: 1080px){
  .coach-kanban-board{
    grid-template-columns: repeat(4, minmax(260px, 300px));
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
}
@media (max-width: 900px){
  .coach-kanban-summary{
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 720px){
  .coach-kanban-head{
    flex-direction: column;
    align-items: stretch;
  }
  .coach-kanban-wrap{
    padding: .75rem;
  }
  .coach-kanban-board{
    grid-template-columns: repeat(4, minmax(84vw, 84vw));
    gap: .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .coach-kanban-lane{
    min-height: 500px;
  }
  .coach-kanban-dropzone{
    min-height: 360px;
  }
}

/* Public marketing pages */
.mkt-hero{
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  margin-top: 1rem;
  min-height: 420px;
}
.mkt-hero-bg{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(880px 280px at 8% -10%, rgba(86,127,0,.2), transparent 70%),
    radial-gradient(860px 320px at 100% 10%, rgba(123,172,44,.15), transparent 70%),
    linear-gradient(180deg, rgba(22,25,22,.04), transparent 55%);
}
.mkt-shell{
  position: relative;
  z-index: 1;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  max-width: 820px;
}
.mkt-kicker{
  margin: 0 0 .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  color: var(--muted);
  font-weight: 700;
}
.mkt-title{
  margin: 0 0 .65rem;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
}
.mkt-subtitle{
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.04rem;
}
.mkt-actions{
  margin-top: 1rem;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.mkt-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .62rem 1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
}
.mkt-btn:hover{
  border-color: rgba(86,127,0,.45);
}
.mkt-btn-primary{
  border-color: transparent;
  background: var(--color-brand);
  color: var(--color-on-brand);
}
.mkt-badges{
  margin-top: 1rem;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.mkt-badges span{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .22rem .58rem;
  font-size: .8rem;
  color: var(--muted);
}
.mkt-section{
  margin-top: 1rem;
}
.mkt-grid3{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .8rem;
}
.mkt-feature h3{
  margin: 0 0 .4rem;
}
.mkt-feature p{
  margin: 0;
  color: var(--muted);
}
.mkt-showcase{
  border-radius: 18px;
}
.mkt-showcase-head h2{
  margin: 0 0 .35rem;
}
.mkt-showcase-grid{
  margin-top: .8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .7rem;
}
.mkt-showcase-grid img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.mkt-cta{
  border-radius: 18px;
}
.mkt-cta h2{
  margin: 0 0 .35rem;
}
.mkt-login-wrap{
  margin-top: 1rem;
}
.mkt-login-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mkt-login-panel h1{
  margin: 0 0 .5rem;
  font-size: clamp(1.7rem, 3.8vw, 2.4rem);
  line-height: 1.1;
}
.mkt-login-points{
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .45rem;
}
.mkt-login-points li{
  padding-left: 1rem;
  position: relative;
  color: var(--muted);
}
.mkt-login-points li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .5rem;
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #496d02, #7bac2c);
}
.mkt-login-links{
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.mkt-login-form-card h2{
  margin: 0 0 .35rem;
}
.mkt-login-form{
  margin-top: .8rem;
}
.mkt-role-picker{
  margin: 0;
  padding: 0;
  border: 0;
}
.mkt-role-picker legend{
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: .45rem;
}
.mkt-role-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.mkt-role-btn{
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.mkt-role-btn.is-active{
  border-color: rgba(86,127,0,.55);
  background: rgba(86,127,0,.12);
}
html[data-theme="dark"] .mkt-hero-bg{
  background:
    radial-gradient(880px 280px at 8% -10%, rgba(86,127,0,.22), transparent 70%),
    radial-gradient(860px 320px at 100% 10%, rgba(123,172,44,.18), transparent 70%),
    linear-gradient(180deg, rgba(22,25,22,.45), rgba(6,8,6,.2) 55%);
}
html[data-theme="dark"] .mkt-btn{
  background: #262926;
  color: #e5e9e5;
}
@media (max-width: 1024px){
  .mkt-grid3{
    grid-template-columns: 1fr;
  }
  .mkt-showcase-grid{
    grid-template-columns: 1fr;
  }
  .mkt-showcase-grid img{
    height: 240px;
  }
  .mkt-login-grid{
    grid-template-columns: 1fr;
  }
}

/* Public marketing shell */
.public-site{
  --font-public-heading: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-public-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  font-family: var(--font-public-body);
  background: #242725;
  color: #e5e7eb;
}
.public-site h1,
.public-site h2,
.public-site h3,
.public-site h4,
.public-site h5,
.public-site h6{
  font-family: var(--font-public-heading);
  letter-spacing: -0.01em;
}
.public-header{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(8,10,8,.86);
  border-bottom: 1px solid rgba(159,163,160,.16);
}
.public-nav-wrap{
  max-width: 1400px;
  margin: 0 auto;
  padding: .85rem 1.2rem;
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
}
.mobile-wrapper-auth .public-header{
  padding-top: max(env(safe-area-inset-top), 14px);
}
.mobile-wrapper-auth .public-nav-wrap{
  grid-template-columns: 1fr;
  padding: .65rem .9rem .75rem;
}
.mobile-wrapper-auth .public-brand{
  justify-content: flex-start;
}
.mobile-wrapper-auth .public-brand img{
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.mobile-wrapper-auth .public-brand span{
  font-size: 1.25rem;
}
.mobile-wrapper-auth .public-nav-right-wrapper{
  display: none;
}
.public-brand{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
}
.public-brand img{
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.public-nav-center,.public-nav-right{
  display: inline-flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
}
.public-nav-right{ justify-content: flex-end; }
.public-nav-center a,.public-nav-right a{
  color: #9fa3a0;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: .35rem .55rem;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.public-nav-center a:hover,.public-nav-right a:hover{
  color: #e5e9e5;
  border-color: rgba(141,195,55,.35);
  background: rgba(39,42,39,.35);
  box-shadow: 0 0 18px rgba(141,195,55,.16);
}
/* legacy public button theme removed in favor of the shared button system */
.public-main{ max-width: 1400px; margin: 0 auto; padding: 2rem 1.2rem 0; }
.public-flash-wrap{
  display: grid;
  gap: .5rem;
}
.public-flash{
  border: 1px solid rgba(220,38,38,.5);
  background: #fde8e8;
  color: #000;
  border-radius: 12px;
  padding: .65rem .9rem;
}
.public-hero{
  min-height: 66vh;
  display: grid;
  justify-items: center;
  text-align: center;
  padding-top: 3rem;
}
.public-hero h1{
  font-size: clamp(2.15rem, 5.3vw, 4.55rem);
  line-height: 1;
  margin: 0;
  max-width: 12ch;
}
.public-hero-line{
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}
.public-hero-line-primary{
  background: linear-gradient(120deg, #eaeeeb, #f8fafc 55%, #9dda3a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.public-hero-line-secondary{
  background: linear-gradient(120deg, #557e02, #5f8c01 42%, #a0de3f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.public-hero-line-accent{
  background: linear-gradient(120deg, #94ce38, #80b22e 52%, #a7e73e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.public-hero h1 span:not(.public-hero-line),
.public-section h2 span{
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.public-hero p{ color: #9fa3a0; font-size: 1.45rem; max-width: 40ch; margin: 1rem 0 0; min-height: 4.5em; }
.type-cursor{
  display: inline-block;
  width: 2px;
  height: .9em;
  background: #8dc337;
  margin-left: 2px;
  vertical-align: middle;
  border-radius: 1px;
  animation: type-cursor-blink .85s step-end infinite;
}
@keyframes type-cursor-blink{
  0%,100%{ opacity: 1; }
  50%{ opacity: 0; }
}
.public-hero-actions{ display: inline-flex; gap: .75rem; margin-top: 1.3rem; }
.public-hero-card{
  margin-top: 2rem;
  width: min(430px, 92vw);
  background: linear-gradient(170deg, rgba(22,25,22,.92), rgba(6,8,6,.9));
  border: 1px solid rgba(159,163,160,.16);
  border-radius: 22px;
  text-align: left;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 20px 52px rgba(6,8,6,.45), 0 0 34px rgba(85,126,2,.16);
  animation: publicFadeUp .55s ease both, publicCardDrift 7s ease-in-out infinite;
}
.public-workout-head{
  display: flex;
  align-items: center;
  gap: .8rem;
}
.public-workout-badge{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e9e5;
  background: linear-gradient(130deg, rgba(85,126,2,.92), rgba(141,195,55,.92));
}
.public-workout-badge svg{
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-hero-card h3{ margin: 0; font-size: 1.2rem; }
.public-hero-card p{ margin: .15rem 0 0; font-size: 1.02rem; color: #9fa3a0; }
.public-workout-list{
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
  list-style: none;
}
.public-workout-list li{
  min-height: 36px;
  border-radius: 12px;
  padding: .45rem .75rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.02rem;
  color: #e5e7eb;
  background: rgba(39,42,39,.32);
}
.public-workout-list .dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(141,195,55,.85);
  position: relative;
}
.public-workout-list .dot::after{
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: rgba(141,195,55,.9);
}
.public-workout-progress{
  margin-top: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: #9fa3a0;
  font-size: .95rem;
}
.public-workout-progress .bar{
  width: 98px;
  height: 7px;
  border-radius: 999px;
  background: rgba(62,65,62,.65);
  overflow: hidden;
}
.public-workout-progress .bar i{
  display: block;
  width: 67%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, #557e02, #8dc337);
}
.public-section{ padding: 2.2rem 0; }
.public-section + .public-section{
  border-top: 1px solid rgba(159,163,160,.1);
}
.public-section-alt{
  position: relative;
  background: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}
.public-section h2{
  text-align: center;
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
}
body.ph2-dark .public-section h2{
  color: #f1f4f1;
}
.public-sub{
  margin: .7rem auto 0;
  max-width: 60ch;
  text-align: center;
  color: #9fa3a0;
  font-size: 1.1rem;
  min-height: 2.8em;
}
.public-grid2,.public-grid3,.public-grid4{
  margin-top: 1.4rem;
  display: grid;
  gap: 1.15rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.public-grid2{ grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 780px; margin-left: auto; margin-right: auto; }
.public-grid3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.public-grid4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.public-card,.public-price-card{
  border: 1px solid rgba(89,131,3,.25);
  border-radius: 16px;
  background: rgba(22,25,22,.62);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  animation: publicFadeUp .5s ease both;
}
.public-grid4 .public-card,
.public-grid3 .public-card{
  height: 100%;
}

/* ── Mobile card carousel (transform-based, avoids overflow-y clipping) ── */
@media (max-width: 720px){
  [data-mobile-carousel]{
    display: block !important;
    overflow: visible !important;
    grid-template-columns: unset !important;
    grid-auto-rows: unset !important;
    gap: 0;
  }
  .mc-viewport{
    overflow-x: hidden;
    overflow-y: visible;
  }
  .mc-track{
    display: flex;
    transition: transform .42s cubic-bezier(.22,1,.36,1);
    will-change: transform;
  }
  .mc-track > .mc-item{
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0 !important;
    height: auto !important;
    align-self: flex-start;
  }
}
.public-carousel-dots{
  display: none;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin-top: .9rem;
}
@media (max-width: 720px){
  .public-carousel-dots{ display: flex; }
}
.public-carousel-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(159,163,160,.3);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .2s ease, transform .2s ease;
}
.public-carousel-dot.is-active{
  background: #8dc337;
  transform: scale(1.4);
}
.public-carousel-bar{
  display: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(159,163,160,.2);
  margin-top: .9rem;
  overflow: hidden;
}
@media (max-width: 720px){
  .public-carousel-bar{ display: block; }
}
.public-carousel-bar-fill{
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg,#8dc337,#94ce38);
  transition: width .35s cubic-bezier(.22,1,.36,1);
}
/* ── End mobile card carousel ───────────────────────────────────── */

/* ── Mobile testimonial ticker ──────────────────────────────────── */
@media (max-width: 720px){
  [data-mobile-ticker]{
    display: block !important;
    overflow: hidden !important;
    grid-template-columns: unset !important;
    grid-auto-rows: unset !important;
    gap: 0 !important;
  }
  .public-ticker-track{
    display: flex;
    align-items: stretch;
    gap: 1rem;
    width: max-content;
    animation: testimonial-ticker 22s linear infinite;
  }
  .public-ticker-track:hover{
    animation-play-state: paused;
  }
  .public-ticker-track > .public-card{
    width: 260px;
    flex-shrink: 0;
    margin: 0 !important;
    height: auto !important;
    align-self: stretch;
  }
  /* 12-card features grid scrolls 4× more content — use longer duration */
  .public-features-grid-section .public-ticker-track{
    animation-duration: 65s;
  }
}
@keyframes testimonial-ticker{
  from{ transform: translateX(0); }
  to{   transform: translateX(calc(-50% - .5rem)); }
}

/* ── Conveyor band (equal-size cards auto-scrolling left→right) ───── */
[data-band-carousel]{
  display: block !important;
  overflow: hidden !important;
  grid-template-columns: unset !important;
  grid-auto-rows: unset !important;
  gap: 0 !important;
  /* Break out of the centred section to span the full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
[data-band-carousel] .public-ticker-track{
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  animation: testimonial-ticker 70s linear infinite reverse;
}
[data-band-carousel] .public-ticker-track:hover{
  animation-play-state: paused;
}
[data-band-carousel] .public-ticker-track > .public-card{
  flex: 0 0 300px;
  width: 300px;
  margin: 0 !important;
  height: auto !important;
  align-self: stretch;
}
@media (max-width: 720px){
  [data-band-carousel] .public-ticker-track > .public-card{ flex-basis: 260px; width: 260px; }
}
.public-grid4 .public-card h3{
  font-size: 1.32rem;
  line-height: 1.22;
}
.public-card:hover,.public-price-card:hover{
  transform: none;
  border-color: inherit;
  box-shadow: none;
}
.public-card h3,.public-price-card h3{ margin: 0 0 .65rem; font-size: 1.58rem; line-height: 1.26; }
.public-card ul,.public-price-card ul{ margin: .4rem 0 0; padding-left: 1.1rem; color: #9fa3a0; display: grid; gap: .35rem; }
.public-price-card .btn{
  margin-top: auto;
  align-self: flex-start;
}
.public-card a{ color: #97d337; text-decoration: none; font-weight: 700; display: inline-block; margin-top: .9rem; }
.public-card p{
  margin: 0;
  color: #9fa3a0;
  line-height: 1.5;
}
.public-feature-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  margin-bottom: .6rem;
  font-size: 1.2rem;
  border: 1px solid rgba(89,131,3,.38);
  background: radial-gradient(65% 65% at 30% 20%, rgba(85,126,2,.36), rgba(141,195,55,.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(22,25,22,.35);
  color: #699a05;
  transition: color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.public-feature-icon svg{
  width: 1.25rem;
  height: 1.25rem;
  stroke: url(#ph2-grad-b) #8dc337;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-card:hover .public-feature-icon{
  border-color: rgba(141,195,55,.6);
  color: #8dc337;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 22px rgba(141,195,55,.35);
}
.public-grid4 .public-feature-icon{
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #598303;
  margin-bottom: .75rem;
  justify-content: flex-start;
}
.public-grid4 .public-feature-icon svg{
  width: 1.64rem;
  height: 1.64rem;
  stroke-width: 1.95;
}
.public-grid4 .public-card:hover .public-feature-icon{
  border: 0;
  box-shadow: none;
  transform: translateY(-1px);
  color: #8dc337;
}
.public-grid4 .public-card{
  padding: 1.3rem 1.45rem;
  border-color: rgba(89,131,3,.2);
}
.public-grid4 .public-card h3{
  font-size: 1.32rem;
  margin-bottom: .45rem;
}
.public-grid4 .public-card p{
  font-size: 1rem;
  color: #b1b5b2;
}
.public-stats .public-grid3 strong{
  display: block;
  text-align: center;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: #83b532;
}
.public-stat-grid{
  margin-top: 1.6rem;
}
.public-stat-grid > div{
  text-align: center;
}
.public-testimonials{
  margin-top: 1.4rem;
}
.public-testimonials .public-card p{
  margin-bottom: .9rem;
  font-style: italic;
}
.public-testimonials .public-card strong{
  display: block;
  color: #161916;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1.15;
  margin-top: .35rem;
}
.public-testimonials .public-card span{
  color: #9fa3a0;
  font-size: .95rem;
}
.public-compare-wrap{
  margin-top: 1.4rem;
  overflow-x: auto;
  padding-left: .1rem;
  padding-right: .1rem;
}
@media (max-width: 720px){
  .public-compare-wrap{
    padding-left: .85rem;
    padding-right: .85rem;
  }
}
.public-compare{
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  border: 1px solid rgba(159,163,160,.2);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(22,25,22,.45);
}
.public-compare th,
.public-compare td{
  padding: .75rem .85rem;
  border-bottom: 1px solid rgba(159,163,160,.12);
  text-align: center;
}
.public-compare th:first-child,
.public-compare td:first-child{
  text-align: left;
  width: 42%;
}
.public-compare th:nth-child(2),
.public-compare th:nth-child(3),
.public-compare td:nth-child(2),
.public-compare td:nth-child(3){
  width: 29%;
}
.public-compare th{
  background: rgba(22,25,22,.82);
  color: #f8fafc;
}
.public-compare td{
  color: #d1d5d2;
}
.public-compare tbody tr td:nth-child(2){
  color: #97d337;
  font-weight: 700;
}
.public-compare td.cell-yes{
  color: #97d337;
  font-weight: 700;
}
.public-compare td.cell-no{
  color: #9fa3a0;
}
.public-stats .public-grid3 span{
  display: block;
  text-align: center;
  color: #9fa3a0;
}
.public-price{ font-size: 3rem; font-weight: 800; margin: .4rem 0 1rem; }
.public-price small{ font-size: 1.4rem; color: #9fa3a0; font-weight: 500; }
.public-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 .7rem;
  font-size: .86rem;
  font-weight: 700;
  color: var(--color-on-brand);
  background: var(--color-brand);
}
.public-pricing-solo{
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}
.public-pricing-solo .public-price-card{
  width: min(460px, 100%);
}
.public-price-card.featured{
  border-color: rgba(129,180,48,.6);
}
html[data-theme="light"] .public-price-card.featured{
  border-color: #7bac2c;
  border-width: 2px;
  background: linear-gradient(180deg, rgba(236,240,237,.7), rgba(245,249,245,.65));
  box-shadow: 0 8px 32px rgba(123,172,44,.18), 0 2px 8px rgba(123,172,44,.12);
  position: relative;
  z-index: 1;
}
.public-cta{
  padding: 4rem 0 2.5rem;
  text-align: center;
}
.public-cta h2{
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
}
.public-cta h2 span{
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.public-auth-wrap{
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: 3rem 0 4rem;
}
.public-auth-shell{
  width: min(560px, 94vw);
  margin: 0 auto;
  text-align: center;
  animation: publicFadeUp .55s ease both;
}
.public-auth-shell h1{
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.06;
}
.public-auth-shell h1 span{
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.public-auth-shell > p{
  margin: .75rem 0 0;
  color: #9fa3a0;
  font-size: 1.1rem;
}
.public-auth-shell > p.public-auth-trust-note{
  margin: .45rem 0 0;
  color: #969a97;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.35;
}
.public-auth-card{
  margin-top: 1.35rem;
  border: 1px solid rgba(159,163,160,.2);
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(22,25,22,.75), rgba(6,8,6,.88));
  box-shadow: 0 30px 80px rgba(6,8,6,.45);
  padding: 1.45rem;
  text-align: left;
}
.public-auth-card label{
  display: grid;
  gap: .4rem;
  margin-bottom: .9rem;
  color: #f1f5f9;
  font-weight: 600;
}
.public-auth-card input[type="email"],
.public-auth-card input[type="password"],
.public-auth-card input[type="text"]{
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(89,131,3,.3);
  border-radius: 12px;
  padding: 0 .9rem;
  background: rgba(39,42,39,.55);
  color: #e5e9e5;
  font-size: 1rem;
}
.public-auth-card input:focus{
  outline: none;
  border-color: rgba(141,195,55,.7);
  box-shadow: 0 0 0 3px rgba(141,195,55,.18);
}
.public-role-picker{ border: 0; margin: 0 0 1rem; padding: 0; }
.public-role-picker legend{ margin-bottom: .65rem; color: #161916; font-weight: 700; }
.public-role-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.public-role-btn{
  min-height: 88px;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.18);
  background:
    linear-gradient(180deg, rgba(141,195,55,.16) 0%, rgba(16,19,17,.38) 100%),
    rgba(22,25,22,.52);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .3rem;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease, outline-color .2s ease;
}
.public-role-btn:hover{
  border-color: rgba(129,180,48,.45);
  transform: translateY(-1px);
}
.public-role-btn.is-active{
  border-color: rgba(129,180,48,.85);
  background:
    linear-gradient(180deg, rgba(101,147,6,.24) 0%, rgba(16,19,17,.55) 100%),
    rgba(22,25,22,.82);
  outline: 2px solid rgba(101,147,6,.45);
  outline-offset: 1px;
}
.public-role-btn.is-active .public-role-title{
  color: #4a6d03;
}
/* Override the global dark-theme button normalisation (background:#fff) and
   the box-shadow:none reset — these don't apply to role-picker buttons. */
html[data-theme="dark"] body.public-site .public-role-btn,
html[data-theme="light"] body.public-site .public-role-btn{
  background:
    linear-gradient(180deg, rgba(141,195,55,.16) 0%, rgba(16,19,17,.38) 100%),
    rgba(22,25,22,.52);
  color: #e6eae7;
  border: 1px solid rgba(159,163,160,.22);
}
html[data-theme="dark"] body.public-site .public-role-btn:hover,
html[data-theme="light"] body.public-site .public-role-btn:hover{
  border-color: rgba(129,180,48,.45);
  transform: translateY(-1px);
}
html[data-theme="dark"] body.public-site .public-role-btn.is-active,
html[data-theme="light"] body.public-site .public-role-btn.is-active{
  background:
    linear-gradient(180deg, rgba(101,147,6,.24) 0%, rgba(16,19,17,.55) 100%),
    rgba(22,25,22,.82);
  color: #e6eae7;
  border: 2px solid rgba(101,147,6,.85);
  outline: 2px solid rgba(101,147,6,.45);
  outline-offset: 1px;
}
.public-role-title{
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.public-role-copy{
  display: block;
  color: inherit;
  opacity: .72;
  font-size: .83rem;
  font-weight: 500;
  line-height: 1.35;
}
.public-auth-help{
  margin: -.1rem 0 .95rem;
  color: #9fa3a0;
  font-size: .92rem;
}
.public-auth-help.center{
  text-align: center;
  margin: .9rem 0 0;
}
.public-auth-help a,
.public-terms-row a{
  color: #97d337;
  text-decoration: none;
  font-weight: 600;
}
.public-auth-help a:hover,
.public-terms-row a:hover{
  text-decoration: underline;
}
.public-auth-help a.public-back-btn{
  color: #e5e9e5;
}
.public-auth-help a.public-back-btn:hover{
  text-decoration: none;
}
.public-terms-row{
  display: flex !important;
  gap: .55rem;
  align-items: flex-start;
  font-size: .88rem;
  font-weight: 500 !important;
  line-height: 1.45;
  color: #9fa3a0 !important;
}
.public-terms-row input{
  margin-top: .2rem;
}
.public-auth-submit{
  width: 100%;
  min-height: 46px;
  margin-top: .8rem;
}
.public-legal-hero{
  padding: 2.1rem 0 .9rem;
}
.public-legal-head{
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.public-legal-head h1{
  margin: .75rem 0 .3rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
}
.public-legal-head p{
  margin: 0;
  color: #9fa3a0;
}
.public-back-btn{
  padding-left: 0;
  padding-right: 0;
  color: #161917 !important;
}

.public-back-btn::before{
  content: "\2190";
  font-size: 1rem;
  line-height: 1;
  color: currentColor;
}
.public-back-btn-accent{
  color: #8dc337 !important;
}
.public-legal-section{
  padding: 1.3rem 0 2.8rem;
}
.public-legal-card{
  max-width: 980px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.22);
  background: linear-gradient(170deg, rgba(22,25,22,.78), rgba(6,8,6,.92));
  box-shadow: 0 26px 66px rgba(6,8,6,.45);
  padding: 1.4rem 1.45rem;
}
.public-legal-content{
  color: #acafac;
  display: grid;
  gap: .85rem;
  line-height: 1.62;
  font-size: 1.02rem;
}
.public-legal-content h2,
.public-legal-content h3{
  color: #f1f5f9;
  margin: .9rem 0 .15rem;
}
.public-legal-content ul{
  margin: .15rem 0 0;
  padding-left: 1.2rem;
}
.public-legal-content p{
  margin: 0;
}
.public-legal-content strong{
  color: #e9edea;
}
.public-macro-shell{
  max-width: 940px;
  margin: 0 auto;
}
.public-macro-head{
  text-align: center;
}
.public-macro-head h1{
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.public-macro-head h1 span{
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.public-macro-head p{
  margin: .6rem auto 0;
  max-width: 56ch;
  color: #9fa3a0;
}
.public-macro-card{
  margin-top: 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.22);
  background: linear-gradient(170deg, rgba(22,25,22,.82), rgba(6,8,6,.94));
  box-shadow: 0 24px 62px rgba(6,8,6,.44);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}
.public-macro-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.public-macro-grid label{
  display: grid;
  gap: .38rem;
  color: #f1f5f9;
  font-weight: 600;
}
.public-macro-grid input,
.public-macro-grid select{
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(89,131,3,.32);
  background: rgba(39,42,39,.54);
  color: #e5e9e5;
  font-size: .98rem;
  padding: 0 .85rem;
}
.public-macro-grid input:focus,
.public-macro-grid select:focus{
  outline: none;
  border-color: rgba(141,195,55,.7);
  box-shadow: 0 0 0 3px rgba(141,195,55,.2);
}
.public-macro-result{
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.16);
  background: rgba(22,25,22,.42);
  padding: .9rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.public-macro-stat{
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.14);
  background: rgba(6,8,6,.46);
  text-align: center;
  padding: .7rem .55rem;
}
.public-macro-stat strong{
  display: block;
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1.1;
}
.public-macro-stat span{
  color: #9fa3a0;
  font-size: .85rem;
}
.macropro-shell{
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}
.macropro-head{
  text-align: center;
  margin-bottom: 1.2rem;
}
.macropro-head-icon{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto .75rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,.92), rgba(56,189,248,.92));
  box-shadow: 0 14px 32px rgba(56,189,248,.2), 0 0 20px rgba(124,58,237,.24);
}
.macropro-head-icon .nav-icon-lucide{
  width: 26px;
  height: 26px;
  color: #fff !important;
}
.macropro-head h1{
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.2rem);
}
.macropro-head h1 .macropro-grad{
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: #67d7d6 !important;
  -webkit-text-fill-color: #67d7d6 !important;
}
.macropro-head p{
  max-width: 68ch;
  margin: .65rem auto 0;
  color: #94a3b8;
}
/* Macro calculator action/utility icons: purple (match nutrition actions) */
.macropro-toggle .nav-icon-lucide,
.macropro-copy-btn .nav-icon-lucide,
.macropro-accordion summary .nav-icon-lucide{
  color: #8b5cf6;
}
.macropro-card{
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,.24);
  background: linear-gradient(175deg, rgba(15,23,42,.84), rgba(2,6,23,.94));
  box-shadow: 0 26px 56px rgba(2,6,23,.46);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
  overflow: hidden;
}
.macropro-card::before{
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: none;
  pointer-events: none;
}
.macropro-card::after{
  content: "";
  position: absolute;
  bottom: -140px;
  left: -140px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: none;
  pointer-events: none;
}
.macropro-controls{
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.macropro-toggle{
  min-height: 38px;
  padding: 0 .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease;
}
.macropro-toggle.active{
  transform: none;
}
.macropro-card h2{
  margin: .15rem 0 0;
  color: #e2e8f0;
  font-size: 1.05rem;
}
.macropro-card h3{
  margin: 0;
  color: #e2e8f0;
  font-size: .98rem;
}
.macropro-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .85rem;
}
.macropro-grid label{
  display: grid;
  gap: .35rem;
  color: #e2e8f0;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.macropro-label-row{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.macropro-grid input,
.macropro-grid select{
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.3);
  background: rgba(15,23,42,.65);
  color: #e2e8f0;
  padding: 0 .8rem;
  font-size: .96rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.macropro-grid input::placeholder{
  color: #8ea2bd;
}
.macropro-grid input:focus,
.macropro-grid select:focus{
  outline: none;
  border-color: rgba(56,189,248,.72);
  box-shadow: 0 0 0 3px rgba(56,189,248,.2);
}
.macropro-tip{
  all: unset;
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  height: auto;
  border-radius: 0;
  border: 0;
  background: transparent;
  background-image: none !important;
  box-shadow: none;
  color: var(--muted);
  padding: 0 1px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: color .16s ease, transform .16s ease;
}
.macropro-tip,
.macropro-tip:hover,
.macropro-tip:focus,
.macropro-tip:focus-visible,
.macropro-tip:active{
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.macropro-tip:hover{
  color: var(--ink);
  transform: translateY(-1px);
}
.macropro-tip:focus,
.macropro-tip:focus-visible{
  outline: none;
  box-shadow: none;
}
.macropro-tip .nav-icon-lucide{
  width: 14px;
  height: 14px;
  background: transparent !important;
}
.macropro-label-row .macropro-tip,
.settings-delete-info-trigger.macropro-tip{
  /* Padded hit area for touch (icon stays 14px; tap target ~34px). Vertical
     padding is pulled back with negative margin so line height is unchanged. */
  margin: -10px -2px;
  line-height: 1;
  font-size: 0;
  padding: 10px;
}
.macropro-tip::before,
.macropro-tip::after{
  content: none !important;
}
.macropro-tip .macropro-tip-icon{
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.macropro-tip-popover{
  position: absolute;
  z-index: 1200;
  max-width: min(340px, calc(100vw - 24px));
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11,18,36,.98);
  color: #e2e8f0;
  font-size: .88rem;
  line-height: 1.45;
  padding: .65rem .75rem;
  box-shadow: 0 14px 30px rgba(2,6,23,.45);
}
.macropro-precalc-accordion{
  margin-top: .9rem;
}
.macropro-checkbox{
  display: flex !important;
  align-items: center;
  gap: .5rem;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
}
.macropro-checkbox input{
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
}
.macropro-slider-label{
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  font-weight: 600 !important;
  margin-bottom: .25rem;
}
.macropro-slider-label small{
  color: #94a3b8;
}
.macropro-card input[type="range"]{
  width: 100%;
  accent-color: #7c3aed;
}
.macropro-results{
  margin-top: 1.1rem;
  display: grid;
  gap: .9rem;
  animation: macroproFade .26s ease-out;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  background: linear-gradient(175deg, rgba(15,23,42,.84), rgba(2,6,23,.94));
  padding: .95rem;
}
.macropro-results-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.macropro-results-actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}
.macropro-results-head h2{
  margin: 0;
  color: #f8fafc;
}
.macropro-copy-btn{
  min-height: 36px;
  padding: 0 .7rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.macropro-copy-btn .nav-icon-lucide{
  width: 15px;
  height: 15px;
}
.macropro-result-grid{
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .75rem;
}
.macropro-stat-card{
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.62);
  padding: .85rem .7rem;
  text-align: center;
  display: grid;
  gap: .2rem;
  min-height: 8.8rem;
  transition: border-color .16s ease, transform .16s ease;
}
.macropro-stat-card:hover{
  border-color: rgba(148,163,184,.22);
  transform: none;
}
.macropro-stat-card strong{
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1.1;
}
.macropro-stat-card span{
  color: #94a3b8;
  font-size: .82rem;
}
.macropro-stat-card small{
  color: #94a3b8;
  font-size: .74rem;
}
.macropro-stat-subline-placeholder{
  visibility: hidden;
}
.macropro-stat-icon{
  width: 18px;
  height: 18px;
  margin: 0 auto .2rem;
}
.macropro-calories{ color: #6d5bd0; }
.macropro-protein{ color: #ff4d6d; }
.macropro-carbs{ color: #22c55e; }
.macropro-fat{ color: #f97316; }

/* Lucide-replaced SVG fallback colors for macro stat icons */
.macropro-result-grid .lucide-flame{ color: #6d5bd0 !important; }
.macropro-result-grid .lucide-beef,
.macropro-result-grid .lucide-drumstick{ color: #ff4d6d !important; }
.macropro-result-grid .lucide-wheat{ color: #22c55e !important; }
.macropro-result-grid .lucide-droplets{ color: #f97316 !important; }
.macropro-stat-card-calories svg{ color: #6d5bd0 !important; }
.macropro-stat-card-protein svg{ color: #ff4d6d !important; }
.macropro-stat-card-carbs svg{ color: #22c55e !important; }
.macropro-stat-card-fat svg{ color: #f97316 !important; }
.macropro-mix{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.macropro-panel{
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.2);
  background: rgba(15,23,42,.48);
  padding: .85rem;
  display: grid;
  gap: .6rem;
  transition: border-color .16s ease;
}
.macropro-panel:hover{
  border-color: rgba(124,58,237,.42);
}
.macropro-panel h3{
  margin: 0;
}
.macropro-ring-wrap{
  display: grid;
  justify-items: center;
  gap: .45rem;
}
.macropro-ring{
  width: 132px;
  height: 132px;
  border-radius: 50%;
  position: relative;
}
.macropro-ring::after{
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(15,23,42,.88);
  border: 1px solid rgba(148,163,184,.22);
}
.macropro-legend{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem .7rem;
  color: #94a3b8;
  font-size: .8rem;
}
.macropro-legend strong{
  color: #e2e8f0;
  font-weight: 700;
}
.macropro-legend .dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: .3rem;
}
.macropro-legend .dot.protein{ background: #ff4d6d; }
.macropro-legend .dot.carbs{ background: #22c55e; }
.macropro-legend .dot.fat{ background: #f97316; }
.macropro-support-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.macropro-support-grid > div{
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.2);
  background: rgba(2,6,23,.4);
  padding: .65rem .5rem;
  text-align: center;
  display: grid;
  gap: .2rem;
}
.macropro-support-grid .nav-icon-lucide{
  width: 16px;
  height: 16px;
  margin: 0 auto;
  color: #8b5cf6;
}
.macropro-support-grid [data-lucide="salad"]{ color: #a16207; }
.macropro-support-grid [data-lucide="droplet"]{ color: #22d3ee; }
.macropro-support-grid .lucide-salad{ color: #a16207 !important; }
.macropro-support-grid .lucide-droplet{ color: #22d3ee !important; }
.macropro-support-fiber svg{ color: #a16207 !important; }
.macropro-support-water svg{ color: #22d3ee !important; }
.macropro-support-grid strong{
  color: #f8fafc;
}
.macropro-support-grid span{
  color: #94a3b8;
  font-size: .8rem;
}
.macropro-permeal-grid{
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .5rem;
  text-align: center;
}
.macropro-permeal-grid > div{
  border-radius: 10px;
  background: rgba(2,6,23,.36);
  border: 1px solid rgba(148,163,184,.18);
  padding: .55rem .4rem;
}
.macropro-permeal-grid strong{
  color: #f8fafc;
}
.macropro-permeal-grid span{
  display: block;
  color: #94a3b8;
  font-size: .78rem;
}
.macropro-summary-grid{
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .5rem;
  text-align: center;
}
.macropro-summary-grid > div{
  border-radius: 10px;
  background: rgba(2,6,23,.34);
  border: 1px solid rgba(148,163,184,.18);
  padding: .55rem .4rem;
}
.macropro-summary-grid span{
  color: #94a3b8;
  font-size: .8rem;
}
.macropro-summary-grid strong{
  color: #f8fafc;
  display: block;
  margin-top: .1rem;
}
.macropro-summary-grid small{
  color: #94a3b8;
  font-size: .74rem;
}
.macropro-accordion{
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.2);
  background: rgba(15,23,42,.5);
  overflow: hidden;
  transition: border-color .16s ease;
}
.macropro-accordion:hover{
  border-color: rgba(56,189,248,.42);
}
.macropro-accordion summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .85rem;
  color: #e2e8f0;
  font-weight: 600;
}
.macropro-accordion summary::-webkit-details-marker{
  display: none;
}
.macropro-accordion summary span{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.macropro-accordion summary .nav-icon-lucide{
  width: 16px;
  height: 16px;
}
.macropro-accordion[open] summary > .nav-icon-lucide{
  transform: rotate(180deg);
}
.macropro-accordion-body{
  padding: 0 .85rem .8rem;
  color: #cbd5e1;
  font-size: .9rem;
}
.macropro-accordion-body p{
  margin: .45rem 0;
}
.macropro-accordion-body ol{
  margin: 0;
  padding-left: 1.1rem;
}
.macropro-accordion-body li{
  margin: .35rem 0;
}
.macropro-guide-shell{
  display: grid;
  gap: .9rem;
}
.macropro-guide-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, .95fr);
  gap: .85rem;
  align-items: stretch;
}
.macropro-guide-copy,
.macropro-guide-visual,
.macropro-guide-card{
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    linear-gradient(180deg, rgba(15,23,42,.78), rgba(2,6,23,.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.macropro-guide-copy{
  padding: 1rem 1rem 1rem 1.05rem;
  display: grid;
  gap: .55rem;
  align-content: start;
}
.macropro-guide-eyebrow,
.macropro-guide-card-kicker{
  margin: 0;
  font-size: .74rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7dd3fc;
}
.macropro-guide-copy h4{
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.05;
  color: #f8fafc;
}
.macropro-guide-summary{
  margin: 0;
  color: #cbd5e1;
  font-size: .93rem;
  line-height: 1.55;
  max-width: 54ch;
}
.macropro-guide-chips{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.macropro-guide-chips span{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 .72rem;
  border: 1px solid rgba(56,189,248,.22);
  background: rgba(8,47,73,.34);
  color: #dbeafe;
  font-size: .76rem;
  font-weight: 600;
}
.macropro-guide-visual{
  padding: 1rem;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: .85rem;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(124,58,237,.24), transparent 48%),
    radial-gradient(circle at bottom left, rgba(56,189,248,.18), transparent 45%),
    linear-gradient(180deg, rgba(15,23,42,.82), rgba(2,6,23,.92));
}
.macropro-guide-visual::after{
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(56,189,248,.18), transparent 68%);
  pointer-events: none;
}
.macropro-guide-logo-wrap{
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.macropro-guide-logo-wrap img{
  width: 82px;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
}
.macropro-guide-visual-copy{
  position: relative;
  z-index: 1;
  display: grid;
  gap: .35rem;
}
.macropro-guide-visual-copy strong{
  color: #f8fafc;
  font-size: .98rem;
}
.macropro-guide-visual-copy span{
  color: #cbd5e1;
  font-size: .84rem;
  line-height: 1.55;
}
.macropro-guide-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.macropro-guide-card{
  padding: .95rem 1rem;
  display: grid;
  gap: .42rem;
  align-content: start;
}
.macropro-guide-card h5{
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.15;
}
.macropro-guide-card p{
  margin: 0;
  color: #cbd5e1;
  font-size: .9rem;
  line-height: 1.55;
}
.macropro-cta{
  display: flex;
  justify-content: center;
}
.macropro-disclaimer{
  margin: 0;
  color: #94a3b8;
  font-size: .8rem;
  text-align: center;
  line-height: 1.5;
}
.macropro-disclaimer strong{
  color: #e2e8f0;
}
html[data-theme="light"] .macropro-head p{
  color: #475569;
}
html[data-theme="light"] .macropro-card{
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 18px 34px rgba(15,23,42,.08);
}
html[data-theme="light"] .macropro-results{
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
html[data-theme="light"] .macropro-card h2,
html[data-theme="light"] .macropro-card h3,
html[data-theme="light"] .macropro-grid label,
html[data-theme="light"] .macropro-slider-label,
html[data-theme="light"] .macropro-accordion summary,
html[data-theme="light"] .macropro-results-head h2{
  color: #0f172a;
}
html[data-theme="light"] .macropro-grid input,
html[data-theme="light"] .macropro-grid select{
  border-color: #52606d;
  background: #323f4b;
  color: #f5f7fa;
}
html[data-theme="light"] .macropro-grid input::placeholder{
  color: #9aa5b1;
}

/* Macro select parity: keep default/unselected + dropdown menu on grey theme */
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid select{
  background-color: #323f4b !important;
  color: #f5f7fa !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid select option{
  background-color: #323f4b !important;
  color: #f5f7fa !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid select option[value=""][disabled]{
  color: #9aa5b1 !important;
}

/* Macro input parity: typed boxes match dropdown grey theme in all states */
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid input{
  background-color: #323f4b !important;
  color: #f5f7fa !important;
  border-color: #52606d !important;
  box-shadow: none !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid input::placeholder{
  color: #9aa5b1 !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-grid input:focus{
  background-color: #323f4b !important;
  color: #f5f7fa !important;
  border-color: rgba(125,211,252,.72) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,.2) !important;
}
html[data-theme="light"] .macropro-tip{
  border: 0;
  background: transparent;
  color: var(--muted);
}
html[data-theme="light"] .macropro-tip:hover{
  color: var(--ink);
}
html[data-theme="light"] .macropro-tip-popover{
  border-color: var(--border);
  background: rgba(255,255,255,.98);
  color: #1e293b;
  box-shadow: 0 12px 28px rgba(15,23,42,.16);
}
html[data-theme="light"] .macropro-checkbox{
  color: #334155 !important;
}
html[data-theme="light"] .macropro-slider-label small,
html[data-theme="light"] .macropro-stat-card span,
html[data-theme="light"] .macropro-stat-card small,
html[data-theme="light"] .macropro-legend,
html[data-theme="light"] .macropro-permeal-grid span,
html[data-theme="light"] .macropro-summary-grid span,
html[data-theme="light"] .macropro-summary-grid small,
html[data-theme="light"] .macropro-support-grid span,
html[data-theme="light"] .macropro-disclaimer,
html[data-theme="light"] #macropro-feedback.muted{
  color: #475569;
}

html[data-theme="light"] .macropro-legend strong{
  color: #0f172a;
}
html[data-theme="light"] .macropro-copy-btn{
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}
html[data-theme="light"] .macropro-stat-card,
html[data-theme="light"] .macropro-panel,
html[data-theme="light"] .macropro-support-grid > div,
html[data-theme="light"] .macropro-permeal-grid > div,
html[data-theme="light"] .macropro-summary-grid > div,
html[data-theme="light"] .macropro-accordion{
  border-color: #cbd5e1;
  background: #f8fafc;
}
html[data-theme="light"] .macropro-stat-card strong,
html[data-theme="light"] .macropro-support-grid strong,
html[data-theme="light"] .macropro-permeal-grid strong,
html[data-theme="light"] .macropro-summary-grid strong,
html[data-theme="light"] .macropro-disclaimer strong{
  color: #0f172a;
}
html[data-theme="light"] .macropro-accordion-body{
  color: #334155;
}
html[data-theme="light"] .macropro-guide-copy,
html[data-theme="light"] .macropro-guide-visual,
html[data-theme="light"] .macropro-guide-card{
  border-color: #cbd5e1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
html[data-theme="light"] .macropro-guide-visual{
  background:
    radial-gradient(circle at top right, rgba(124,58,237,.12), transparent 48%),
    radial-gradient(circle at bottom left, rgba(56,189,248,.14), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
}
html[data-theme="light"] .macropro-guide-copy h4,
html[data-theme="light"] .macropro-guide-card h5,
html[data-theme="light"] .macropro-guide-visual-copy strong{
  color: #0f172a;
}
html[data-theme="light"] .macropro-guide-summary,
html[data-theme="light"] .macropro-guide-card p,
html[data-theme="light"] .macropro-guide-visual-copy span{
  color: #475569;
}
html[data-theme="light"] .macropro-guide-chips span{
  border-color: rgba(56,189,248,.2);
  background: rgba(224,242,254,.72);
  color: #0f172a;
}
html[data-theme="light"] .macropro-guide-logo-wrap{
  background: transparent;
  border: 0;
}
@keyframes macroproFade{
  from{ opacity:0; transform: translateY(6px); }
  to{ opacity:1; transform: translateY(0); }
}
@media (max-width: 720px){
  .macropro-results-head{
    flex-direction: column;
    align-items: flex-start;
  }
  .macropro-results-actions{
    width: 100%;
    justify-content: flex-start;
  }
  .macropro-guide-hero,
  .macropro-guide-grid{
    grid-template-columns: 1fr;
  }
  .macropro-guide-copy,
  .macropro-guide-visual,
  .macropro-guide-card{
    padding: .9rem;
  }
  .macropro-guide-copy h4{
    font-size: 1.15rem;
  }
  .macropro-guide-summary,
  .macropro-guide-card p{
    font-size: .87rem;
  }
}
.public-early-card{
  text-align: center;
  border-color: rgba(89,131,3,.4);
}
.public-early-card .public-auth-submit{
  margin-top: .95rem;
}
.public-early-card .public-auth-help{
  margin: .95rem 0 0;
}

.public-auth-shell:has(.public-sparkle-icon){
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .95rem;
}

.public-auth-shell:has(.public-sparkle-icon) .public-eyebrow{
  margin-bottom: .1rem;
}

.public-auth-shell:has(.public-sparkle-icon) h1{
  margin: 0;
}

.public-auth-shell:has(.public-sparkle-icon) > p{
  margin: 0;
  max-width: 40rem;
}

.public-early-head{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .75rem;
}
.public-sparkle-icon,
.public-mail-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(85,126,2,.92), rgba(141,195,55,.92));
  color: #fff;
}
.public-sparkle-icon{
  width: 64px;
  height: 64px;
  margin: 0;
  box-shadow: 0 14px 34px rgba(141,195,55,.25), 0 0 30px rgba(85,126,2,.3);
}
.public-mail-icon{
  width: 28px;
  height: 28px;
}
.public-sparkle-icon svg,
.public-mail-icon svg{
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.public-sparkle-icon svg{
  width: 30px;
  height: 30px;
  fill: currentColor;
  stroke: none;
}
.public-footer{
  margin-top: 2rem;
  padding: 2rem 1.2rem 1rem;
  border-top: 1px solid rgba(159,163,160,.16);
  background: #0e110e;
}
.public-footer-grid{
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem 1.2rem;
  align-items: start;
}
.public-footer-grid > div{
  min-width: 0;
}
.public-footer-grid h4{ margin: 0 0 .6rem; font-size: 1.25rem; }
.public-footer-grid a{
  display: block;
  color: #9fa3a0;
  text-decoration: none;
  margin: .35rem 0;
}

.public-social-link{
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
}

.public-social-link .nav-icon-lucide{
  width: 15px;
  height: 15px;
}
.public-copy{
  max-width: 1400px;
  margin: 1rem auto 0;
  text-align: center;
  color: #9fa3a0;
}
@keyframes publicFadeUp{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes publicCardDrift{
  0%,100%{ transform: translate3d(0,0,0); }
  50%{ transform: translate3d(0,-6px,0); }
}
@media (max-width: 1100px){
  .public-grid4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .public-grid3{ grid-template-columns: 1fr; }
  .public-nav-wrap{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
  }
  .public-brand{ flex: 1 1 auto; }
  .public-nav-right{
    justify-content: flex-end;
    gap: .55rem;
  }
  .public-nav-center{
    order: 3;
    width: 100%;
    justify-content: center;
    gap: .55rem;
    padding-top: .55rem;
    border-top: 1px solid rgba(159,163,160,.15);
  }
  .public-nav-center a,
  .public-nav-right a{
    font-size: .92rem;
    padding: .32rem .52rem;
  }
  .public-nav-right .btn.btn-info{
    min-height: 38px;
    padding: 0 .85rem;
  }
  .public-footer-grid{ grid-template-columns: 1.2fr 1fr 1fr; }
  .public-section-alt{ padding-left: 0; padding-right: 0; }
}
@media (max-width: 720px){
  .public-header{ position: sticky; top: 0; }
  .public-nav-wrap{ padding: .7rem .9rem; }
  .public-brand img{ width: 40px; height: 40px; }
  .public-brand span{ font-size: 1.35rem; }
  .public-nav-right{ width: 100%; justify-content: center; }
  .public-nav-center{
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: .45rem;
  }
  .public-nav-center a,
  .public-nav-right a{
    min-height: 36px;
  }
  .public-grid4,.public-footer-grid{ grid-template-columns: 1fr; }
  .public-hero p{ font-size: 1.05rem; }
  .public-auth-card{ padding: 1.1rem; }
  .public-role-grid{ grid-template-columns: 1fr; }
  .public-role-btn{
    min-height: 74px;
    padding: .9rem .95rem;
  }
  .public-role-copy{
    font-size: .8rem;
  }
  .public-legal-card{
    padding: 1.05rem .95rem;
  }
  .public-macro-grid{
    grid-template-columns: 1fr;
  }
  .public-macro-result{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .public-compare{ min-width: 540px; }
  .public-footer{
    padding: 1.6rem .9rem calc(1rem + env(safe-area-inset-bottom));
  }
  .public-footer-grid{
    gap: 1.25rem;
    text-align: center;
  }
  .public-footer-intro{
    justify-items: center;
  }
  .public-footer-grid h4{
    font-size: 1.05rem;
    margin-bottom: .4rem;
  }
  .public-footer-grid a{
    margin: .28rem 0;
  }
  .mobile-wrapper-auth .public-nav-wrap{
    padding: .6rem .75rem .7rem;
  }
  .mobile-wrapper-auth .public-brand span{
    font-size: 1.1rem;
  }
  .mobile-wrapper-auth .public-brand img{
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 560px){
  .public-compare{
    min-width: 0;
    width: 100%;
    font-size: .78rem;
  }
  .public-compare th,
  .public-compare td{
    padding: .35rem .4rem;
  }
  .public-compare th:first-child,
  .public-compare td:first-child{
    width: 46%;
  }
  .public-compare th:nth-child(2),
  .public-compare th:nth-child(3),
  .public-compare td:nth-child(2),
  .public-compare td:nth-child(3){
    width: 27%;
  }
}

/* Public redesign overrides */
.public-site{
  position: relative;
  --public-scroll-blur-opacity: 1;
  background:
    radial-gradient(1100px 620px at 12% -6%, rgba(123,172,44,.18), transparent 62%),
    radial-gradient(900px 540px at 92% 8%, rgba(16,185,129,.14), transparent 58%),
    linear-gradient(180deg, #232523 0%, #282b28 38%, #212421 100%);
  color: #ebeeeb;
  isolation: isolate;
}

.public-ambient{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.public-plasma-layer{
  position: absolute;
  inset: -8vh -4vw 0;
  opacity: 1;
  pointer-events: none;
}

.public-plasma-canvas{
  display: block;
  width: 100%;
  height: 100%;
  opacity: .68;
  filter: saturate(.92) blur(.2px);
}

.public-plasma-layer.is-fallback{
  background:
    radial-gradient(52% 42% at 18% 16%, rgba(141,195,55,.18) 0%, rgba(141,195,55,0) 72%),
    radial-gradient(40% 34% at 78% 20%, rgba(148,206,56,.14) 0%, rgba(148,206,56,0) 76%),
    radial-gradient(48% 38% at 50% 64%, rgba(123,172,44,.08) 0%, rgba(123,172,44,0) 76%);
}

.public-ambient-orb{
  position: absolute;
  border-radius: 999px;
  filter: blur(32px);
  opacity: .46;
}

.public-ambient-orb-a{
  width: 28rem;
  height: 28rem;
  top: 5rem;
  left: -6rem;
  background: radial-gradient(circle, rgba(123,172,44,.42) 0%, rgba(123,172,44,0) 72%);
}

.public-ambient-orb-b{
  width: 34rem;
  height: 34rem;
  top: 8rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(148,206,56,.22) 0%, rgba(148,206,56,0) 70%);
}

.public-ambient-grid{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159,163,160,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,163,160,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 88%);
}

.public-header,
.public-main,
.public-footer{
  position: relative;
  z-index: 1;
}

.public-scroll-blur{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7rem;
  pointer-events: none;
  opacity: var(--public-scroll-blur-opacity, 1);
  transition: opacity .22s ease-out;
  z-index: 12;
}

.public-scroll-blur-inner{
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.public-scroll-blur-layer{
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.public-scroll-blur-layer-1{
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.15) 18%, rgba(0,0,0,.92) 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.15) 18%, rgba(0,0,0,.92) 60%, transparent 100%);
  backdrop-filter: blur(.35rem);
  -webkit-backdrop-filter: blur(.35rem);
}

.public-scroll-blur-layer-2{
  -webkit-mask-image: linear-gradient(to bottom, transparent 8%, rgba(0,0,0,.22) 28%, rgba(0,0,0,.94) 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 8%, rgba(0,0,0,.22) 28%, rgba(0,0,0,.94) 72%, transparent 100%);
  backdrop-filter: blur(.55rem);
  -webkit-backdrop-filter: blur(.55rem);
}

.public-scroll-blur-layer-3{
  -webkit-mask-image: linear-gradient(to bottom, transparent 16%, rgba(0,0,0,.32) 38%, rgba(0,0,0,.98) 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 16%, rgba(0,0,0,.32) 38%, rgba(0,0,0,.98) 80%, transparent 100%);
  backdrop-filter: blur(.85rem);
  -webkit-backdrop-filter: blur(.85rem);
}

.public-scroll-blur-layer-4{
  -webkit-mask-image: linear-gradient(to bottom, transparent 24%, rgba(0,0,0,.46) 52%, rgba(0,0,0,.98) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 24%, rgba(0,0,0,.46) 52%, rgba(0,0,0,.98) 88%, transparent 100%);
  backdrop-filter: blur(1.15rem);
  -webkit-backdrop-filter: blur(1.15rem);
}

.public-scroll-blur-layer-5{
  -webkit-mask-image: linear-gradient(to bottom, transparent 34%, rgba(0,0,0,.6) 68%, rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(to bottom, transparent 34%, rgba(0,0,0,.6) 68%, rgba(0,0,0,1) 100%);
  backdrop-filter: blur(1.5rem);
  -webkit-backdrop-filter: blur(1.5rem);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .public-scroll-blur-layer{
    background: linear-gradient(180deg, rgba(15,17,15,0), rgba(15,17,15,.18) 35%, rgba(15,17,15,.42) 100%);
  }
}

.public-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15,17,15,.72);
  border-bottom: 1px solid rgba(159,163,160,.12);
  box-shadow: 0 12px 40px rgba(6,8,6,.18);
}

.public-nav-wrap,
.public-main,
.public-footer-grid,
.public-copy{
  max-width: 1180px;
}

.public-nav-wrap{
  grid-template-columns: 220px 1fr 220px;
  padding: 1rem 1.4rem;
}

.public-brand{
  gap: .8rem;
}

.public-brand img{
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(141,195,55,.22);
}

.public-brand span{
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #a6e541;
}

.public-nav-center a,
.public-nav-right a{
  color: #b4b7b4;
  transition:
    color .24s ease,
    border-color .24s ease,
    background-color .24s ease,
    opacity .24s ease,
    transform .32s cubic-bezier(.22, 1, .36, 1);
  transform: translateY(0);
}

.public-nav-center a:hover,
.public-nav-right a:hover{
  color: #f8fbff;
  background: rgba(22,25,22,.58);
  border-color: rgba(160,221,62,.22);
  box-shadow: none;
  transform: translateY(-0.5px);
}

.public-nav-center a.is-active,
.public-nav-right a.is-active{
  color: #f8fbff;
  background: rgba(22,25,22,.64);
  border-color: rgba(160,221,62,.28);
}

/* legacy public CTA overrides removed in favor of the shared button system */

.public-btn-primary:active,
.public-btn-ghost:active,
.public-nav-center a:active,
.public-nav-right a:active{
  transform: translateY(0) scale(.995);
}

.public-main{
  padding: 1.35rem 1.4rem 0;
}

.public-eyebrow{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a6e541;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .88;
}

.public-eyebrow::before{
  content: "";
  width: 2.5rem;
  height: 1px;
  margin-right: .7rem;
  background: linear-gradient(90deg, rgba(134,239,172,.8), rgba(160,221,62,.45));
}

.public-eyebrow::after{
  content: "";
  width: 2.5rem;
  height: 1px;
  margin-left: .7rem;
  background: linear-gradient(90deg, rgba(160,221,62,.45), rgba(134,239,172,.8));
}

.public-gradient-text{
  display: inline-block;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: #9dd83e !important;
  -webkit-text-fill-color: #9dd83e !important;
}

.public-gradient-text:hover{
  animation-play-state: paused;
}

.public-gradient-text-diagonal{
  --gradient-angle: to bottom right;
}

.public-gradient-text-violet{
  --gradient-colors: #4e7402, #557e02, #659306, #8dc337, #4e7402;
}

/* Hero headline: white base; accent words coloured via .public-gradient-text */
.ph2-headline .public-hero-line.ph2-hline,
.ph2-headline .public-hero-line.ph2-hline span{
  background: none;
  color: #f1f4f1;
  -webkit-text-fill-color: #f1f4f1;
}
html[data-theme="light"] .ph2-headline .public-hero-line.ph2-hline,
html[data-theme="light"] .ph2-headline .public-hero-line.ph2-hline span{
  color: #f1f4f1;
  -webkit-text-fill-color: #f1f4f1;
}

@keyframes public-gradient-shift{
  0%{
    background-position: 0% 50%;
  }

  50%{
    background-position: 100% 50%;
  }

  100%{
    background-position: 0% 50%;
  }
}

.public-hero{
  min-height: auto;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 2rem;
  align-items: start;
  text-align: left;
  justify-items: stretch;
  padding: 2rem 0 1.2rem;
}

.public-hero-copy{
  display: grid;
  gap: 1.1rem;
}

.public-hero h1{
  max-width: 11ch;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  letter-spacing: -.04em;
}

.public-hero p{
  margin: 0;
  max-width: 34rem;
  color: #b4b7b4;
  font-size: 1.12rem;
  line-height: 1.72;
}

.public-hero-actions{
  flex-wrap: wrap;
  margin-top: 0;
}

.public-proof-strip{
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.public-proof-strip span{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(159,163,160,.12);
  color: #d6dad7;
  font-size: .92rem;
}

.public-hero-visual{
  display: grid;
  gap: 1rem;
}

.public-hero-device{
  --hero-tilt-rotate-x: 0deg;
  --hero-tilt-rotate-y: 0deg;
  --hero-tilt-scale: 1;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  padding-top: .35rem;
  perspective: 900px;
}

.public-hero-device::before{
  content: "";
  position: absolute;
  inset: 8% 10% 14%;
  border-radius: 44px;
  background:
    radial-gradient(42% 42% at 50% 26%, rgba(114,166,4,.22) 0%, rgba(114,166,4,0) 72%),
    radial-gradient(46% 46% at 50% 70%, rgba(148,206,56,.14) 0%, rgba(148,206,56,0) 74%);
  filter: blur(36px);
  pointer-events: none;
}

.public-hero-device-image{
  position: relative;
  z-index: 1;
  width: min(100%, 21.5rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 40px rgba(6,8,6,.3));
  transform:
    rotateX(var(--hero-tilt-rotate-x))
    rotateY(var(--hero-tilt-rotate-y))
    scale(var(--hero-tilt-scale));
  will-change: transform;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}

/* ── Public hero phone mockup ───────────────────────────────────── */
.phn-device{
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  zoom: 0.45;
  position: relative;
  width: 760px;
  height: 1632px;
  border-radius: 120px;
  padding: 17px;
  background: linear-gradient(150deg,#5e615e 0%,#2e312e 18%,#3e413f 38%,#242724 62%,#444745 82%,#1e211e 100%);
  box-shadow:
    0 2px 3px rgba(255,255,255,.18) inset,
    0 -2px 3px rgba(0,0,0,.5) inset,
    0 60px 120px -40px rgba(11,13,11,.55),
    0 30px 60px -50px rgba(11,13,11,.6);
}
.phn-rim{
  width: 100%;
  height: 100%;
  border-radius: 104px;
  background: #050605;
  padding: 13px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6);
}
.phn-screen{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 92px;
  overflow: hidden;
  background: #292b29;
}
.phn-island{
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  height: 60px;
  background: #000;
  border-radius: 32px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 26px;
}
.phn-cam{
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,#373a38 0%,#0e100e 70%);
  box-shadow: 0 0 0 2px rgba(57,60,58,.4);
}
.phn-status{
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 42px 58px 18px;
  color: #f5f7fa;
  background: #0c0e0c;
}
.phn-time{ font-size: 30px; font-weight: 600; letter-spacing: .5px; }
.phn-sys{ display: flex; align-items: center; gap: 13px; }
.phn-sys svg{ display: block; }
/* The dashboard as it is today, in the dark theme, drawn at ~1.8x. */
.phn-content{ padding: 0; color: #f5f7fa; }
.phn-appbar{
  display: flex; align-items: center; gap: 26px;
  padding: 18px 44px 30px;
  background: #0c0e0c;
  border-bottom: 2px solid rgba(159,163,160,.12);
}
.phn-logo{ width: 58px; height: 58px; flex: 0 0 auto; }
.phn-wordmark{ font-size: 32px; font-weight: 700; letter-spacing: .16em; color: #fff; }
.phn-appbar-icons{ margin-left: auto; display: flex; gap: 38px; }
.phn-appbar-icons .phn-icon{ width: 40px; height: 40px; color: #f5f7fa; }
.phn-icon{ width: 26px; height: 26px; color: rgba(234,238,235,.72); display: block; }
.phn-body{ padding: 30px 40px 0; }
.phn-eyebrow{ font-size: 20px; letter-spacing: .14em; color: rgba(234,238,235,.72); font-weight: 500; margin-bottom: 6px; text-transform: uppercase; }
.phn-date{ font-size: 40px; font-weight: 700; color: #f5f7fa; letter-spacing: -.01em; margin-bottom: 24px; }
.phn-welcome-row{ display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.phn-welcome{ font-size: 32px; font-weight: 700; color: #f5f7fa; }
.phn-toggle{ display: flex; background: #414442; border-radius: 999px; padding: 6px; gap: 4px; }
.phn-toggle span{ font-size: 26px; font-weight: 600; padding: 12px 28px; border-radius: 999px; color: #d1d5d2; cursor: pointer; transition: background .2s ease, color .2s ease; }
.phn-toggle .phn-on{ background: var(--color-brand); color: var(--color-on-brand); }
.phn-card{
  border-radius: 40px; padding: 34px; margin-bottom: 24px;
  border: 2px solid #525552;
  background: #3b3e3b;
}
.phn-next-top{ display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.phn-next-eyebrow{ font-size: 21px; font-weight: 700; letter-spacing: .14em; color: #83b532; text-transform: uppercase; margin-bottom: 10px; }
.phn-next-title{ font-size: 40px; font-weight: 700; color: #f5f7fa; letter-spacing: -.01em; margin-bottom: 14px; }
.phn-next-meta{ display: flex; align-items: center; gap: 12px; font-size: 26px; color: rgba(234,238,235,.72); }
.phn-next-meta .phn-icon{ width: 30px; height: 30px; color: #9fa3a0; }
.phn-figures{ width: 214px; height: auto; flex: 0 0 auto; margin-top: -6px; }
.phn-next-count{
  display: flex; align-items: baseline; gap: 16px;
  margin-top: 26px; padding-top: 26px;
  border-top: 2px solid rgba(159,163,160,.18);
}
.phn-next-count b{ font-size: 40px; color: #f5f7fa; }
.phn-next-count span{ font-size: 25px; color: rgba(234,238,235,.72); }
.phn-next-btn{
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding: 24px 30px; border-radius: 22px;
  background: #333633; color: #f5f7fa; font-size: 28px; font-weight: 600;
}
.phn-next-btn .phn-icon{ width: 30px; height: 30px; color: #f5f7fa; }
.phn-crow{ display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.phn-ct{ font-size: 30px; font-weight: 700; color: #f5f7fa; }
.phn-streak{ display: flex; align-items: center; gap: 10px; font-size: 24px; color: rgba(231,236,255,.72); }
.phn-streak .phn-icon{ width: 30px; height: 30px; color: #f59e0b; }
.phn-sub{ font-size: 27px; color: rgba(234,238,235,.72); margin: 22px 0 22px; }
.phn-week{ display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; text-align: center; }
.phn-week span{ display: block; font-size: 21px; color: rgba(234,238,235,.72); margin-bottom: 10px; }
.phn-week i{
  display: flex; align-items: center; justify-content: center;
  height: 70px; border-radius: 14px; font-style: normal; font-size: 23px; font-weight: 600;
  color: #f5f7fa; background: rgba(159,163,160,.16);
}
.phn-week i.phn-future{ background: transparent; color: rgba(234,238,235,.35); }
.phn-week i.phn-today{ box-shadow: 0 0 0 4px #81b430; }
.phn-lv0{ background: rgba(159,163,160,.16) !important; }
.phn-lv1{ background: #9cd73d !important; }
.phn-lv2{ background: #659306 !important; }
.phn-lv3{ background: #4a6d03 !important; }
.phn-lv4{ background: #324c00 !important; }
.phn-legend{ display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; font-size: 20px; color: rgba(234,238,235,.72); }
.phn-legend i{ display: inline-block; width: 22px; height: 22px; border-radius: 6px; }
.phn-avg{ display: flex; align-items: center; justify-content: space-between; margin: 22px 0 24px; }
.phn-l{ font-size: 26px; color: #e5e9e5; }
.phn-v{ font-size: 27px; font-weight: 700; color: #f5f7fa; white-space: nowrap; }
.phn-macro{ display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 18px; margin-bottom: 20px; }
.phn-macro:last-child{ margin-bottom: 0; }
.phn-mn{ font-size: 24px; color: rgba(234,238,235,.72); }
.phn-bar{ height: 14px; border-radius: 8px; background: #484b48; overflow: hidden; }
.phn-bar i{ display: block; height: 100%; border-radius: 8px; transition: width .35s ease; }
.phn-val{ font-size: 25px; color: #f5f7fa; font-weight: 700; text-align: right; white-space: nowrap; }
.phn-fill-p{ width: 72%; background: #f87171; }
.phn-fill-c{ width: 60%; background: #34d399; }
.phn-fill-f{ width: 36%; background: #fbbf24; }
.phn-nav{
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 24px 40px 54px;
  display: flex; align-items: center; justify-content: space-between;
  background: #242725;
  border-top: 2px solid rgba(159,163,160,.14);
}
.phn-ni{ width: 96px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 22px; color: #e5e9e5; }
.phn-ni .phn-icon, .phn-ni svg{ width: 40px; height: 40px; color: #e5e9e5; }
.phn-ni.phn-on{ background: #414442; }
.phn-homebar{
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: 200px; height: 8px; border-radius: 5px;
  background: rgba(255,255,255,.55); z-index: 25;
}
/* ── End phone mockup ───────────────────────────────────────────── */

@media (min-width: 920px){
  .public-hero{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
  }
  .public-hero-device-image{
    width: min(100%, 21.5rem);
  }
}

@media (min-width: 1101px){
  .ph2-hero .public-hero-copy{
    transform: translateY(-2rem);
  }
}

.public-hero-panel{
  border-radius: 24px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(16,19,16,.9), rgba(12,15,12,.8));
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(6,8,6,.34);
}

.public-hero-panel-primary{
  padding: 1.25rem 1.3rem;
}

.public-hero-panel-secondary{
  display: grid;
  gap: .9rem;
  padding: 1rem;
}

.public-metric-card{
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.03);
  padding: 1rem 1rem 1.05rem;
}

.public-metric-label{
  display: inline-block;
  margin-bottom: .4rem;
  color: #a6e542;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.public-metric-card strong{
  display: block;
  font-size: 2.35rem;
  line-height: 1;
  margin-bottom: .45rem;
}

.public-metric-card p{
  color: #acafac;
  font-size: .95rem;
  line-height: 1.55;
}

.public-mini-timeline{
  display: grid;
  gap: .7rem;
}

.public-mini-timeline div{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(159,163,160,.1);
  padding: .85rem .95rem;
}

.public-mini-timeline span{
  color: #a6e542;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-mini-timeline strong{
  color: #eff3f0;
  font-size: .98rem;
}

.public-section{
  padding: 3rem 0;
}

.public-section + .public-section{
  border-top-color: rgba(159,163,160,.08);
}

.public-section > .public-eyebrow,
.public-cta > .public-eyebrow{
  display: flex;
  justify-content: center;
  gap: .7rem;
  margin-bottom: .85rem;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.public-section > .public-eyebrow::before,
.public-cta > .public-eyebrow::before{
  margin-right: 0;
}

.public-section > .public-eyebrow::after,
.public-cta > .public-eyebrow::after{
  content: "";
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(160,221,62,.45), rgba(134,239,172,.8));
}

.public-section-alt{
  position: relative;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}
/* Full-width grey band via pseudo — bleeds past .public-main's max-width */
.public-section-alt::before{
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #f1f5f9;
  border-top: 1px solid #e5e9e5;
  border-bottom: 1px solid #e5e9e5;
  z-index: -1;
  pointer-events: none;
}

.public-section > h2,
.public-cta h2{
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.public-sub{
  color: #acafac;
  line-height: 1.68;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.public-grid3,
.public-grid4{
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.public-flow-grid{
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.1rem;
}

.public-flow-card{
  border-radius: 22px;
  border: 1px solid rgba(159,163,160,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  backdrop-filter: blur(18px);
  padding: 1.35rem;
  box-shadow: 0 16px 38px rgba(6,8,6,.2);
}

.public-flow-step{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0 .7rem;
  border-radius: 999px;
  background: rgba(123,172,44,.12);
  border: 1px solid rgba(160,221,62,.18);
  color: #a6e542;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.public-flow-card h3{
  margin: .9rem 0 .45rem;
}

.public-flow-card p{
  margin: 0;
  color: #acafac;
  line-height: 1.62;
}

.public-card,
.public-price-card{
  border: 1px solid rgba(159,163,160,.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
    rgba(14,17,14,.76);
  padding: 1.45rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(6,8,6,.22);
  position: relative;
  overflow: hidden;
}

.public-card::before,
.public-price-card::before{
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(134,239,172,0), rgba(160,221,62,.38), rgba(134,239,172,0));
  opacity: .7;
  pointer-events: none;
}

.public-card:hover,
.public-price-card:hover{
  transform: none;
  border-color: inherit;
  box-shadow: none;
}

.public-card h3,
.public-price-card h3{
  font-size: 1.42rem;
}

.public-card ul,
.public-price-card ul,
.public-card p{
  color: #acafac;
}

.public-card a{
  color: #a6e542;
}

.public-feature-icon{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(123,172,44,.2), rgba(16,185,129,.14));
  border-color: rgba(160,221,62,.18);
  color: #a6e542;
}

.public-grid4 .public-feature-icon{
  color: #a6e542;
}

.public-price{
  font-size: 3.1rem;
}

.public-chip{
  background: linear-gradient(135deg, #52731f, #7bac2c);
}

.public-pricing-hero{
  text-align: center;
}

.public-pricing-hero h2{
  max-width: none;
}

.public-plan-summary{
  padding: 1.4rem 0;
}

.public-plan-summary-card{
  min-height: 100%;
}

.pricing-carousel{
  display: flex;
  justify-content: center;
}

.home-workflow-carousel{
  margin-top: 1.75rem;
}

.home-workflow-carousel .pricing-carousel-shell,
html[data-theme="light"] .home-workflow-carousel .pricing-carousel-shell{
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.pricing-carousel-shell{
  width: min(100%, 32rem);
  border: 1px solid rgba(159,163,160,0.28);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(11, 9, 20, 0.94), rgba(7,10,8,0.96));
  box-shadow: 0 24px 60px rgba(6,8,6,.28);
  padding: 1.35rem 1rem;
}

.pricing-carousel-viewport{
  overflow: hidden;
  border-radius: 1.5rem;
}

.pricing-carousel-track{
  display: flex;
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.pricing-carousel-item{
  flex: 0 0 100%;
  min-width: 100%;
  border: 1px solid rgba(159,163,160,.22);
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(16, 10, 28, 0.98), rgba(9,11,9,0.98));
  min-height: 12.5rem;
  padding: 1.15rem 1.2rem 1.35rem;
}

.pricing-carousel-item h3{
  margin: 1.15rem 0 .45rem;
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  color: #f5f9f5;
}

.pricing-carousel-item p{
  margin: 0;
  max-width: 18rem;
  color: #d7dbd8;
  font-size: 1rem;
  line-height: 1.55;
}

.pricing-carousel-footer{
  margin-top: 1.15rem;
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pricing-carousel-indicators{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 auto;
}

.pricing-carousel-indicator{
  appearance: none;
  -webkit-appearance: none;
  display: inline-block !important;
  flex: 0 0 .94rem !important;
  width: .94rem !important;
  min-width: .94rem !important;
  height: .94rem !important;
  min-height: .94rem !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: rgba(159,163,160,.22) !important;
  box-shadow: inset 0 0 0 1px rgba(159,163,160,.3) !important;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, opacity .18s ease;
}

.pricing-carousel-indicator.is-active{
  background: var(--ui-btn-primary-bg) !important;
  box-shadow: inset 0 0 0 1px var(--ui-btn-primary-border) !important;
  transform: scale(1.08);
}

.public-price-kicker{
  margin: 0 0 .55rem;
  color: #a6e542;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.public-price-note{
  margin: .95rem 0 0;
  color: #9da19e;
  font-size: .92rem;
  line-height: 1.56;
}

.public-pricing-reasons .public-card{
  min-height: 100%;
}

.public-features-grid-section{
  padding-bottom: 1.2rem;
}

/* Public features grid: keep cards in each row same visual height/top baseline. */
.public-features-grid-section .public-grid4{
  align-items: stretch !important;
}

.public-features-grid-section .public-grid4 > .public-card{
  margin-top: 0 !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-rows: auto minmax(2.8em, auto) minmax(4.8em, auto);
  row-gap: .55rem;
}

.public-features-grid-section .public-grid4 > .public-card h3{
  margin: 0 !important;
  line-height: 1.2;
}

.public-features-grid-section .public-grid4 > .public-card p{
  margin: 0 !important;
}

@media (max-width: 1100px){
  .public-features-grid-section .public-grid4 > .public-card{
    grid-template-rows: auto auto auto;
  }
}

.public-features-followup{
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.public-home-workflow-section{
  padding-bottom: 1.2rem;
}

.public-home-stats-section{
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.public-pricing-growth-section{
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.public-cta{
  padding: 4.5rem 0;
  text-align: center;
}

.public-cta .public-sub{
  margin-left: auto;
  margin-right: auto;
}

.public-cta .public-hero-actions{
  justify-content: center;
  margin-top: 1.7rem;
}

.public-auth-wrap{
  min-height: calc(100vh - 92px);
  padding: 2rem 0 4.5rem;
}

.public-auth-wrap-login{
  padding-top: 1.1rem;
}

.public-auth-wrap-register{
  padding-top: 1.1rem;
}

.public-auth-wrap-register .public-eyebrow{
  justify-content: center;
  gap: .7rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.public-auth-wrap-register .public-eyebrow::before{
  margin-right: 0;
}

.public-auth-wrap-register .public-eyebrow::after{
  content: "";
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(160,221,62,.45), rgba(134,239,172,.8));
}

.public-auth-shell{
  width: min(620px, 94vw);
}

.public-auth-benefits{
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  text-align: left;
}

.public-auth-benefits > div{
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.03);
  padding: .95rem 1rem;
}

.public-auth-benefits strong{
  display: block;
  margin-bottom: .3rem;
  color: #f1f4f1;
  font-size: .98rem;
}

.public-auth-benefits span{
  display: block;
  color: #acafac;
  font-size: .92rem;
  line-height: 1.55;
}

.public-auth-card{
  border-radius: 24px;
  border: 1px solid rgba(159,163,160,.14);
  background: linear-gradient(180deg, rgba(16,19,17,.88), rgba(12,15,13,.84));
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 70px rgba(6,8,6,.34);
  padding: 1.6rem;
}

.public-auth-card input[type="email"],
.public-auth-card input[type="password"],
.public-auth-card input[type="text"]{
  min-height: 50px;
  border-color: rgba(159,163,160,.18);
  background: rgba(255,255,255,.04);
}

.public-role-btn{
  min-height: 46px;
}

.public-early-card{
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.public-footer{
  margin-top: 2.5rem;
  background: rgba(10,12,10,.82);
  border-top-color: rgba(159,163,160,.1);
}

.public-footer-kicker{
  margin: 0 0 .55rem;
  color: #a6e542;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html[data-theme="light"] .public-site{
  background:
    radial-gradient(1000px 580px at 8% -8%, rgba(123,172,44,.12), transparent 60%),
    radial-gradient(820px 500px at 96% 8%, rgba(16,185,129,.1), transparent 56%),
    linear-gradient(180deg, #f5f9fc 0%, #f1f5f2 36%, #f8fbff 100%);
  color: #1e211e;
}

html[data-theme="light"] .public-header{
  background: rgba(8,8,10,.96);
  border-bottom-color: rgba(255,255,255,.10);
}

html[data-theme="light"] .public-sub,
html[data-theme="light"] .public-card p,
html[data-theme="light"] .public-card ul,
html[data-theme="light"] .public-price-card ul,
html[data-theme="light"] .public-hero p,
html[data-theme="light"] .public-workout-progress,
html[data-theme="light"] .public-copy,
html[data-theme="light"] .public-footer-grid a,
html[data-theme="light"] .public-auth-shell > p,
html[data-theme="light"] .public-auth-help{
  color: #5f625f;
}

html[data-theme="light"] .public-hero-panel,
html[data-theme="light"] .public-card,
html[data-theme="light"] .public-price-card,
html[data-theme="light"] .public-auth-card,
html[data-theme="light"] .public-mini-timeline div,
html[data-theme="light"] .public-metric-card{
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,250,255,.92));
  border-color: rgba(159,163,160,.16);
  box-shadow: 0 18px 44px rgba(22,25,22,.08);
}

html[data-theme="light"] .public-plasma-canvas{
  opacity: .26;
}

html[data-theme="light"] .public-gradient-text,
html[data-theme="light"] .public-gradient-text-violet{
  color: #9dd83e !important;
  -webkit-text-fill-color: #9dd83e !important;
}

html[data-theme="light"] .public-scroll-blur-layer-1,
html[data-theme="light"] .public-scroll-blur-layer-2,
html[data-theme="light"] .public-scroll-blur-layer-3,
html[data-theme="light"] .public-scroll-blur-layer-4,
html[data-theme="light"] .public-scroll-blur-layer-5{
  background: linear-gradient(180deg, rgba(245,249,252,0), rgba(245,249,252,.06) 32%, rgba(245,249,252,.12) 100%);
}

html[data-theme="light"] .public-proof-strip span{
  background: rgba(255,255,255,.72);
  color: #3c3f3c;
}

html[data-theme="light"] .public-eyebrow{
  color: #52731f;
}

html[data-theme="light"] .public-flow-card,
html[data-theme="light"] .public-auth-benefits > div{
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,250,255,.92));
  border-color: rgba(159,163,160,.16);
  box-shadow: 0 16px 38px rgba(22,25,22,.06);
}

html[data-theme="light"] .public-flow-card p,
html[data-theme="light"] .public-auth-benefits span{
  color: #5f625f;
}

html[data-theme="light"] .public-price-note{
  color: #5f625f;
}

html[data-theme="light"] .public-auth-benefits strong{
  color: #1e211e;
}

html[data-theme="light"] .public-footer{
  background: rgba(242,246,243,.92);
}

html[data-theme="light"] .public-legal-card{
  background: #ffffff;
  border-color: rgba(159,163,160,.2);
  box-shadow: 0 8px 32px rgba(22,25,22,.08);
}

html[data-theme="light"] .public-legal-content{
  color: #3e413e;
}

html[data-theme="light"] .public-legal-content h2,
html[data-theme="light"] .public-legal-content h3{
  color: #161916;
}

html[data-theme="light"] .public-legal-content strong{
  color: #161916;
}

html[data-theme="light"] .public-legal-head p{
  color: #525552;
}

html[data-theme="light"] .public-compare-wrap{
  -webkit-overflow-scrolling: touch;
}
html[data-theme="light"] .public-compare{
  background: #ffffff;
  border-color: rgba(159,163,160,.25);
}
html[data-theme="light"] .public-compare th{
  background: #f1f5f9;
  color: #161916;
  border-bottom-color: rgba(159,163,160,.2);
}
html[data-theme="light"] .public-compare td{
  color: #3e413e;
}
html[data-theme="light"] .public-compare tbody tr td:nth-child(2){
  color: #638c21;
  font-weight: 700;
}
html[data-theme="light"] .public-compare td.cell-yes{
  color: #638c21;
  font-weight: 700;
}
html[data-theme="light"] .public-compare td.cell-no{
  color: #9fa3a0;
}

html[data-theme="light"] .pricing-carousel-shell{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,249,246,.94));
  border-color: rgba(159,163,160,.2);
  box-shadow: 0 20px 48px rgba(22,25,22,.08);
}

html[data-theme="light"] .pricing-carousel-item{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,247,.96));
  border-color: rgba(159,163,160,.18);
}

html[data-theme="light"] .pricing-carousel-item p{
  color: #5f625f;
}

html[data-theme="light"] .pricing-carousel-item h3{
  color: #1e211e;
}

html[data-theme="light"] .pricing-carousel-indicator{
  background: rgba(159,163,160,.28) !important;
  box-shadow: inset 0 0 0 1px rgba(159,163,160,.32) !important;
}

html[data-theme="light"] .pricing-carousel-indicator.is-active{
  background: var(--ui-btn-primary-bg) !important;
  box-shadow: inset 0 0 0 1px var(--ui-btn-primary-border) !important;
}

html[data-theme="light"] .public-nav-center a.is-active,
html[data-theme="light"] .public-nav-right a.is-active{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: #ffffff;
}

@media (max-width: 1100px){
  .public-hero{
    grid-template-columns: 1fr;
    text-align: center;
  }

  .public-hero-copy{
    justify-items: center;
  }

  .public-proof-strip{
    justify-content: center;
  }

  .public-hero-device{
    padding-top: .8rem;
    min-height: 100%;
  }

  .public-flow-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px){
  .public-plasma-layer{
    display: none;
  }

  .public-main{
    padding: 1rem .95rem 0;
  }

  .public-hero{
    gap: 1.25rem;
    padding-top: 1.35rem;
  }

  .public-hero h1{
    max-width: 12ch;
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }

  .public-hero-device{
    display: none;
  }

  .public-hero-actions{
    width: 100%;
    justify-content: center;
  }

  .public-hero-actions .btn{
    flex: 1 1 100%;
  }

  .public-hero-panel-primary,
  .public-hero-panel-secondary,
  .public-card,
  .public-price-card,
  .public-auth-card{
    padding: 1.1rem;
  }

  .public-auth-benefits{
    grid-template-columns: 1fr;
  }

  .public-section{
    padding: 2.35rem 0;
  }

  .pricing-carousel-shell{
    padding: .85rem;
  }

  .pricing-carousel-item{
    min-height: 13rem;
    padding: 1.15rem;
  }

  .pricing-carousel-item p{
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce){
  .public-scroll-blur,
  .public-plasma-layer{
    display: none;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 980px){
  .public-hero-device-image{
    transform: none !important;
  }

  .public-scroll-blur,
  .public-plasma-layer{
    display: none;
  }
}

/* Shared button system */
:root{
  --ui-btn-radius: 12px;
  --ui-btn-min-height: 2.6rem;
  --ui-btn-padding-y: 12px;
  --ui-btn-padding-x: 16px;
  --ui-btn-gap: 7px;
  --ui-btn-font-size: 15px;
  --ui-btn-font-weight: 600;
  --ui-btn-shadow: none;
  --ui-btn-border-width: .75px;
  /* Light mode mirrors dark: a subtle default on a translucent hairline, and a
     primary that is an actual accent fill. Previously default, primary,
     secondary, light and dark all resolved to the same grey, so a primary
     button was indistinguishable from a secondary one, and the hairline was
     pure #000000 — the one border weight no other surface in the app uses. */
  --ui-btn-default-bg: var(--btn-subtle-bg);
  --ui-btn-default-border: transparent;
  --ui-btn-default-fg: var(--btn-subtle-fg);
  --ui-btn-default-hover-bg: var(--btn-subtle-bg-hover);
  --ui-btn-default-hover-border: transparent;
  --ui-btn-primary-bg: var(--color-brand);
  --ui-btn-primary-border: transparent;
  --ui-btn-primary-fg: var(--color-on-brand);
  --ui-btn-primary-hover-bg: var(--color-brand-hover);
  --ui-btn-primary-hover-border: transparent;
  --ui-btn-secondary-bg: var(--btn-subtle-bg);
  --ui-btn-secondary-border: transparent;
  --ui-btn-secondary-fg: var(--btn-subtle-fg);
  --ui-btn-secondary-hover-bg: var(--btn-subtle-bg-hover);
  --ui-btn-secondary-hover-border: transparent;
  /* Tinted: the accent at low opacity, for page and toolbar actions that
     should read as actions without competing with the primary. Label on tint
     is 5.65:1 here and 9.05:1 in dark. */
  --ui-btn-tinted-bg: #EAF6D3;
  --ui-btn-tinted-border: transparent;
  --ui-btn-tinted-fg: #3F6212;
  --ui-btn-tinted-hover-bg: #DFF0BF;
  --ui-btn-tinted-hover-border: transparent;
  /* These variants were unreachable until the cascade fix below, so their
     contrast had never been exercised: #16a34a gave the label 3.15:1 and
     #dc2626 gave 4.41:1, both under the 4.5:1 button text needs. */
  --ui-btn-success-bg: #15803d;
  --ui-btn-success-border: transparent;
  --ui-btn-success-fg: #f0fdf4;
  --ui-btn-success-hover-bg: #166534;
  --ui-btn-success-hover-border: transparent;
  --ui-btn-warning-bg: #f59e0b;
  --ui-btn-warning-border: transparent;
  --ui-btn-warning-fg: #161917;
  --ui-btn-warning-hover-bg: #d97706;
  --ui-btn-warning-hover-border: transparent;
  --ui-btn-danger-bg: #f5e1e2;
  --ui-btn-danger-border: transparent;
  --ui-btn-danger-fg: #b91c1c;
  --ui-btn-danger-hover-bg: #efd2d4;
  --ui-btn-danger-hover-border: transparent;
  --ui-btn-info-bg: var(--color-brand);
  --ui-btn-info-border: transparent;
  --ui-btn-info-fg: var(--color-on-brand);
  --ui-btn-info-hover-bg: var(--color-brand-hover);
  --ui-btn-info-hover-border: transparent;
  --ui-btn-light-bg: #EDEFED;
  --ui-btn-light-border: transparent;
  --ui-btn-light-fg: var(--btn-subtle-fg);
  --ui-btn-light-hover-bg: #E3E6E3;
  --ui-btn-light-hover-border: transparent;
  --ui-btn-dark-bg: var(--btn-subtle-bg);
  --ui-btn-dark-border: transparent;
  --ui-btn-dark-fg: var(--btn-subtle-fg);
  --ui-btn-dark-hover-bg: var(--btn-subtle-bg-hover);
  --ui-btn-dark-hover-border: transparent;
  --ui-btn-link-bg: transparent;
  --ui-btn-link-border: transparent;
  --ui-btn-link-fg: var(--color-accent);
  --ui-btn-link-hover-bg: transparent;
  --ui-btn-link-hover-border: transparent;
}

html[data-theme="dark"]{
  --ui-btn-border-width: 1px;
  --ui-btn-default-bg: #1E2220;
  --ui-btn-default-border: transparent;
  --ui-btn-default-fg: #F5F5F5;
  --ui-btn-default-hover-bg: #272C29;
  --ui-btn-default-hover-border: transparent;
  /* Same primary as light, so the two modes agree. #3b82f6 gave a white label
     only 3.68:1, under the 4.5:1 needed for button text; #2563eb reaches
     5.17:1 and its hover 6.70:1. */
  --ui-btn-primary-bg: var(--color-brand);
  --ui-btn-primary-border: transparent;
  --ui-btn-primary-fg: var(--color-on-brand);
  --ui-btn-primary-hover-bg: var(--color-brand-hover);
  --ui-btn-primary-hover-border: transparent;
  --ui-btn-secondary-bg: #1E2220;
  --ui-btn-secondary-border: transparent;
  --ui-btn-secondary-fg: #E6E9E7;
  --ui-btn-secondary-hover-bg: #272C29;
  --ui-btn-secondary-hover-border: transparent;
  --ui-btn-light-bg: rgba(245,245,245,.96);
  --ui-btn-light-border: transparent;
  --ui-btn-light-fg: #0D0F0E;
  --ui-btn-light-hover-bg: #ffffff;
  --ui-btn-light-hover-border: transparent;
  --ui-btn-tinted-bg: rgba(181,245,66,.14);
  --ui-btn-tinted-border: transparent;
  --ui-btn-tinted-fg: #C9F77A;
  --ui-btn-tinted-hover-bg: rgba(181,245,66,.2);
  --ui-btn-tinted-hover-border: transparent;
  /* The danger tint has to invert for the dark surface; the light pink would
     be a near-white slab here. Label on tint is 6.77:1. */
  --ui-btn-danger-bg: #3e2d36;
  --ui-btn-danger-border: transparent;
  --ui-btn-danger-fg: #fca5a5;
  --ui-btn-danger-hover-bg: #4a343e;
  --ui-btn-danger-hover-border: transparent;
  /* A hairline rather than a border: the authenticated app routes every
     button through these, so this is the edge actually seen in dark mode. */
  --ui-btn-dark-bg: #272C29;
  --ui-btn-dark-border: transparent;
  --ui-btn-dark-fg: #F5F5F5;
  --ui-btn-dark-hover-bg: #303631;
  --ui-btn-dark-hover-border: transparent;
  --ui-btn-link-fg: var(--color-accent);
}

/* Public pages intentionally use the dark button treatment on a light theme root. */
body.public-site{
  --ui-btn-border-width: 1px;
}

:root{
  --ui-icon-btn-size: 2.5rem;
  --ui-icon-btn-radius: 14px;
  --ui-icon-btn-fg: #0D0F0E;
  --ui-icon-btn-hover-bg: rgba(13,15,14,.08);
  --ui-icon-btn-active-bg: rgba(13,15,14,.14);
  --ui-icon-btn-focus-ring: rgba(77,124,15,.35);
}

html[data-theme="dark"]{
  --ui-icon-btn-fg: #D5D9D6;
  --ui-icon-btn-hover-bg: rgba(245,245,245,.1);
  --ui-icon-btn-active-bg: rgba(245,245,245,.16);
  --ui-icon-btn-focus-ring: rgba(181,245,66,.35);
}

.btn,
.button,
a.button,
.pill-link,
.secondary-button,
.public-btn-primary,
.public-btn-ghost,
.plan-cta,
.pricing-cta,
.plan-cta-btn,
a.secondary[role="button"],
a.secondary,
button.secondary,
.secondary[role="button"]{
  --ui-btn-bg: var(--ui-btn-default-bg);
  --ui-btn-border: var(--ui-btn-default-border);
  --ui-btn-fg: var(--ui-btn-default-fg);
  --ui-btn-hover-bg: var(--ui-btn-default-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-default-hover-border);
  --ui-btn-active-bg: var(--ui-btn-hover-bg);
  --ui-btn-active-border: var(--ui-btn-hover-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-gap);
  min-height: var(--ui-btn-min-height);
  padding: var(--ui-btn-padding-y) var(--ui-btn-padding-x);
  border-radius: var(--ui-btn-radius) !important;
  border: var(--ui-btn-border-width) solid var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  font-size: var(--ui-btn-font-size);
  font-weight: var(--ui-btn-font-weight);
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--ui-btn-shadow) !important;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.btn:hover,
.button:hover,
a.button:hover,
.pill-link:hover,
.secondary-button:hover,
.public-btn-primary:hover,
.public-btn-ghost:hover,
.plan-cta:hover,
.pricing-cta:hover,
.plan-cta-btn:hover,
a.secondary[role="button"]:hover,
a.secondary:hover,
button.secondary:hover,
.secondary[role="button"]:hover,
.btn:focus,
.button:focus,
a.button:focus,
.pill-link:focus,
.secondary-button:focus,
.public-btn-primary:focus,
.public-btn-ghost:focus,
.plan-cta:focus,
.pricing-cta:focus,
.plan-cta-btn:focus,
a.secondary[role="button"]:focus,
a.secondary:focus,
button.secondary:focus,
.secondary[role="button"]:focus,
.btn:focus-visible,
.button:focus-visible,
a.button:focus-visible,
.pill-link:focus-visible,
.secondary-button:focus-visible,
.public-btn-primary:focus-visible,
.public-btn-ghost:focus-visible,
.plan-cta:focus-visible,
.pricing-cta:focus-visible,
.plan-cta-btn:focus-visible,
a.secondary[role="button"]:focus-visible,
a.secondary:focus-visible,
button.secondary:focus-visible,
.secondary[role="button"]:focus-visible{
  background: var(--ui-btn-hover-bg) !important;
  border-color: var(--ui-btn-hover-border) !important;
  color: var(--ui-btn-fg) !important;
  transform: translateY(-1px);
}

.btn:active,
.button:active,
a.button:active,
.pill-link:active,
.secondary-button:active,
.public-btn-primary:active,
.public-btn-ghost:active,
.plan-cta:active,
.pricing-cta:active,
.plan-cta-btn:active,
a.secondary[role="button"]:active,
a.secondary:active,
button.secondary:active,
.secondary[role="button"]:active{
  background: var(--ui-btn-active-bg) !important;
  border-color: var(--ui-btn-active-border) !important;
  /* A press that acknowledges rather than animates: the button gives slightly
     under the finger, which is most of what makes a tap feel answered. */
  transform: scale(.975);
}

@media (prefers-reduced-motion: reduce){
  .btn:active,
  .button:active,
  a.button:active,
  .pill-link:active,
  .secondary-button:active,
  .plan-cta:active,
  .pricing-cta:active,
  .plan-cta-btn:active,
  a.secondary:active,
  button.secondary:active{
    transform: none;
  }
}

.btn:focus-visible,
.button:focus-visible,
a.button:focus-visible,
.pill-link:focus-visible,
.secondary-button:focus-visible,
.public-btn-primary:focus-visible,
.public-btn-ghost:focus-visible,
.plan-cta:focus-visible,
.pricing-cta:focus-visible,
.plan-cta-btn:focus-visible,
a.secondary[role="button"]:focus-visible,
a.secondary:focus-visible,
button.secondary:focus-visible,
.secondary[role="button"]:focus-visible{
  outline: 2px solid rgba(141,195,55,.45);
  outline-offset: 2px;
}

.btn[disabled],
.button[disabled],
.pill-link[disabled],
.secondary-button[disabled],
.plan-cta-btn[disabled],
.is-disabled,
[aria-disabled="true"]{
  opacity: .55;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
}

.btn .nav-icon-lucide,
.button .nav-icon-lucide,
a.button .nav-icon-lucide,
.pill-link .nav-icon-lucide,
.secondary-button .nav-icon-lucide,
.public-btn-primary .nav-icon-lucide,
.public-btn-ghost .nav-icon-lucide,
.plan-cta .nav-icon-lucide,
.pricing-cta .nav-icon-lucide,
.plan-cta-btn .nav-icon-lucide,
.btn [data-lucide],
.button [data-lucide],
a.button [data-lucide],
.pill-link [data-lucide],
.secondary-button [data-lucide],
.public-btn-primary [data-lucide],
.public-btn-ghost [data-lucide],
.plan-cta [data-lucide],
.pricing-cta [data-lucide],
.plan-cta-btn [data-lucide]{
  color: currentColor !important;
  stroke: currentColor !important;
  fill: none;
}

.btn-primary,
.plan-cta,
.pricing-cta,
.plan-cta-btn,
.primary.button,
a.button.primary,
.pill-link.primary,
button.primary{
  --ui-btn-bg: var(--ui-btn-primary-bg);
  --ui-btn-border: var(--ui-btn-primary-border);
  --ui-btn-fg: var(--ui-btn-primary-fg);
  --ui-btn-hover-bg: var(--ui-btn-primary-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-primary-hover-border);
}

.btn-secondary,
.secondary-button,
a.secondary[role="button"],
a.secondary,
button.secondary,
.secondary[role="button"],
.pill-link.secondary{
  --ui-btn-bg: var(--ui-btn-secondary-bg);
  --ui-btn-border: var(--ui-btn-secondary-border);
  --ui-btn-fg: var(--ui-btn-secondary-fg);
  --ui-btn-hover-bg: var(--ui-btn-secondary-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-secondary-hover-border);
}

.btn-success,
.auto-save-btn,
.pricing-cta.is-current{
  --ui-btn-bg: var(--ui-btn-success-bg);
  --ui-btn-border: var(--ui-btn-success-border);
  --ui-btn-fg: var(--ui-btn-success-fg);
  --ui-btn-hover-bg: var(--ui-btn-success-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-success-hover-border);
}

.btn-warning{
  --ui-btn-bg: var(--ui-btn-warning-bg);
  --ui-btn-border: var(--ui-btn-warning-border);
  --ui-btn-fg: var(--ui-btn-warning-fg);
  --ui-btn-hover-bg: var(--ui-btn-warning-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-warning-hover-border);
}

.btn-danger,
.auto-danger-btn,
.plan-cancel-btn,
.subtle-danger-btn{
  --ui-btn-bg: var(--ui-btn-danger-bg);
  --ui-btn-border: var(--ui-btn-danger-border);
  --ui-btn-fg: var(--ui-btn-danger-fg);
  --ui-btn-hover-bg: var(--ui-btn-danger-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-danger-hover-border);
}

.btn-info,
.public-btn-primary{
  --ui-btn-bg: var(--ui-btn-info-bg);
  --ui-btn-border: var(--ui-btn-info-border);
  --ui-btn-fg: var(--ui-btn-info-fg);
  --ui-btn-hover-bg: var(--ui-btn-info-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-info-hover-border);
}

.btn-light{
  --ui-btn-bg: var(--ui-btn-light-bg);
  --ui-btn-border: var(--ui-btn-light-border);
  --ui-btn-fg: var(--ui-btn-light-fg);
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-light-hover-border);
}

.btn-dark,
.public-btn-ghost{
  --ui-btn-bg: var(--ui-btn-dark-bg);
  --ui-btn-border: var(--ui-btn-dark-border);
  --ui-btn-fg: var(--ui-btn-dark-fg);
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-dark-hover-border);
}

.btn-link,
.link{
  --ui-btn-bg: var(--ui-btn-link-bg);
  --ui-btn-border: var(--ui-btn-link-border);
  --ui-btn-fg: var(--ui-btn-link-fg);
  --ui-btn-hover-bg: var(--ui-btn-link-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-link-hover-border);
  padding-inline: .25rem;
  min-height: auto;
}

.back-link,
.public-back-btn,
.pill-link.admin-back.back-link,
.messages-back-btn{
  width: var(--back-btn-size);
  min-width: var(--back-btn-size);
  height: var(--back-btn-size);
  min-height: var(--back-btn-size);
  padding: 0;
}

.plan-cta-wide{
  min-width: 180px;
}

/* Shared icon-only button variant */
.btn-icon-only,
.icon-btn,
.appbar-icon-btn,
.message-menu-trigger,
.messages-sidebar-announcements,
.messages-sidebar-compose,
.coach-automation-icon-btn,
.coach-payments-icon-btn,
.coach-library-page .library-plan-icon-action,
.coach-library-page .library-plan-actions .library-icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ui-icon-btn-size);
  min-width: var(--ui-icon-btn-size);
  height: var(--ui-icon-btn-size);
  min-height: var(--ui-icon-btn-size);
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: var(--ui-icon-btn-radius) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ui-icon-btn-fg) !important;
}

.btn-icon-only:hover,
.btn-icon-only:focus,
.btn-icon-only:focus-visible,
.icon-btn:hover,
.icon-btn:focus,
.icon-btn:focus-visible,
.appbar-icon-btn:hover,
.appbar-icon-btn:focus,
.appbar-icon-btn:focus-visible,
.message-menu-trigger:hover,
.message-menu-trigger:focus,
.message-menu-trigger:focus-visible,
.messages-sidebar-announcements:hover,
.messages-sidebar-announcements:focus,
.messages-sidebar-announcements:focus-visible,
.messages-sidebar-compose:hover,
.messages-sidebar-compose:focus,
.messages-sidebar-compose:focus-visible,
.coach-automation-icon-btn:hover,
.coach-automation-icon-btn:focus,
.coach-automation-icon-btn:focus-visible,
.coach-payments-icon-btn:hover,
.coach-payments-icon-btn:focus,
.coach-payments-icon-btn:focus-visible,
.coach-library-page .library-plan-icon-action:hover,
.coach-library-page .library-plan-icon-action:focus,
.coach-library-page .library-plan-icon-action:focus-visible,
.coach-library-page .library-plan-actions .library-icon-btn:hover,
.coach-library-page .library-plan-actions .library-icon-btn:focus,
.coach-library-page .library-plan-actions .library-icon-btn:focus-visible{
  background: var(--ui-icon-btn-hover-bg) !important;
  border-color: transparent !important;
  color: var(--ui-icon-btn-fg) !important;
  transform: none !important;
}

.btn-icon-only:active,
.icon-btn:active,
.appbar-icon-btn:active,
.message-menu-trigger:active,
.messages-sidebar-announcements:active,
.messages-sidebar-compose:active,
.coach-automation-icon-btn:active,
.coach-payments-icon-btn:active,
.coach-library-page .library-plan-icon-action:active,
.coach-library-page .library-plan-actions .library-icon-btn:active{
  background: var(--ui-icon-btn-active-bg) !important;
  border-color: transparent !important;
  transform: none !important;
}

.btn-icon-only:focus-visible,
.icon-btn:focus-visible,
.appbar-icon-btn:focus-visible,
.message-menu-trigger:focus-visible,
.messages-sidebar-announcements:focus-visible,
.messages-sidebar-compose:focus-visible,
.coach-automation-icon-btn:focus-visible,
.coach-payments-icon-btn:focus-visible,
.coach-library-page .library-plan-icon-action:focus-visible,
.coach-library-page .library-plan-actions .library-icon-btn:focus-visible{
  outline: 2px solid var(--ui-icon-btn-focus-ring);
  outline-offset: 2px;
}

.btn-icon-only .nav-icon-lucide,
.icon-btn .nav-icon-lucide,
.appbar-icon-btn .nav-icon-lucide,
.message-menu-trigger .nav-icon-lucide,
.messages-sidebar-announcements .nav-icon-lucide,
.messages-sidebar-compose .nav-icon-lucide,
.coach-automation-icon-btn .nav-icon-lucide,
.coach-payments-icon-btn .nav-icon-lucide,
.coach-library-page .library-plan-icon-action .nav-icon-lucide,
.coach-library-page .library-plan-actions .library-icon-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

@media (max-width: 720px){
  .plan-cta-wide{
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Final deterministic nutrition + macro icon palette (wins by order). */
.nutrition-actions #edit-targets-btn .nav-icon-lucide,
.nutrition-actions #edit-targets-btn svg,
.nutrition-actions #log-water-btn .nav-icon-lucide,
.nutrition-actions #log-water-btn svg,
.nutrition-actions #log-food-btn .nav-icon-lucide,
.nutrition-actions #log-food-btn svg,
.nutrition-actions #add-custom-food-btn .nav-icon-lucide,
.nutrition-actions #add-custom-food-btn svg{
  color: #fff !important;
  stroke: currentColor !important;
}
html[data-theme="dark"] .nutrition-actions #edit-targets-btn .nav-icon-lucide,
html[data-theme="dark"] .nutrition-actions #edit-targets-btn svg,
html[data-theme="dark"] .nutrition-actions #log-water-btn .nav-icon-lucide,
html[data-theme="dark"] .nutrition-actions #log-water-btn svg,
html[data-theme="dark"] .nutrition-actions #log-food-btn .nav-icon-lucide,
html[data-theme="dark"] .nutrition-actions #log-food-btn svg,
html[data-theme="dark"] .nutrition-actions #add-custom-food-btn .nav-icon-lucide,
html[data-theme="dark"] .nutrition-actions #add-custom-food-btn svg{
  color: #fff !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] .page-actions.nutrition-actions a.secondary,
html[data-theme="dark"] .page-actions.nutrition-actions button.secondary,
html[data-theme="dark"] .page-actions.nutrition-actions a[role="button"].secondary,
html[data-theme="dark"] .page-actions.nutrition-actions .secondary{
  background: linear-gradient(135deg, #9bd73d, #88bd35) !important;
  color: #0e110f !important;
  border-color: rgba(170,235,66,.22) !important;
  box-shadow: none !important;
  transform: translateY(0);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

html[data-theme="dark"] .page-actions.nutrition-actions a.secondary:hover,
html[data-theme="dark"] .page-actions.nutrition-actions button.secondary:hover,
html[data-theme="dark"] .page-actions.nutrition-actions a[role="button"].secondary:hover,
html[data-theme="dark"] .page-actions.nutrition-actions .secondary:hover,
html[data-theme="dark"] .page-actions.nutrition-actions a.secondary:focus,
html[data-theme="dark"] .page-actions.nutrition-actions button.secondary:focus,
html[data-theme="dark"] .page-actions.nutrition-actions a[role="button"].secondary:focus,
html[data-theme="dark"] .page-actions.nutrition-actions .secondary:focus,
html[data-theme="dark"] .page-actions.nutrition-actions a.secondary:focus-visible,
html[data-theme="dark"] .page-actions.nutrition-actions button.secondary:focus-visible,
html[data-theme="dark"] .page-actions.nutrition-actions a[role="button"].secondary:focus-visible,
html[data-theme="dark"] .page-actions.nutrition-actions .secondary:focus-visible{
  background: linear-gradient(135deg, #97d13c, #87bb33) !important;
  color: #0e110f !important;
  border-color: rgba(170,235,66,.28) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

html[data-theme="dark"] .page-actions.nutrition-actions a.secondary:active,
html[data-theme="dark"] .page-actions.nutrition-actions button.secondary:active,
html[data-theme="dark"] .page-actions.nutrition-actions a[role="button"].secondary:active,
html[data-theme="dark"] .page-actions.nutrition-actions .secondary:active{
  background: linear-gradient(135deg, #8ec634, #7fb032) !important;
  color: #0e110f !important;
  border-color: rgba(141,195,55,.3) !important;
  box-shadow: none !important;
  transform: translateY(0);
}

.nutrition-targets .target-card-protein .ring-label-icon,
.nutrition-targets .target-card-protein svg,
.nutrition-targets .target-card-protein [data-lucide="beef"],
.nutrition-targets .target-card-protein [data-lucide="drumstick"],
.nutrition-targets .target-card-protein .lucide-beef,
.nutrition-targets .target-card-protein .lucide-drumstick,
.nutrition-snapshot #macro-legend .macro-legend-icon[data-lucide="beef"],
.nutrition-snapshot #macro-legend .macro-legend-icon[data-lucide="drumstick"],
.nutrition-snapshot #macro-legend .macro-legend-icon.lucide-beef,
.nutrition-snapshot #macro-legend .macro-legend-icon.lucide-drumstick,
.nutrition-snapshot #macro-legend > div:nth-child(1) .macro-legend-icon{
  color: #ff4d6d !important;
  stroke: currentColor !important;
}

.nutrition-targets .target-card-carbs .ring-label-icon,
.nutrition-targets .target-card-carbs svg,
.nutrition-targets .target-card-carbs [data-lucide="wheat"],
.nutrition-targets .target-card-carbs .lucide-wheat,
.nutrition-snapshot #macro-legend .macro-legend-icon[data-lucide="wheat"],
.nutrition-snapshot #macro-legend .macro-legend-icon.lucide-wheat,
.nutrition-snapshot #macro-legend > div:nth-child(2) .macro-legend-icon{
  color: #22c55e !important;
  stroke: currentColor !important;
}

.nutrition-targets .target-card-fat .ring-label-icon,
.nutrition-targets .target-card-fat svg,
.nutrition-targets .target-card-fat [data-lucide="droplets"],
.nutrition-targets .target-card-fat .lucide-droplets,
.nutrition-snapshot #macro-legend .macro-legend-icon[data-lucide="droplets"],
.nutrition-snapshot #macro-legend .macro-legend-icon.lucide-droplets,
.nutrition-snapshot #macro-legend > div:nth-child(3) .macro-legend-icon{
  color: #f97316 !important;
  stroke: currentColor !important;
}

.nutrition-targets .target-card-calories .ring-label-icon,
.nutrition-targets .target-card-calories svg,
.nutrition-targets .target-card-calories [data-lucide="flame"],
.nutrition-targets .target-card-calories .lucide-flame{
  color: #578004 !important;
  stroke: currentColor !important;
}

.nutrition-snapshot #macro-legend .dot.protein,
.macropro-legend .dot.protein{
  background: #ff4d6d !important;
}

.nutrition-snapshot #macro-legend .dot.carbs,
.macropro-legend .dot.carbs{
  background: #22c55e !important;
}

.nutrition-snapshot #macro-legend .dot.fat,
.macropro-legend .dot.fat{
  background: #f97316 !important;
}

.macropro-shell .macropro-stat-card-protein .nav-icon-lucide,
.macropro-shell .macropro-stat-card-protein svg,
.macropro-shell .macropro-stat-card-protein [data-lucide="beef"],
.macropro-shell .macropro-stat-card-protein [data-lucide="drumstick"],
.macropro-shell .macropro-stat-card-protein .lucide-beef,
.macropro-shell .macropro-stat-card-protein .lucide-drumstick{
  color: #ff4d6d !important;
  stroke: currentColor !important;
}

.macropro-shell .macropro-stat-card-carbs .nav-icon-lucide,
.macropro-shell .macropro-stat-card-carbs svg,
.macropro-shell .macropro-stat-card-carbs [data-lucide="wheat"],
.macropro-shell .macropro-stat-card-carbs .lucide-wheat{
  color: #22c55e !important;
  stroke: currentColor !important;
}

.macropro-shell .macropro-stat-card-fat .nav-icon-lucide,
.macropro-shell .macropro-stat-card-fat svg,
.macropro-shell .macropro-stat-card-fat [data-lucide="droplets"],
.macropro-shell .macropro-stat-card-fat .lucide-droplets{
  color: #f97316 !important;
  stroke: currentColor !important;
}

/* Keep day snapshot water icon visibly blue in both themes. */
.nutrition-snapshot .water-ring .ring-label-icon,
.nutrition-snapshot .water-ring svg,
.nutrition-snapshot .water-ring [data-lucide="droplet"],
.nutrition-snapshot .water-ring .lucide-droplet{
  color: #97d337 !important;
  stroke: currentColor !important;
}

.macropro-shell .macropro-support-fiber .nav-icon-lucide,
.macropro-shell .macropro-support-fiber svg,
.macropro-shell .macropro-support-fiber [data-lucide="salad"],
.macropro-shell .macropro-support-fiber .lucide-salad{
  color: #a16207 !important;
  stroke: currentColor !important;
}

.macropro-shell .macropro-support-water .nav-icon-lucide,
.macropro-shell .macropro-support-water svg,
.macropro-shell .macropro-support-water [data-lucide="droplet"],
.macropro-shell .macropro-support-water .lucide-droplet{
  color: #22d3ee !important;
  stroke: currentColor !important;
}

/* Messages inbox refresh (inbox-only, mobile-first) */
.messages-inbox-modern .messages-panel{
  background: transparent;
  gap: .95rem;
  padding: .45rem .75rem .95rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.messages-inbox-modern .messages-inbox-topcards{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .78rem;
  padding: .45rem .75rem 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

.messages-inbox-modern .messages-inbox-topcards > *{
  width: 100%;
  min-width: 0;
}

.coach-client-nutrition-embed-wrap{
  width: 100%;
}

.coach-client-nutrition-frame{
  width: 100%;
  min-height: 1180px;
  height: calc(100dvh - var(--appbar-height, 0px) - 14rem);
  border: 0;
  border-radius: 22px;
  background: transparent;
}

@media (max-width: 820px){
  .coach-client-nutrition-frame{
    min-height: 920px;
    height: calc(100dvh - var(--appbar-height, 0px) - 11rem);
  }
}

.messages-inbox-modern.messages-app{
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 0;
  background: transparent;
  overflow: visible;
  border-radius: 0;
}

.messages-inbox-modern .messages-inbox-banner{
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  border: 1px solid rgba(86,127,0,.14);
  box-shadow: none;
}

.messages-inbox-modern .messages-announcements.messages-inbox-banner{
  border-color: rgba(86,127,0,.14);
}

.messages-inbox-modern .messages-inbox-banner summary{
  margin: 0;
  min-height: 2.95rem;
  padding: .25rem .9rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
}

.messages-inbox-modern .messages-inbox-banner summary::-webkit-details-marker{
  display: none;
}

.messages-inbox-modern .messages-bookings-label,
.messages-inbox-modern .messages-announcements-label{
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #eaedea;
  font-weight: 600;
}

.messages-inbox-modern .messages-bookings-icon,
.messages-inbox-modern .messages-announcements-icon{
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.2);
  background: rgba(151,211,55,.08);
}

.messages-inbox-modern .messages-bookings-icon .nav-icon-lucide,
.messages-inbox-modern .messages-announcements-label .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: #97d337;
}

.messages-inbox-modern .messages-bookings-toggle,
.messages-inbox-modern .messages-announcements-toggle{
  width: 18px;
  height: 18px;
  color: #9ea29f;
  flex: 0 0 auto;
}

.messages-inbox-modern .messages-booking-banner-badge,
.messages-inbox-modern .messages-announcements-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0 .72rem;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(34,197,94,.1);
  color: #6ee7b7;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.messages-inbox-modern .messages-bookings-toggle .toggle-open,
.messages-inbox-modern .messages-announcements-toggle .toggle-open{
  display: none;
}

.messages-inbox-modern .messages-inbox-banner[open] .messages-bookings-toggle .toggle-open,
.messages-inbox-modern .messages-inbox-banner[open] .messages-announcements-toggle .toggle-open{
  display: inline-block;
}

.messages-inbox-modern .messages-inbox-banner[open] .messages-bookings-toggle .toggle-closed,
.messages-inbox-modern .messages-inbox-banner[open] .messages-announcements-toggle .toggle-closed{
  display: none;
}

.messages-inbox-modern .messages-bookings-body,
.messages-inbox-modern .messages-announcements-body{
  padding: .35rem 1rem 1rem;
}

.messages-inbox-modern .messages-sidebar{
  margin: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,19,17,.94), rgba(12,15,13,.96));
  border: 1px solid rgba(86,127,0,.14);
  box-shadow: none;
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.messages-inbox-modern .messages-sidebar-header{
  display: grid;
  gap: .9rem;
}

.messages-inbox-modern .messages-sidebar-actions-row{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.messages-inbox-modern .messages-sidebar-heading{
  display: grid;
  gap: .2rem;
}

.messages-inbox-modern .messages-sidebar-header h2{
  margin: 0;
  color: #eaedea;
}

.messages-inbox-modern .messages-sidebar-announcements,
.messages-inbox-modern .messages-sidebar-compose{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #9ea29f;
  border: 0;
  background: rgba(255,255,255,.04);
  cursor: pointer;
  outline: none;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
}

.messages-inbox-modern .messages-sidebar-announcements:hover,
.messages-inbox-modern .messages-sidebar-compose:hover{
  color: #aff144;
  background: rgba(151,211,55,.1);
}

.messages-inbox-modern .messages-sidebar-announcements .nav-icon-lucide,
.messages-inbox-modern .messages-sidebar-compose .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-inbox-modern .messages-sidebar-announcements-badge{
  position: absolute;
  top: -.3rem;
  right: -.28rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 .22rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #97d13c;
  color: #0e110f;
  font-size: .64rem;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(17,19,17,.96);
}

.messages-inbox-modern .messages-sidebar-segmented{
  display: inline-flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  width: fit-content;
}

.messages-inbox-modern .messages-chip{
  text-decoration: none;
  color: #d0d4d1;
  font-weight: 600;
  padding: .52rem .9rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.14);
  background: rgba(255,255,255,.04);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.messages-inbox-modern .messages-chip:hover{
  background: rgba(255,255,255,.08);
}

.messages-inbox-modern .messages-chip.is-active{
  border-color: rgba(151,211,55,.24);
  background: rgba(151,211,55,.14);
  color: #aff144;
}

html[data-theme="light"] .messages-inbox-modern .messages-sidebar-segmented{
  gap: .5rem;
}

html[data-theme="light"] .messages-inbox-modern .messages-chip{
  color: #3e413e;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(159,163,160,.18);
  border-radius: 14px;
  font-size: .86rem;
  padding: .5rem .85rem;
}

html[data-theme="light"] .messages-inbox-modern .messages-chip.is-active{
  background: rgba(151,211,55,.12);
  border-color: rgba(151,211,55,.24);
  color: #385402;
}

.messages-inbox-modern .messages-sidebar-helper-link{
  margin-top: -.3rem;
}

.messages-inbox-modern .messages-search{
  margin-top: .1rem;
  display: grid;
  gap: .5rem;
  width: 100%;
  min-width: 0;
}

.messages-inbox-modern .messages-search-input-wrap{
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
}

.messages-inbox-modern .messages-search-input-wrap > .nav-icon-lucide{
  position: absolute;
  left: .75rem;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.messages-inbox-modern .messages-search input{
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  padding-left: 2.2rem;
  padding-right: 2.5rem;
  min-height: 2.8rem;
  border-radius: 14px;
}

.messages-inbox-modern .messages-search-clear{
  position: absolute;
  right: .45rem;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--soft) 60%, transparent);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.messages-inbox-modern .messages-search-clear[hidden]{
  display: none !important;
}

.messages-inbox-modern .messages-search-clear .nav-icon-lucide{
  width: 14px;
  height: 14px;
}

.messages-inbox-modern .messages-search-clear:hover{
  color: var(--text);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  background: color-mix(in srgb, var(--brand) 12%, var(--soft));
}

.messages-inbox-modern .messages-search-clear:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--brand) 58%, transparent);
  outline-offset: 2px;
  border-radius: 999px;
}

.messages-inbox-modern .messages-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding-bottom: .1rem;
}

.messages-inbox-modern .messages-tabs .pill-badge{
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  font-size: .84rem;
  padding: .48rem .76rem;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(159,163,160,.14);
  color: #9ea29f;
}

.messages-inbox-modern .messages-tabs .pill-badge .nav-icon-lucide{
  width: 14px;
  height: 14px;
}

.messages-inbox-modern .messages-tabs .pill-badge.is-active{
  background: rgba(151,211,55,.14);
  border-color: rgba(151,211,55,.24);
  color: #aff144;
}

.messages-inbox-modern .messages-list{
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  background: rgba(10,12,10,.42);
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.08);
  box-shadow: none;
  padding: .2rem;
}

.messages-inbox-modern .message-list-item{
  padding: .42rem .52rem;
  border-radius: 16px;
  box-shadow: none;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.messages-inbox-modern .message-list-link{
  gap: .6rem;
}

.messages-inbox-modern .messages-list .avatar{
  width: 32px;
  height: 32px;
  font-size: .84rem;
}

.messages-inbox-modern .message-list-item.is-active{
  background: rgba(151,211,55,.08);
  border-color: rgba(151,211,55,.28);
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.12);
}

.messages-inbox-modern .message-list-row-dm{
  background: rgba(255,255,255,.02);
}

.messages-inbox-modern .message-list-row-group{
  background: rgba(255,255,255,.015);
}

.messages-inbox-modern .message-list-item:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(159,163,160,.12);
}

.messages-inbox-modern .message-list-item:active{
  transform: translateY(1px);
}

.messages-inbox-modern .message-list-row-unread{
  border-color: rgba(151,211,55,.2);
  background: rgba(151,211,55,.06);
}

.messages-inbox-modern .avatar-wrap{
  position: relative;
  display: inline-flex;
}

.messages-inbox-modern .presence-dot{
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--card);
}

.messages-inbox-modern .message-list-title{
  align-items: baseline;
}

.messages-inbox-modern .message-list-name{
  font-weight: 700;
  color: #eaedea;
  line-height: 1.2;
}

.messages-inbox-modern .message-list-kind{
  font-size: .72rem;
  padding: .1rem .34rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}

.messages-inbox-modern .message-list-row-unread .message-list-name{
  font-weight: 800;
}

.messages-inbox-modern .message-list-row-unread .message-list-snippet{
  color: var(--text);
}

.messages-inbox-modern .message-list-actions{
  display: grid;
  justify-items: end;
  align-items: start;
  gap: .3rem;
  align-content: start;
}

.messages-inbox-modern .message-list-actions .muted.small{
  font-size: .78rem;
  line-height: 1.1;
}

.messages-inbox-modern .message-list-mobile-meta{
  display: none;
}

.messages-inbox-modern .messages-list-empty{
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .35rem;
  padding: 1rem .6rem;
}

.messages-inbox-modern .messages-list-empty .nav-icon-lucide{
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.messages-inbox-modern .messages-empty-plus-only{
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-inbox-modern .messages-empty-plus-only .nav-icon-lucide{
  width: 20px;
  height: 20px;
}

.messages-inbox-modern .messages-workspace{
  grid-area: empty;
  width: 100%;
  min-width: 0;
}

.messages-inbox-modern .messages-workspace-card{
  width: 100%;
  min-height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.94), rgba(12,15,13,.96));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.messages-inbox-modern .messages-workspace-header{
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1rem .9rem;
  border-bottom: 1px solid rgba(159,163,160,.12);
}

.messages-inbox-modern .messages-workspace-actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  flex: 0 0 auto;
}

.messages-inbox-modern .messages-workspace-back{
  display: none;
  text-decoration: none;
  color: #9ea29f;
  border: 1px solid rgba(159,163,160,.16);
  background: rgba(255,255,255,.04);
}

.messages-inbox-modern .messages-workspace-user{
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.messages-inbox-modern .messages-workspace-user[role="button"]{
  cursor: pointer;
}

.messages-inbox-modern .messages-workspace-user[role="button"]:hover .messages-workspace-copy strong,
.messages-inbox-modern .messages-workspace-user[role="button"]:focus .messages-workspace-copy strong,
.messages-inbox-modern .messages-workspace-user[role="button"]:focus-visible .messages-workspace-copy strong{
  color: #97d337;
}

.messages-inbox-modern .messages-workspace-avatar{
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #97d337, #7bac2c);
  color: #0f120f;
  font-weight: 800;
}

.messages-inbox-modern .messages-workspace-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.messages-inbox-modern .messages-workspace-copy{
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.messages-inbox-modern .messages-workspace-copy strong{
  color: #eaedea;
  font-size: 1.04rem;
}

.messages-inbox-modern .messages-workspace-actions .kebab-panel{
  top: calc(100% + .35rem);
  width: auto;
  min-width: 16.5rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: .5rem;
  border: 0;
  border-radius: 10px;
  background: #2b2b2e;
  box-shadow: 0 16px 30px rgba(0,0,0,.34);
  align-items: stretch;
}

.messages-inbox-modern .messages-shared-trigger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #f8fafc;
}

.messages-shared-panel{
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.messages-shared-viewer{
  position: fixed;
  inset: 0;
  z-index: 12010;
  pointer-events: none;
}

@media (min-width: 1024px){
  body.app[data-desktop-sidebar="1"] .messages-shared-viewer{
    left: 220px;
  }

  body.app[data-desktop-sidebar="1"].sidebar-collapsed .messages-shared-viewer{
    left: 72px;
  }
}

.messages-shared-open{
  overflow: hidden;
}

.messages-shared-viewer[aria-hidden="false"]{
  pointer-events: auto;
}

.messages-shared-panel[aria-hidden="false"]{
  pointer-events: auto;
}

.messages-shared-panel-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6,8,6,.34);
  opacity: 0;
  transition: opacity .2s ease;
}

.messages-shared-panel[aria-hidden="false"] .messages-shared-panel-backdrop{
  opacity: 1;
}

.messages-shared-viewer-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6,8,6,.7);
  opacity: 0;
  transition: opacity .2s ease;
}

.messages-shared-viewer[aria-hidden="false"] .messages-shared-viewer-backdrop{
  opacity: 1;
}

.messages-shared-panel-dialog{
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  border-left: 1px solid rgba(159,163,160,.08);
  background: #101210;
  color: #f8fafc;
  box-shadow: -16px 0 36px rgba(6,8,6,.38);
  transform: translateX(100%);
  transition: transform .24s ease;
  overflow: hidden;
}

.messages-shared-viewer-dialog{
  position: absolute;
  inset: 1.25rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(159,163,160,.12);
  border-radius: 24px;
  background: #101210;
  color: #f8fafc;
  box-shadow: 0 30px 80px rgba(6,8,6,.55);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: opacity .2s ease, transform .2s ease;
  overflow: hidden;
}

.messages-shared-viewer[aria-hidden="false"] .messages-shared-viewer-dialog{
  opacity: 1;
  transform: translateY(0) scale(1);
}

.messages-shared-panel[aria-hidden="false"] .messages-shared-panel-dialog{
  transform: translateX(0);
}

.messages-shared-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem .85rem;
  border-bottom: 1px solid rgba(159,163,160,.08);
}

.messages-shared-viewer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem .85rem;
  border-bottom: 1px solid rgba(159,163,160,.08);
}

.messages-shared-viewer-copy{
  min-width: 0;
  display: grid;
  gap: .15rem;
}

.messages-shared-viewer-copy strong{
  font-size: 1rem;
  color: #f8fafc;
}

.messages-shared-viewer-actions{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.messages-shared-viewer-link{
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(159,163,160,.16);
}

.messages-shared-viewer-body{
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6,8,6,.18);
}

.messages-shared-viewer-image,
.messages-shared-viewer-video{
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(6,8,6,.55);
}

.messages-shared-viewer-video{
  width: 100%;
}

.messages-shared-panel-identity{
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.messages-shared-panel-avatar{
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 2.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #97d337, #7bac2c);
  color: #0f120f;
  font-weight: 800;
}

.messages-shared-panel-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.messages-shared-panel-copy{
  min-width: 0;
  display: grid;
  gap: .1rem;
}

.messages-shared-panel-copy strong{
  font-size: 1.02rem;
  color: #f8fafc;
}

.messages-shared-panel-storage{
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(159,163,160,.08);
}

.messages-shared-panel-storage-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
  color: rgba(229,233,229,.78);
}

.messages-shared-panel-storage-row strong{
  color: #f8fafc;
  font-size: .92rem;
}

.messages-shared-usage-track{
  margin-top: .55rem;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(159,163,160,.22);
  overflow: hidden;
}

.messages-shared-usage-fill{
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #557e02 0%, #659306 52%, #699a05 100%);
  box-shadow: 0 0 0 1px rgba(101,147,6,.18), 0 0 16px rgba(101,147,6,.22);
}

.messages-shared-usage-fill.is-visible{
  min-width: 10px;
}

.messages-shared-panel-toolbar{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .75rem;
  padding: .85rem 1rem .7rem;
  border-bottom: 1px solid rgba(159,163,160,.08);
}

.messages-shared-tabs{
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.messages-shared-tab{
  min-height: 36px;
  padding: .5rem .2rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(229,233,229,.72);
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease, transform .16s ease;
}

.messages-shared-tab.is-active{
  background: transparent;
  color: #f8fafc;
  border-bottom-color: #97d337;
}

.messages-shared-tab:hover,
.messages-shared-tab:focus,
.messages-shared-tab:focus-visible{
  color: #fff;
  transform: translateY(-1px);
}

.messages-shared-toolbar-actions{
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 0 0 auto;
  justify-content: flex-end;
  width: 100%;
}

.messages-shared-toolbar-link,
.messages-shared-selection-delete{
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: #f87171;
  cursor: pointer;
  user-select: none;
  transition: color .16s ease, transform .16s ease;
  white-space: nowrap;
}

.messages-shared-toolbar-link{
  color: rgba(229,233,229,.82);
  min-width: 4.75rem;
  text-align: center;
}

.messages-shared-toolbar-link.is-danger{
  color: #f87171;
}

.messages-shared-toolbar-link:hover,
.messages-shared-toolbar-link:focus,
.messages-shared-toolbar-link:focus-visible,
.messages-shared-selection-delete:hover,
.messages-shared-selection-delete:focus,
.messages-shared-selection-delete:focus-visible{
  transform: translateY(-1px);
}

.messages-shared-toolbar-link.is-danger:hover,
.messages-shared-toolbar-link.is-danger:focus,
.messages-shared-toolbar-link.is-danger:focus-visible{
  color: #ef4444;
}

.messages-shared-selection{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid rgba(159,163,160,.08);
  background: rgba(159,163,160,.06);
}

.messages-shared-selection-copy{
  color: #eaedea;
  font-size: .92rem;
}

.messages-shared-selection-delete.is-disabled{
  opacity: .45;
  pointer-events: none;
}

.messages-shared-panel-body{
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  display: grid;
  align-content: start;
  gap: 1rem;
}

.messages-shared-section{
  display: grid;
  gap: .65rem;
}

.messages-shared-section-heading{
  font-size: .95rem;
  font-weight: 700;
  color: #f8fafc;
}

.messages-shared-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.messages-shared-media-card{
  position: relative;
  display: grid;
  gap: .45rem;
}

.messages-shared-item-check{
  position: absolute;
  top: .45rem;
  left: .45rem;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,8,6,.56);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.messages-shared-media-card.is-selected .messages-shared-item-check,
.messages-shared-row.is-selected .messages-shared-item-check,
.messages-shared-panel.selection-mode .messages-shared-item-check{
  opacity: 1;
}

.messages-shared-media-thumb-wrap{
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  border: 0;
  box-shadow: none;
  outline: none;
  text-decoration: none;
}

.messages-shared-media-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.messages-shared-media-meta{
  display: grid;
  gap: .08rem;
}

.messages-shared-media-meta strong{
  font-size: .86rem;
  color: #f8fafc;
}

.messages-shared-media-meta span{
  font-size: .76rem;
  color: rgba(229,233,229,.65);
}

.messages-shared-list{
  display: grid;
  gap: .7rem;
}

.messages-shared-row{
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem .9rem;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(159,163,160,.08);
}

.messages-shared-row-icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.05);
  color: #eaedea;
}

.messages-shared-row-copy{
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.messages-shared-row-copy strong{
  color: #f8fafc;
  font-size: .94rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-shared-row-copy span,
.messages-shared-row-copy small{
  color: rgba(229,233,229,.68);
}

.messages-shared-audio-player{
  width: 100%;
  margin-top: .3rem;
}

.messages-shared-row-actions{
  display: flex;
  align-items: center;
  gap: .35rem;
  align-self: start;
}

.messages-shared-row-action,
.messages-shared-item-menu > summary{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  cursor: pointer;
  list-style: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  border-radius: 10px;
  transition: transform .16s ease, color .16s ease;
}

.messages-shared-item-menu{
  position: relative;
}

.messages-shared-item-menu > summary::-webkit-details-marker{
  display: none;
}

.messages-shared-row-action:hover,
.messages-shared-row-action:focus,
.messages-shared-row-action:focus-visible,
.messages-shared-item-menu > summary:hover,
.messages-shared-item-menu > summary:focus,
.messages-shared-item-menu > summary:focus-visible{
  transform: translateY(-1px);
}

.messages-shared-item-menu-panel{
  position: absolute;
  top: calc(100% + .3rem);
  right: 0;
  min-width: 9.5rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: #2b2b2e;
  box-shadow: 0 16px 30px rgba(0,0,0,.34);
  z-index: 5;
}

.messages-shared-item-delete{
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  color: #f87171;
  cursor: pointer;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  transform: translate3d(0, 0, 0);
  transition: transform .14s ease, opacity .14s ease, color .14s ease;
}

.messages-shared-item-delete:hover,
.messages-shared-item-delete:focus,
.messages-shared-item-delete:focus-visible{
  transform: translate3d(0, -1px, 0);
}

.messages-shared-item-delete:active{
  transform: translate3d(0, 1px, 0);
}

.messages-shared-empty{
  min-height: 240px;
  border-radius: 16px;
  border: 1px dashed rgba(159,163,160,.18);
  display: grid;
  place-items: center;
  gap: .45rem;
  text-align: center;
  color: rgba(229,233,229,.72);
}

html:not([data-theme="dark"]) .messages-inbox-modern .messages-shared-trigger{
  color: #161916;
}

html:not([data-theme="dark"]) .messages-shared-panel-backdrop{
  background: rgba(22,25,22,.18);
}

html:not([data-theme="dark"]) .messages-shared-panel-dialog{
  background: linear-gradient(180deg, rgba(243,246,243,.98), rgba(235,239,236,.96));
  background-color: rgba(243,246,243,.98);
  color: #161916;
  border-left-color: rgba(159,163,160,.22);
}

html:not([data-theme="dark"]) .messages-shared-panel-copy strong,
html:not([data-theme="dark"]) .messages-shared-section-heading,
html:not([data-theme="dark"]) .messages-shared-media-meta strong,
html:not([data-theme="dark"]) .messages-shared-row-copy strong{
  color: #161916;
}

html:not([data-theme="dark"]) .messages-shared-panel-storage-row,
html:not([data-theme="dark"]) .messages-shared-panel-storage-row strong,
html:not([data-theme="dark"]) .messages-shared-selection-copy,
html:not([data-theme="dark"]) .messages-shared-row-action,
html:not([data-theme="dark"]) .messages-shared-item-menu > summary{
  color: #161916;
}

html:not([data-theme="dark"]) .messages-shared-tab{
  color: rgba(22,25,22,.68);
}

html:not([data-theme="dark"]) .messages-shared-tab.is-active{
  color: #161916;
  border-bottom-color: #80b22e;
}

html:not([data-theme="dark"]) .messages-shared-toolbar-link{
  color: #525552;
}

html:not([data-theme="dark"]) .messages-shared-toolbar-link.is-danger{
  color: #dc2626;
}

html:not([data-theme="dark"]) .messages-shared-row{
  background: rgba(255,255,255,.62);
  border-color: rgba(159,163,160,.18);
}

html:not([data-theme="dark"]) .messages-shared-row-icon,
html:not([data-theme="dark"]) .messages-shared-media-thumb-wrap{
  background: rgba(22,25,22,.05);
}

html:not([data-theme="dark"]) .messages-shared-item-menu-panel{
  background: linear-gradient(180deg, rgba(243,246,243,.98), rgba(235,239,236,.96));
  background-color: rgba(243,246,243,.98);
  border-color: rgba(141,195,55,.24);
}

html:not([data-theme="dark"]) .messages-shared-usage-track{
  background: rgba(159,163,160,.2);
}

html:not([data-theme="dark"]) .messages-shared-usage-fill{
  background: linear-gradient(90deg, #7bac2c 0%, #8dc337 52%, #97d337 100%);
  box-shadow: 0 0 0 1px rgba(123,172,44,.14), 0 0 14px rgba(141,195,55,.16);
}

html:not([data-theme="dark"]) .messages-shared-empty{
  color: #707471;
}

@media (max-width: 820px){
  .messages-shared-viewer{
    inset: var(--appbar-height, 0px) 0 var(--mobile-nav-height, 0px) 0;
  }

  .messages-shared-viewer-dialog{
    inset: .45rem .45rem calc(.45rem + env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
    max-height: none;
  }

  .messages-shared-viewer-body{
    padding: .75rem;
  }

  .messages-shared-viewer-image,
  .messages-shared-viewer-video{
    max-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px) - env(safe-area-inset-bottom, 0px) - 7rem);
  }

  .messages-shared-panel{
    inset: var(--appbar-height, 0px) 0 var(--mobile-nav-height, 0px) 0;
  }

  .messages-shared-panel-backdrop{
    inset: 0 0 calc(env(safe-area-inset-bottom, 0px) * .35) 0;
  }

  .messages-shared-panel-dialog{
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: 100%;
    border-left: 0;
    box-shadow: none;
    transform: translateY(100%);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    padding-top: .2rem;
    padding-bottom: calc(.35rem + env(safe-area-inset-bottom, 0px));
  }

  .messages-shared-panel[aria-hidden="false"] .messages-shared-panel-dialog{
    transform: translateY(0);
  }

  .messages-shared-panel-head,
  .messages-shared-panel-storage,
  .messages-shared-panel-toolbar,
  .messages-shared-selection,
  .messages-shared-panel-body{
    padding-left: .85rem;
    padding-right: .85rem;
  }

  .messages-shared-panel-toolbar{
    flex-direction: column;
    align-items: stretch;
  }

  .messages-shared-panel-body{
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .messages-shared-tabs{
    width: 100%;
    justify-content: flex-start;
    gap: .35rem;
    overflow-x: auto;
    padding-bottom: .1rem;
  }

  .messages-shared-tab{
    flex: 1 0 auto;
    min-width: fit-content;
    padding-left: .45rem;
    padding-right: .45rem;
  }

  .messages-shared-toolbar-actions{
    justify-content: flex-end;
    width: 100%;
    gap: .65rem;
  }

  .messages-shared-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .messages-shared-row{
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: .65rem;
  }

  .messages-shared-row-copy{
    grid-column: 3;
  }

  .messages-shared-row-actions{
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-left: calc(24px + 40px + .65rem);
  }

  .messages-shared-item-menu-panel{
    right: 0;
    left: auto;
    max-width: calc(100vw - 2rem);
  }
}

.conversation-menu-section{
  display: flex;
  flex-direction: column;
  gap: .2rem;
  width: 100%;
}

.conversation-action-item{
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  align-items: center;
  justify-content: flex-start;
  gap: .75rem;
  width: 100%;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 2.5rem;
  padding: .3rem .3rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: #f8fafc;
  cursor: pointer;
  user-select: none;
  text-align: left;
  transform: translateY(0) scale(1);
  transition: color .16s ease, transform .16s ease;
}

.conversation-action-icon{
  width: 1.3rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.conversation-action-item .nav-icon-lucide{
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  color: currentColor !important;
  stroke: currentColor !important;
  transform: translateY(0) scale(1);
  transition: transform .18s ease, color .16s ease;
}

.conversation-action-label{
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 1.25rem;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  opacity: 1;
  color: currentColor;
  line-height: 1.2;
  transform: translateX(0) translateY(0) scale(1);
  transform-origin: left center;
  transition: transform .18s ease, color .16s ease;
}

.conversation-action-item:hover,
.conversation-action-item:focus,
.conversation-action-item:focus-visible{
  background: transparent;
  box-shadow: none;
  outline: none;
  color: #ffffff;
  transform: translateY(-1px) scale(1.02);
}

.conversation-action-item:hover .nav-icon-lucide,
.conversation-action-item:focus .nav-icon-lucide,
.conversation-action-item:focus-visible .nav-icon-lucide,
.conversation-action-item:hover .conversation-action-label,
.conversation-action-item:focus .conversation-action-label,
.conversation-action-item:focus-visible .conversation-action-label{
  transform: translateY(-1px) scale(1.03);
}

.conversation-action-item:active{
  transform: translateY(1px) scale(.98);
}

.conversation-action-item.is-danger{
  color: #f87171;
}

.conversation-action-item.is-danger:hover,
.conversation-action-item.is-danger:focus,
.conversation-action-item.is-danger:focus-visible{
  color: #fca5a5;
}

html:not([data-theme="dark"]) .conversation-action-item{
  color: #161916;
}

html:not([data-theme="dark"]) .conversation-action-item:hover,
html:not([data-theme="dark"]) .conversation-action-item:focus,
html:not([data-theme="dark"]) .conversation-action-item:focus-visible{
  color: #567f00;
}

html:not([data-theme="dark"]) .conversation-action-item.is-danger{
  color: #dc2626;
}

html:not([data-theme="dark"]) .conversation-action-item.is-danger:hover,
html:not([data-theme="dark"]) .conversation-action-item.is-danger:focus,
html:not([data-theme="dark"]) .conversation-action-item.is-danger:focus-visible{
  color: #ef4444;
}

.messages-inbox-modern .messages-workspace-thread{
  min-height: 420px;
  height: 100%;
  align-content: start;
  padding: 1rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.messages-inbox-modern .messages-workspace .message-bubble{
  border-radius: 14px;
  padding: .78rem .92rem .68rem;
  background: #262926;
  border: 1px solid rgba(79,117,1,.42);
  box-shadow: none;
}

.messages-inbox-modern .messages-workspace .message-row.self .message-bubble{
  background: #262926;
  color: #f8fafc;
}

.messages-inbox-modern .messages-workspace .message-row.self .message-meta,
.messages-inbox-modern .messages-workspace .message-row.self .message-status{
  color: rgba(229,233,229,.72);
}

.messages-thread-unavailable{
  min-height: min(52vh, 420px);
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: .8rem;
  text-align: center;
  padding: 2rem 1.4rem;
  color: #e3e7e4;
}

.messages-thread-unavailable-icon{
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(151,211,55,.1);
  border: 1px solid rgba(151,211,55,.18);
  color: #aaeb42;
}

.messages-thread-unavailable-icon .nav-icon-lucide{
  width: 1.5rem;
  height: 1.5rem;
}

.messages-thread-unavailable strong{
  font-size: 1.18rem;
  color: #f8fafc;
}

.messages-thread-unavailable p{
  margin: 0;
  max-width: 28rem;
  color: rgba(229,233,229,.78);
}

.messages-inbox-modern .messages-workspace-composer{
  margin: 0;
  padding: .7rem .85rem .8rem;
  background: #060607;
  border-top: 1px solid rgba(159,163,160,.12);
}

.messages-inbox-modern .messages-workspace-composer .composer-field{
  gap: .55rem;
}

.messages-inbox-modern .composer-attach{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex: 0 0 36px;
}

.messages-inbox-modern .messages-workspace-composer textarea{
  min-height: 40px;
  padding: .78rem .9rem;
  background: rgba(255,255,255,.05);
  border-color: rgba(159,163,160,.14);
  color: #eaedea;
}

.messages-inbox-modern .messages-loading{
  margin-top: .5rem;
  display: none;
}

.messages-inbox-modern .messages-loading.htmx-request{
  display: grid;
}

.messages-inbox-modern .skeleton{
  background: linear-gradient(90deg, rgba(159,163,160,.18), rgba(159,163,160,.33), rgba(159,163,160,.18));
  background-size: 280% 100%;
  animation: messages-skeleton-wave 1.2s linear infinite;
}

.messages-inbox-modern .skeleton-row{
  pointer-events: none;
}

.messages-inbox-modern .skeleton-line{
  height: .66rem;
  border-radius: 999px;
}

.messages-inbox-modern .skeleton-line.w55{ width: 55%; }
.messages-inbox-modern .skeleton-line.w60{ width: 60%; }
.messages-inbox-modern .skeleton-line.w70{ width: 70%; }
.messages-inbox-modern .skeleton-line.w75{ width: 75%; }
.messages-inbox-modern .skeleton-line.w85{ width: 85%; }
.messages-inbox-modern .skeleton-line.w90{ width: 90%; }

.messages-inbox-modern .messages-fab-newchat{
  position: fixed;
  right: 1rem;
  bottom: calc(var(--mobile-nav-height, 0px) + 1rem);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(86,127,0,.32);
}

.messages-inbox-modern .messages-fab-newchat.is-hidden-by-search{
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.messages-inbox-modern .messages-fab-newchat .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.messages-inbox-modern .messages-fab-newchat-label{
  display: inline;
}

.messages-primary-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(86,127,0,.32);
  text-decoration: none;
}

.messages-primary-cta .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.messages-inbox-modern .messages-empty{
  display: none;
  width: 100%;
}

.messages-inbox-modern .messages-empty-card{
  width: 100%;
  max-width: none;
  border-radius: 18px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.92), rgba(12,15,13,.94));
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: .55rem;
  padding: 2rem 1.5rem;
}

.messages-inbox-modern .messages-empty-visual{
  width: 4rem;
  height: 4rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.18);
  background: rgba(151,211,55,.08);
}

.messages-inbox-modern .messages-empty-visual .nav-icon-lucide{
  width: 1.5rem;
  height: 1.5rem;
  color: #97d337;
}

.messages-inbox-modern .messages-empty-actions .pill-link{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.messages-inbox-modern .messages-empty-actions .pill-link .nav-icon-lucide{
  width: 17px;
  height: 17px;
  color: var(--brand) !important;
  margin-right: .05rem;
  flex: 0 0 auto;
}

@keyframes messages-skeleton-wave{
  from{ background-position: 100% 0; }
  to{ background-position: 0 0; }
}

@media (min-width: 821px){
  .messages-inbox-modern{
    --messages-rail-width: minmax(320px, 26%);
  }

  .messages-inbox-modern .messages-shortcuts{
    grid-template-columns: var(--messages-rail-width) 1fr 1fr 1fr;
  }

  .messages-inbox-modern.messages-app{
    height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px));
    min-height: calc(100dvh - var(--appbar-height, 0px) - var(--footer-height, 0px));
    overflow: hidden;
  }

  .messages-inbox-modern .messages-inbox-topcards{
    gap: 0;
    padding: 0;
  }

  .messages-inbox-modern .messages-panel{
    display: grid;
    grid-template-columns: var(--messages-rail-width) minmax(0, 1fr);
    grid-template-areas: "main empty";
    align-items: stretch;
    column-gap: 0;
    row-gap: 0;
    padding: 0 0 .82rem;
    min-height: 0;
    height: 100%;
  }

  .messages-inbox-modern .messages-sidebar,
  .messages-inbox-modern .messages-empty,
  .messages-inbox-modern .messages-workspace,
  .messages-inbox-modern .messages-workspace-card{
    min-height: 0;
  }

  .messages-inbox-modern .messages-sidebar{ grid-area: main; }
  .messages-inbox-modern .messages-empty{ grid-area: empty; }
  .messages-inbox-modern .messages-workspace{
    display: grid;
    align-self: stretch;
  }
  .messages-inbox-modern .messages-sidebar{
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1rem;
    align-self: stretch;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(159,163,160,.14);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .messages-inbox-modern #messages-chats-panel,
  .messages-inbox-modern #messages-documents-panel{
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .messages-inbox-modern #chat-list,
  .messages-inbox-modern #messages-documents-list{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .messages-inbox-modern .messages-empty-card{
    overflow: auto;
  }

  .messages-inbox-modern .messages-sidebar-segmented{
    flex-wrap: nowrap;
    width: 100%;
  }
  .messages-inbox-modern .messages-chip{
    padding: .5rem .82rem;
  }
  .messages-inbox-modern .messages-fab-newchat{
    display: none;
  }
  .messages-inbox-modern .messages-empty{
    display: grid;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
    place-items: stretch;
    justify-items: stretch;
    align-self: stretch;
  }
  .messages-inbox-modern .messages-empty-card{
    width: 100%;
    min-height: 100%;
    height: 100%;
    box-shadow: none;
  }
  .messages-inbox-modern .messages-workspace-card{
    height: 100%;
  }
}

body.messages-shared-open .site-footer{
  visibility: hidden !important;
  pointer-events: none !important;
}

.messages-inbox-modern .messages-tabs .pill-badge-ghost{
  background: color-mix(in srgb, var(--soft) 88%, transparent) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  box-shadow: none !important;
}

html[data-theme="dark"] .messages-inbox-modern .messages-sidebar,
html[data-theme="dark"] .messages-inbox-modern .messages-announcements,
html[data-theme="dark"] .messages-inbox-modern .messages-bookings-panel{
  background: linear-gradient(180deg, rgba(17,19,17,.94), rgba(12,15,13,.96));
}

html[data-theme="dark"] .messages-inbox-modern .messages-announcements.messages-inbox-banner{
  border-color: rgba(86,127,0,.14);
}

html[data-theme="dark"] .messages-inbox-modern .messages-workspace-card{
  background: linear-gradient(180deg, rgba(17,19,17,.94), rgba(12,15,13,.96));
}

html[data-theme="dark"] .messages-inbox-modern.messages-app{
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .messages-inbox-modern .messages-panel{
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .messages-inbox-modern .messages-list{
  background: rgba(10,12,10,.42);
}

html[data-theme="dark"] .messages-inbox-modern .message-list-item{
  background: transparent;
}

html[data-theme="dark"] .messages-inbox-modern .message-list-row-dm{
  background: rgba(255,255,255,.02);
}

html[data-theme="dark"] .messages-inbox-modern .message-list-row-group{
  background: rgba(255,255,255,.015);
}

html[data-theme="light"] .messages-inbox-modern .messages-announcements,
html[data-theme="light"] .messages-inbox-modern .messages-sidebar,
html[data-theme="light"] .messages-inbox-modern .messages-empty-card,
html[data-theme="light"] .messages-inbox-modern .messages-bookings-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.12);
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-card{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.12);
  box-shadow: 0 16px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-inbox-modern .messages-announcements-label,
html[data-theme="light"] .messages-inbox-modern .messages-sidebar-header h2,
html[data-theme="light"] .messages-inbox-modern .message-list-name,
html[data-theme="light"] .messages-inbox-modern .messages-bookings-label{
  color: #161916;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-copy strong{
  color: #161916;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-back{
  color: #525552;
  border-color: rgba(159,163,160,.18);
  background: rgba(255,255,255,.92);
}

html[data-theme="light"] .message-menu-trigger{
  color: #161917;
}

html[data-theme="light"] .message-menu-trigger .nav-icon-lucide,
html[data-theme="light"] .messages-appbar .kebab-menu summary.message-menu-trigger .nav-icon-lucide,
html[data-theme="light"] .messages-inbox-modern .messages-workspace-actions .kebab-menu summary.message-menu-trigger .nav-icon-lucide{
  color: #000 !important;
  stroke: #000 !important;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-thread{
  background: #f8fafc;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace .message-bubble{
  background: #f3f6f3;
  border: 1px solid rgba(155,215,60,.7);
  color: #161916;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace .message-row.self .message-bubble{
  background: #f3f6f3;
  color: #161916;
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-composer{
  background: #f8fafc;
  border-top-color: rgba(159,163,160,.16);
}

html[data-theme="light"] .messages-inbox-modern .messages-workspace-composer textarea{
  background: rgba(255,255,255,.98);
  border-color: rgba(159,163,160,.22);
  color: #161916;
}

html[data-theme="light"] .messages-bookings-icon{
  border-color: rgba(151,211,55,.22);
  background: rgba(151,211,55,.1);
}

html[data-theme="light"] .messages-bookings-toggle{
  color: #707471;
}

html[data-theme="light"] .messages-inbox-modern .messages-announcements-icon{
  background: rgba(151,211,55,.08);
  border-color: rgba(151,211,55,.18);
}

html[data-theme="light"] .messages-inbox-modern .messages-announcements-toggle,
html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge,
html[data-theme="light"] .messages-inbox-modern .message-list-actions .muted,
html[data-theme="light"] .messages-inbox-modern .message-list-snippet,
html[data-theme="light"] .messages-inbox-modern .message-list-kind{
  color: #707471;
}

html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge{
  background: rgba(255,255,255,.92);
  border-color: rgba(159,163,160,.18);
}

html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge.is-active{
  background: rgba(151,211,55,.12);
  border-color: rgba(151,211,55,.24);
  color: #385402;
}

html[data-theme="light"] .messages-inbox-modern .messages-list{
  background: rgba(248,250,252,.78);
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-inbox-modern .message-list-row-dm,
html[data-theme="light"] .messages-inbox-modern .message-list-row-group{
  background: rgba(255,255,255,.72);
}

html[data-theme="light"] .messages-inbox-modern .message-list-row-unread{
  background: rgba(151,211,55,.08);
  border-color: rgba(151,211,55,.22);
}

html[data-theme="light"] .messages-inbox-modern .message-list-item:hover{
  background: rgba(255,255,255,.92);
}

/* Messages inbox refinement: reference-style shortcuts + chat rail */
.messages-inbox-modern .messages-shortcuts-shell{
  width: 100%;
}

.messages-inbox-modern .messages-shortcuts-summary{
  display: none;
}

.messages-inbox-modern .messages-shortcuts{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  width: 100%;
  border: 1px solid rgba(86,127,0,.12);
  border-radius: 0;
  overflow: visible;
  background: linear-gradient(180deg, rgba(17,19,17,.97), rgba(10,13,10,.99));
  box-shadow: 0 18px 34px rgba(6,8,6,.16);
}

.messages-inbox-modern .messages-shortcuts > *{
  min-width: 0;
  position: relative;
}

.messages-inbox-modern .messages-shortcuts > *:not(:last-child){
  border-right: 1px solid rgba(159,163,160,.12);
}

.messages-inbox-modern .messages-shortcut-card{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  text-align: left;
  padding: .95rem 1rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #eaedea;
  box-shadow: none;
  transition: background-color .16s ease, color .16s ease;
}

.messages-inbox-modern .messages-shortcut-detail{
  position: relative;
}

.messages-inbox-modern .messages-shortcut-detail > summary{
  list-style: none;
  cursor: pointer;
}

.messages-inbox-modern .messages-shortcut-detail > summary::-webkit-details-marker{
  display: none;
}

.messages-inbox-modern .messages-shortcut-card:hover{
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background: rgba(255,255,255,.03);
}

.messages-inbox-modern .messages-shortcut-detail[open] > .messages-shortcut-card{
  border-color: transparent;
  box-shadow: none;
  background: rgba(151,211,55,.05);
}

.messages-inbox-modern .messages-shortcut-card.is-disabled{
  opacity: .7;
}

.messages-inbox-modern .messages-shortcut-button{
  cursor: pointer;
}

.messages-inbox-modern .messages-shortcut-icon{
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 14px;
  flex: 0 0 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151,211,55,.14);
  background: linear-gradient(135deg, rgba(123,172,44,.22), rgba(131,182,50,.1));
  color: #97d337;
}

.messages-inbox-modern .messages-shortcut-icon.bookings{
  border-color: rgba(129,180,48,.16);
  background: linear-gradient(135deg, rgba(74,109,3,.22), rgba(50,76,0,.12));
  color: #81b430;
}

.messages-inbox-modern .messages-shortcut-icon.locker{
  border-color: rgba(148,206,56,.16);
  background: linear-gradient(135deg, rgba(103,143,38,.2), rgba(82,115,31,.1));
  color: #a7e73e;
}

.messages-inbox-modern .messages-shortcut-icon.broadcasts{
  border-color: rgba(131,181,50,.16);
  background: linear-gradient(135deg, rgba(86,127,0,.18), rgba(59,89,2,.1));
  color: #9bd73c;
}

.messages-inbox-modern .messages-shortcut-icon .nav-icon-lucide{
  width: 18px;
  height: 18px;
}

.messages-inbox-modern .messages-shortcut-copy{
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.messages-inbox-modern .messages-shortcut-copy strong{
  font-size: 1rem;
  line-height: 1.2;
  color: inherit;
}

.messages-inbox-modern .messages-shortcut-copy span{
  color: #8d908d;
  font-size: .92rem;
  line-height: 1.25;
}

.messages-inbox-modern .messages-shortcut-badge{
  margin-left: auto;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 .45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(151,211,55,.14);
  border: 1px solid rgba(151,211,55,.16);
  color: #aff144;
  font-size: .76rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.messages-inbox-modern .messages-shortcut-toggle{
  width: 1.5rem;
  height: 1.5rem;
  margin-left: .2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ea29f;
  flex: 0 0 auto;
  transition: transform .16s ease;
}

.messages-inbox-modern .messages-shortcut-toggle .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-inbox-modern .messages-shortcut-detail[open] .messages-shortcut-toggle{
  transform: rotate(180deg);
}

.messages-inbox-modern .messages-shortcut-menu{
  position: absolute;
  top: calc(100% + .45rem);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: .45rem;
  padding: .55rem;
  border-radius: 18px;
  border: 1px solid rgba(86,127,0,.14);
  background: linear-gradient(180deg, rgba(17,19,17,.98), rgba(12,15,13,.99));
  box-shadow: 0 24px 48px rgba(6,8,6,.28);
}

.messages-inbox-modern .messages-shortcut-menu-item{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22,37,0,.72), rgba(18,21,19,.82));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 10px 24px rgba(6,8,6,.12);
  color: #eaedea;
  padding: .8rem .9rem;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.messages-inbox-modern .messages-shortcut-menu-item:hover{
  background: linear-gradient(180deg, rgba(30,47,1,.82), rgba(26,29,27,.9));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 16px 30px rgba(6,8,6,.18);
  transform: translateY(-1px);
}

html[data-theme="dark"] .messages-inbox-modern .messages-shortcut-menu-item{
  border: 0 !important;
  background: linear-gradient(180deg, rgba(16,28,0,.9), rgba(16,18,16,.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 0 1px rgba(104,153,1,.22),
    0 10px 24px rgba(6,8,6,.16) !important;
}

html[data-theme="dark"] .messages-inbox-modern .messages-shortcut-menu-item:hover,
html[data-theme="dark"] .messages-inbox-modern .messages-shortcut-menu-item:focus,
html[data-theme="dark"] .messages-inbox-modern .messages-shortcut-menu-item:focus-visible{
  border: 0 !important;
  background: linear-gradient(180deg, rgba(22,36,1,.96), rgba(15,27,0,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 0 0 1px rgba(141,195,55,.28),
    0 16px 30px rgba(6,8,6,.2) !important;
}

html[data-theme="dark"] .messages-inbox-modern .messages-shortcut-detail .messages-shortcut-menu-copy strong{
  color: #f8fbff !important;
}

.messages-inbox-modern .messages-shortcut-menu-copy{
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.messages-inbox-modern .messages-shortcut-menu-copy strong{
  color: inherit;
  line-height: 1.2;
}

.messages-inbox-modern .messages-shortcut-menu-copy span{
  color: #8d908d;
  font-size: .84rem;
}

.messages-inbox-modern .messages-shortcut-menu-item .nav-icon-lucide{
  width: 16px;
  height: 16px;
  color: #aff144;
  flex: 0 0 auto;
}

.messages-inbox-modern .messages-locker-menu{
  gap: .65rem;
}

.messages-inbox-modern .messages-locker-search{
  position: relative;
  display: block;
}

.messages-inbox-modern .messages-locker-search .nav-icon-lucide{
  position: absolute;
  left: .95rem;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #8d908d;
}

.messages-inbox-modern .messages-locker-search input{
  width: 100%;
  min-height: 2.85rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.045);
  color: #eaedea;
  padding: .72rem .9rem .72rem 2.55rem;
}

.messages-inbox-modern .messages-locker-search input::placeholder{
  color: #828683;
}

.messages-inbox-modern .messages-locker-results{
  display: grid;
  gap: .5rem;
  max-height: min(360px, 48vh);
  overflow-y: auto;
  padding-right: .12rem;
}

.messages-inbox-modern .messages-locker-item{
  display: grid;
  gap: .68rem;
  padding: .82rem .88rem;
  border-radius: 14px;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(255,255,255,.04);
}

.messages-inbox-modern .messages-locker-item-main{
  display: flex;
  align-items: flex-start;
  gap: .72rem;
  min-width: 0;
}

.messages-inbox-modern .messages-locker-item-icon{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  flex: 0 0 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148,206,56,.12);
  border: 1px solid rgba(148,206,56,.12);
  color: #a7e73e;
}

.messages-inbox-modern .messages-locker-item-icon .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-inbox-modern .messages-locker-item-copy{
  min-width: 0;
  display: grid;
  gap: .14rem;
}

.messages-inbox-modern .messages-locker-item-copy strong{
  color: #eaedea;
  line-height: 1.25;
}

.messages-inbox-modern .messages-locker-item-copy span{
  color: #8d908d;
  font-size: .84rem;
  line-height: 1.35;
}

.messages-inbox-modern .messages-locker-item-actions{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.messages-inbox-modern .messages-locker-item-link{
  min-height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .82rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: rgba(151,211,55,.14);
  color: #aff144;
}

.messages-inbox-modern .messages-locker-item-link.is-secondary{
  background: rgba(255,255,255,.06);
  color: #dfe3e0;
}

.messages-inbox-modern .messages-locker-item-link:hover{
  background: rgba(151,211,55,.2);
}

.messages-inbox-modern .messages-locker-item-link.is-secondary:hover{
  background: rgba(255,255,255,.1);
}

.messages-inbox-modern .messages-locker-empty{
  padding: .35rem .1rem;
}

.messages-inbox-modern .messages-sidebar{
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17,19,17,.97), rgba(10,13,10,.99));
  padding: 1.05rem 0 0;
}

.messages-inbox-modern .messages-sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 0 1rem;
}

.messages-inbox-modern .messages-sidebar-header h2{
  font-size: 1.9rem;
  line-height: 1.05;
}

.messages-inbox-modern .messages-search{
  margin-top: .9rem;
  gap: 0;
  padding: 0 1rem;
}

.messages-inbox-modern .messages-search > .muted{
  display: none;
}

.messages-inbox-modern .messages-search input{
  min-height: 3rem;
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  border-color: rgba(159,163,160,.1);
  color: #eaedea;
}

.messages-inbox-modern .messages-search input::placeholder{
  color: #828683;
}

.messages-inbox-modern .messages-tabs{
  padding: .88rem 1rem .8rem;
  margin-top: .8rem;
  border-bottom: 1px solid rgba(159,163,160,.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.messages-inbox-modern .messages-tabs .pill-badge,
.messages-inbox-modern .messages-tabs a.pill-badge{
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  color: #8d908d;
  padding: .42rem .72rem;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.messages-inbox-modern .messages-tabs .pill-badge:hover,
.messages-inbox-modern .messages-tabs .pill-badge:focus,
.messages-inbox-modern .messages-tabs a.pill-badge:hover,
.messages-inbox-modern .messages-tabs a.pill-badge:focus{
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  color: #acafac;
}

.messages-inbox-modern .messages-tabs .pill-badge.is-active,
.messages-inbox-modern .messages-tabs a.pill-badge.is-active{
  background: rgba(151,211,55,.14);
  border: 0 !important;
  color: #aff144;
}

.messages-inbox-modern #messages-chats-panel{
  gap: 0;
}

.messages-inbox-modern .messages-list{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: .35rem .55rem .65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.messages-inbox-modern .message-list-item{
  padding: .56rem .58rem;
  border-radius: 10px;
  border: 0 !important;
  box-shadow: none !important;
}

.messages-inbox-modern .message-list-link{
  gap: .78rem;
}

.messages-inbox-modern .messages-list .avatar{
  box-sizing: border-box;
  flex: 0 0 3rem;
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  font-size: .9rem;
  background: linear-gradient(135deg, #93cb3a, #567f00);
  color: #0e110f;
}
.messages-inbox-modern .messages-list .avatar img{display:block;width:100%;height:100%;min-width:100%;min-height:100%;border-radius:50%;object-fit:cover}

.messages-inbox-modern .message-list-title{
  gap: .5rem;
}

.messages-inbox-modern .message-list-name{
  font-size: .98rem;
}

.messages-inbox-modern .message-list-snippet{
  font-size: .94rem;
  color: #8d908d;
}

.messages-inbox-modern .message-list-kind{
  font-size: .7rem;
  padding: .12rem .36rem;
  background: rgba(255,255,255,.05);
}

.messages-inbox-modern .message-list-actions{
  align-items: end;
}

.messages-inbox-modern .message-list-actions .muted.small{
  font-size: .84rem;
}

.messages-inbox-modern .message-list-row-dm,
.messages-inbox-modern .message-list-row-group{
  background: transparent;
}

.messages-inbox-modern .message-list-item,
.messages-inbox-modern .message-list-row-unread{
  background: transparent !important;
}

.messages-inbox-modern .message-list-item.is-active{
  background: rgba(123,172,44,.075);
  border-radius: 10px;
}

.messages-inbox-modern .message-list-row-unread{
  background: transparent;
}

.messages-inbox-modern .message-list-item:hover{
  background: rgba(255,255,255,.03);
}

.messages-inbox-modern .messages-empty-card,
.messages-inbox-modern .messages-workspace-card{
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17,19,17,.97), rgba(10,13,10,.99));
}

.messages-announcements-overlay{
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.messages-announcements-overlay[aria-hidden="false"]{
  display: flex;
}

.messages-announcements-overlay-backdrop{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,8,6,.18), rgba(6,8,6,.4));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.messages-announcements-overlay-card{
  position: relative;
  width: min(100%, 560px);
  max-height: min(calc(100dvh - 2rem), 720px);
  border-radius: 26px;
  border: 1px solid rgba(59,89,2,.18);
  background: linear-gradient(180deg, rgba(20,23,21,.99), rgba(11,14,12,.998));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 32px 70px rgba(6,8,6,.36);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .9rem;
  padding: 1rem;
  overflow: hidden;
}

.messages-announcements-overlay-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
}

.messages-announcements-overlay-copy{
  display: grid;
  gap: .14rem;
}

.messages-announcements-overlay-kicker{
  color: #aff144;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.messages-announcements-overlay-copy strong{
  color: #eaedea;
  font-size: 1.12rem;
}

.messages-announcements-overlay-close{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  border: 0;
  background: rgba(255,255,255,.05);
  color: #9ea29f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.messages-announcements-overlay-close:hover{
  background: rgba(151,211,55,.1);
  color: #aff144;
}

.messages-announcements-overlay-close .nav-icon-lucide{
  width: 16px;
  height: 16px;
}

.messages-announcements-overlay-body{
  display: grid;
  gap: .7rem;
  overflow-y: auto;
  padding-right: .12rem;
}

.messages-announcement-card{
  display: grid;
  gap: .45rem;
  padding: .92rem .95rem;
  border-radius: 18px;
  border: 1px solid rgba(59,89,2,.14);
  background: rgba(255,255,255,.04);
}

.messages-announcement-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
}

.messages-announcement-card-head strong{
  color: #eaedea;
  line-height: 1.25;
}

.messages-announcement-card-head span{
  color: #8d908d;
  font-size: .84rem;
  white-space: nowrap;
}

.messages-announcement-card-body{
  color: #acb0ad;
  white-space: pre-wrap;
  line-height: 1.45;
}

.messages-announcements-overlay-empty{
  padding: .35rem .1rem;
}

.messages-inbox-modern .messages-empty-card{
  gap: .7rem;
}

.messages-inbox-modern .messages-empty-visual{
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(123,172,44,.24), rgba(123,172,44,.08));
  border-color: rgba(151,211,55,.08);
}

.messages-inbox-modern .messages-empty-visual .nav-icon-lucide{
  width: 2rem;
  height: 2rem;
}

.messages-inbox-modern .messages-empty-card strong{
  font-size: 1.2rem;
  color: #eaedea;
}

.messages-inbox-modern .messages-empty-card p{
  max-width: 24rem;
  margin: 0;
  font-size: 1rem;
  color: #8d908d;
}

.messages-inbox-modern .messages-primary-cta{
  border-radius: 999px !important;
  min-height: 2.7rem;
  min-width: 10.4rem;
  padding: .72rem 1.6rem;
  gap: .48rem;
  border: 1px solid rgba(159,163,160,.22) !important;
  justify-content: center;
  background: linear-gradient(180deg, rgba(50,53,50,.98), rgba(29,32,29,.98)) !important;
  color: #f8fafc !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 24px rgba(6,8,6,.18) !important;
}

.messages-inbox-modern .messages-primary-cta:hover{
  border-color: rgba(229,233,229,.24) !important;
  background: linear-gradient(180deg, rgba(64,67,65,.99), rgba(37,40,37,.99)) !important;
  color: #ffffff !important;
}

.messages-inbox-modern .messages-primary-cta .nav-icon-lucide{
  width: 15px;
  height: 15px;
  color: currentColor !important;
}

.messages-inbox-modern .messages-fab-newchat{
  border: 1px solid rgba(159,163,160,.22) !important;
  background: linear-gradient(180deg, rgba(50,53,50,.98), rgba(29,32,29,.98)) !important;
  color: #f8fafc !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 24px rgba(6,8,6,.18) !important;
}

.messages-inbox-modern .messages-fab-newchat:hover{
  border-color: rgba(229,233,229,.24) !important;
  background: linear-gradient(180deg, rgba(64,67,65,.99), rgba(37,40,37,.99)) !important;
  color: #ffffff !important;
}

.messages-inbox-modern .messages-fab-newchat .nav-icon-lucide{
  color: currentColor !important;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-card,
html[data-theme="light"] .messages-inbox-modern .messages-sidebar,
html[data-theme="light"] .messages-inbox-modern .messages-empty-card,
html[data-theme="light"] .messages-inbox-modern .messages-workspace-card{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.12);
  box-shadow: 0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-copy strong,
html[data-theme="light"] .messages-inbox-modern .messages-sidebar-header h2,
html[data-theme="light"] .messages-inbox-modern .messages-empty-card strong,
html[data-theme="light"] .messages-inbox-modern .message-list-name{
  color: #1f221f;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-copy span,
html[data-theme="light"] .messages-inbox-modern .message-list-snippet,
html[data-theme="light"] .messages-inbox-modern .messages-empty-card p,
html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge,
html[data-theme="light"] .messages-inbox-modern .message-list-actions .muted{
  color: #747875;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-menu{
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,248,245,.98));
  border-color: rgba(86,127,0,.12);
  box-shadow: 0 18px 34px rgba(22,25,22,.08);
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-menu-item{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 12px 26px rgba(22,25,22,.06);
  color: #1f221f;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-menu-item:hover{
  background: linear-gradient(180deg, rgba(251,254,255,.995), rgba(242,246,243,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 16px 30px rgba(22,25,22,.08);
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-menu-copy span{
  color: #747875;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-search input{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.16);
  color: #1f221f;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-search input::placeholder{
  color: #969a97;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-item{
  background: rgba(255,255,255,.9);
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-item-copy strong{
  color: #1f221f;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-item-copy span{
  color: #747875;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-item-link{
  background: rgba(123,172,44,.1);
  color: #385402;
}

html[data-theme="light"] .messages-inbox-modern .messages-locker-item-link.is-secondary{
  background: rgba(22,25,22,.05);
  color: #3e413e;
}

html[data-theme="light"] .messages-inbox-modern .messages-sidebar-compose{
  background: rgba(86,127,0,.05);
  color: #4b4e4b;
  border: 0;
}

html[data-theme="light"] .messages-inbox-modern .messages-sidebar-announcements{
  background: rgba(86,127,0,.05);
  color: #4b4e4b;
}

@media (max-width: 900px){
  html[data-theme="dark"] .messages-inbox-modern .messages-sidebar-announcements{
    background: rgba(151,211,55,.14);
    color: #aaeb42;
  }

  html[data-theme="dark"] .messages-inbox-modern .messages-sidebar-compose{
    background: rgba(105,154,5,.16);
    color: #a0dd3e;
  }

  html[data-theme="light"] .messages-inbox-modern .messages-sidebar-announcements{
    background: rgba(123,172,44,.12);
    color: #638c21;
  }

  html[data-theme="light"] .messages-inbox-modern .messages-sidebar-compose{
    background: rgba(85,126,2,.12);
    color: #557e02;
  }
}

html[data-theme="light"] .messages-inbox-modern .messages-sidebar-announcements-badge{
  box-shadow: 0 0 0 2px rgba(255,255,255,.98);
}

html[data-theme="light"] .messages-announcements-overlay-card{
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,248,245,.98));
  border-color: rgba(86,127,0,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 32px 70px rgba(22,25,22,.12);
}

html[data-theme="light"] .messages-announcements-overlay-copy strong,
html[data-theme="light"] .messages-announcement-card-head strong{
  color: #1f221f;
}

html[data-theme="light"] .messages-announcement-card{
  background: rgba(255,255,255,.9);
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-announcement-card-head span,
html[data-theme="light"] .messages-announcement-card-body,
html[data-theme="light"] .messages-announcements-overlay-empty{
  color: #747875;
}

html[data-theme="light"] .messages-announcements-overlay-close{
  background: rgba(22,25,22,.05);
  color: #707471;
}

html[data-theme="light"] .messages-inbox-modern .messages-search input{
  background: rgba(245,249,246,.96);
  border-color: rgba(159,163,160,.16);
  color: #1f221f;
}

html[data-theme="light"] .messages-inbox-modern .messages-search input::placeholder{
  color: #969a97;
}

html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge,
html[data-theme="light"] .messages-inbox-modern .messages-tabs a.pill-badge{
  background: transparent;
  border: 0 !important;
}

html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge:hover,
html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge:focus,
html[data-theme="light"] .messages-inbox-modern .messages-tabs a.pill-badge:hover,
html[data-theme="light"] .messages-inbox-modern .messages-tabs a.pill-badge:focus{
  background: transparent;
  border: 0 !important;
  color: #616462;
}

html[data-theme="light"] .messages-inbox-modern .messages-tabs .pill-badge.is-active,
html[data-theme="light"] .messages-inbox-modern .messages-tabs a.pill-badge.is-active{
  background: rgba(123,172,44,.1);
  border: 0 !important;
  color: #385402;
}

html[data-theme="light"] .messages-inbox-modern .messages-list{
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcuts{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(159,163,160,.16);
  box-shadow: none;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcuts-summary{
  color: #222523;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcuts-summary-toggle{
  color: #707471;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcuts-shell{
  border-color: rgba(159,163,160,.16);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  box-shadow: none;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcuts > *:not(:last-child){
  border-color: rgba(159,163,160,.14);
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-card{
  color: #222523;
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-card:hover{
  background: rgba(255,255,255,.72);
}

html[data-theme="light"] .messages-inbox-modern .messages-shortcut-detail[open] > .messages-shortcut-card{
  background: rgba(123,172,44,.05);
}

html[data-theme="light"] .messages-inbox-modern .message-list-item:hover{
  background: rgba(22,25,22,.035);
}

html[data-theme="light"] .messages-inbox-modern .message-list-item.is-active{
  background: rgba(123,172,44,.06);
}

html[data-theme="light"] .messages-inbox-modern .message-list-item,
html[data-theme="light"] .messages-inbox-modern .message-list-row-unread{
  background: transparent !important;
}

html[data-theme="light"] .messages-inbox-modern .message-list-kind{
  background: rgba(22,25,22,.05);
}

@media (max-width: 1024px){
  .messages-inbox-modern .messages-shortcuts{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 820px){
  .messages-announcements-overlay{
    padding: .7rem .65rem calc(.8rem + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }

  .messages-announcements-overlay-card{
    width: 100%;
    max-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px) - env(safe-area-inset-bottom, 0px) - 1.4rem);
    min-height: 0;
    align-self: center;
    gap: .75rem;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .messages-announcements-overlay-body{
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: .1rem;
    padding-bottom: calc(.25rem + env(safe-area-inset-bottom, 0px));
  }

  .messages-inbox-modern .messages-inbox-topcards{
    padding: .55rem .72rem;
  }

  .messages-inbox-modern .messages-shortcuts{
    display: flex;
    overflow-x: auto;
    padding-bottom: .1rem;
    scrollbar-width: none;
  }

  .messages-inbox-modern .messages-shortcuts::-webkit-scrollbar{
    display: none;
  }

  .messages-inbox-modern .messages-shortcut-card{
    min-width: 220px;
  }

  .messages-inbox-modern .messages-shortcut-menu{
    position: static;
    margin-top: .45rem;
  }

  .messages-inbox-modern .messages-locker-results{
    max-height: none;
  }

  .messages-inbox-modern .messages-sidebar{
    padding-top: 1rem;
  }

  .messages-inbox-modern .messages-sidebar-header h2{
    font-size: 1.55rem;
  }

  .messages-announcements-overlay{
    inset: var(--appbar-height, 72px) 0 var(--mobile-nav-height, calc(78px + env(safe-area-inset-bottom, 0px))) 0;
    z-index: 29;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .messages-announcements-overlay-card{
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    align-self: stretch;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .messages-announcement-card-head{
    flex-direction: column;
    gap: .25rem;
  }

  .messages-inbox-modern .messages-locker-item-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .messages-inbox-modern .messages-locker-item-link{
    width: 100%;
  }
}

@media (min-width: 821px){
  .messages-inbox-modern .messages-panel{
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    column-gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .messages-inbox-modern .messages-sidebar,
  .messages-inbox-modern .messages-empty-card,
  .messages-inbox-modern .messages-workspace-card{
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .messages-inbox-modern .messages-sidebar{
    border-right: 1px solid rgba(159,163,160,.12);
  }

  .messages-inbox-modern .messages-empty,
  .messages-inbox-modern .messages-workspace{
    background: transparent;
    min-height: 0;
  }
}

@media (max-width: 820px){
  .messages-inbox-modern .messages-panel{
    gap: .78rem;
    padding: .78rem .72rem calc(var(--mobile-nav-height, 0px) + .95rem);
  }

  .messages-inbox-modern .messages-sidebar,
  .messages-inbox-modern .messages-empty-card,
  .messages-inbox-modern .messages-workspace-card{
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

html[data-theme="light"] .messages-inbox-modern .messages-panel{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
  border-color: rgba(86,127,0,.12);
  box-shadow: 0 18px 34px rgba(22,25,22,.06);
}

html[data-theme="light"] .messages-inbox-modern .messages-sidebar{
  border-right-color: rgba(159,163,160,.14);
}

@media (max-width: 820px){
  html[data-theme="light"] .messages-inbox-modern .messages-sidebar,
  html[data-theme="light"] .messages-inbox-modern .messages-empty-card,
  html[data-theme="light"] .messages-inbox-modern .messages-workspace-card{
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,245,.96));
    border-color: rgba(86,127,0,.12);
    box-shadow: 0 18px 34px rgba(22,25,22,.06);
  }
}

html[data-theme="dark"] .messages-inbox-modern .messages-fab-newchat{
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  background: linear-gradient(135deg, var(--brand), var(--accent)) !important;
  box-shadow: 0 12px 24px rgba(86,127,0,.32) !important;
}

html[data-theme="dark"] .booking-viewer-fallback[data-mode="slow"]{
  background: rgba(17,19,17,.84);
  border-color: rgba(159,163,160,.2);
}

@media (max-width: 760px){
  .messages-booking-banner{
    margin: .3rem .75rem .75rem;
    padding: .8rem;
  }

  .messages-booking-banner-inbox{
    margin: 0;
  }

  .messages-booking-banner-head{
    align-items: center;
  }

  .messages-booking-banner-shell{
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .messages-booking-banner-meta{
    justify-content: space-between;
    gap: .45rem;
  }

  .messages-booking-banner-badge{
    min-height: 1.7rem;
    padding: 0 .62rem;
    font-size: .72rem;
  }

  .messages-bookings-body{
    padding: 0 .9rem .9rem;
  }

  .messages-inbox-modern .messages-workspace-card{
    min-height: 68dvh;
  }

  .messages-inbox-modern .messages-workspace-thread{
    min-height: 360px;
    padding: .8rem;
  }

  .messages-inbox-modern .messages-workspace-header,
  .messages-inbox-modern .messages-workspace-composer{
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .booking-viewer-fallback{
    flex-direction: column;
    align-items: stretch;
  }

  .booking-viewer-fallback-actions{
    justify-content: space-between;
  }

  .booking-viewer{
    inset: 0;
  }

  .booking-viewer-card{
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .booking-link-settings-meta{
    flex-direction: column;
    align-items: flex-start;
  }

  .booking-links-summary{
    align-items: flex-start;
  }

  .booking-links-summary-head{
    width: 100%;
  }

  .booking-links-summary-meta{
    margin-left: 0;
    padding-right: 1.6rem;
  }

  .booking-link-settings-head{
    align-items: flex-start;
    flex-direction: column;
  }

  .booking-link-inline-actions{
    width: 100%;
    display: grid;
    grid-template-columns: minmax(2.5rem, 2.7rem) repeat(3, 2.1rem);
    justify-content: end;
    align-items: center;
    gap: .45rem;
  }

  .booking-link-inline-actions .booking-link-action-form{
    margin: 0;
  }

  .booking-link-inline-actions .booking-link-action-form:first-child{
    justify-self: start;
  }

  .booking-link-inline-actions button{
    width: auto;
  }
}

@media (max-width: 820px){
  body.messages-page{
    overflow-x: hidden;
  }

  body.messages-page .shell,
  body.messages-page .shell > .container{
    overflow-x: hidden;
  }

  .messages-inbox-modern.messages-app{
    min-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  body.messages-page .shell{
    padding: 0 0 calc(var(--mobile-nav-height, 0px) + env(safe-area-inset-bottom));
    overflow: visible;
  }

  body.messages-page .shell > .container{
    overflow: visible;
  }

  body.messages-page .site-footer{
    display: none;
  }

  .messages-inbox-modern .messages-inbox-topcards{
    gap: .34rem;
    padding: 0 0 .08rem;
    width: 100%;
    max-width: 100%;
  }

  .messages-inbox-modern .messages-panel{
    display: grid;
    grid-template-columns: 1fr;
    gap: .8rem;
    height: 100%;
    min-height: 0;
    padding: 0 .72rem 0;
    align-content: stretch;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  .messages-inbox-modern .messages-inbox-topcards,
  .messages-inbox-modern .messages-sidebar,
  .messages-inbox-modern .messages-bookings-panel,
  .messages-inbox-modern .messages-announcements,
  .messages-inbox-modern .messages-empty,
  .messages-inbox-modern .messages-workspace{
    width: 100%;
  }

  .messages-inbox-modern .messages-sidebar{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .messages-inbox-modern .messages-empty{
    display: none;
  }

  .messages-inbox-modern .messages-empty-card{
    display: none;
  }

  .messages-inbox-modern .messages-fab-newchat{
    display: none;
    position: absolute;
    top: .96rem;
    right: 1rem;
    left: auto;
    bottom: auto;
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    padding: 0;
    gap: 0;
    justify-content: center;
    transform: none;
    z-index: 1;
    border-color: rgba(255,255,255,.14);
    background: linear-gradient(135deg, rgba(147,203,58,.88), rgba(86,127,0,.84));
    box-shadow: 0 12px 24px rgba(86,127,0,.22);
    font-size: 0;
  }

  .messages-inbox-modern .messages-shortcut-card{
    padding: .82rem .92rem;
  }

  .messages-inbox-modern .messages-fab-newchat.is-hidden-by-search{
    opacity: 0;
    transform: translateY(10px);
  }

  .messages-inbox-modern .messages-fab-newchat .nav-icon-lucide{
    width: 17px;
    height: 17px;
  }

  .messages-inbox-modern .messages-fab-newchat-label{
    display: none;
  }

  .messages-inbox-modern .messages-sidebar-actions-row{
    gap: .54rem;
  }

  .messages-inbox-modern .messages-sidebar-announcements,
  .messages-inbox-modern .messages-sidebar-compose{
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 13px;
  }

  .messages-inbox-modern .messages-sidebar-announcements .nav-icon-lucide,
  .messages-inbox-modern .messages-sidebar-compose .nav-icon-lucide{
    width: 1.18rem;
    height: 1.18rem;
  }

  .messages-inbox-modern.has-selected-conversation .messages-inbox-topcards,
  .messages-inbox-modern.has-selected-conversation .messages-panel{
    display: block;
  }

  .messages-inbox-modern.has-selected-conversation .messages-panel{
    padding: 0;
    gap: 0;
  }

  .messages-inbox-modern.has-selected-conversation .messages-inbox-topcards,
  .messages-inbox-modern.has-selected-conversation .messages-sidebar,
  .messages-inbox-modern.has-selected-conversation .messages-empty,
  .messages-inbox-modern.has-selected-conversation .messages-fab-newchat{
    display: none !important;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace{
    display: block;
    min-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-card{
    min-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: 0;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-header{
    padding: .85rem .9rem .8rem;
    gap: .72rem;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-actions{
    align-self: flex-start;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-back{
    display: inline-flex;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-user{
    min-width: 0;
    flex: 1 1 auto;
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-thread{
    min-height: 0;
    height: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .85rem .9rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .messages-inbox-modern.has-selected-conversation .messages-workspace-composer{
    padding: .72rem .9rem calc(.85rem + env(safe-area-inset-bottom, 0px));
    position: sticky;
    bottom: 0;
    z-index: 3;
  }

  .messages-inbox-modern #messages-chats-panel{
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .messages-inbox-modern .messages-list{
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .12rem;
  }

  .messages-inbox-modern .messages-shortcuts{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: visible;
    padding-bottom: 0;
  }

  .messages-inbox-modern .messages-shortcuts-shell{
    border: 1px solid rgba(86,127,0,.12);
    background: linear-gradient(180deg, rgba(17,19,17,.97), rgba(10,13,10,.99));
    box-shadow: 0 18px 34px rgba(6,8,6,.16);
    width: 100%;
    max-width: 100%;
    overflow: visible;
    border-left: 0;
    border-right: 0;
  }

  .messages-inbox-modern .messages-shortcuts-shell > summary{
    list-style: none;
  }

  .messages-inbox-modern .messages-shortcuts-shell > summary::-webkit-details-marker{
    display: none;
  }

  .messages-inbox-modern .messages-shortcuts-summary{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .92rem .95rem;
    cursor: pointer;
    color: #eaedea;
  }

  .messages-inbox-modern .messages-shortcuts-summary-copy{
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 700;
    letter-spacing: -.01em;
  }

  .messages-inbox-modern .messages-shortcuts-summary-copy .nav-icon-lucide,
  .messages-inbox-modern .messages-shortcuts-summary-toggle{
    width: 18px;
    height: 18px;
  }

  .messages-inbox-modern .messages-shortcuts-summary-toggle{
    color: #9ea29f;
    transition: transform .18s ease;
  }

  .messages-inbox-modern .messages-shortcuts-shell[open] .messages-shortcuts-summary-toggle{
    transform: rotate(180deg);
  }

  .messages-inbox-modern .messages-shortcuts-shell:not([open]) .messages-shortcuts{
    display: none;
  }

  .messages-inbox-modern .messages-shortcuts-shell[open] .messages-shortcuts{
    border-top: 1px solid rgba(159,163,160,.12);
    max-height: calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px) - env(safe-area-inset-bottom, 0px) - 5.75rem);
    overflow: visible;
  }

  .messages-inbox-modern .messages-shortcut-detail{
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  .messages-inbox-modern .messages-shortcut-menu{
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    padding: .45rem;
  }

  .messages-inbox-modern .messages-locker-search{
    width: 100%;
    max-width: 100%;
  }

  .messages-inbox-modern .messages-locker-search input{
    width: 100%;
    min-width: 0;
  }

  .messages-inbox-modern .messages-locker-menu{
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: .5rem;
    position: fixed;
    top: var(--locker-mobile-top, calc(var(--appbar-height, 0px) + 8rem));
    left: var(--locker-mobile-side, .72rem);
    right: var(--locker-mobile-side, .72rem);
    z-index: 24;
    max-height: var(--locker-mobile-height, calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px) - env(safe-area-inset-bottom, 0px) - 12rem));
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(86,127,0,.16);
    box-shadow: 0 20px 42px rgba(6,8,6,.26);
    padding: .45rem .45rem calc(.45rem + env(safe-area-inset-bottom, 0px));
  }

  .messages-inbox-modern .messages-locker-results{
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .2rem;
  }

  .messages-inbox-modern .messages-locker-item{
    gap: .5rem;
    padding: .72rem .75rem;
  }

  .messages-inbox-modern .messages-locker-item-main{
    gap: .6rem;
  }

  .messages-inbox-modern .messages-locker-item-icon{
    width: 2rem;
    height: 2rem;
    flex-basis: 2rem;
    border-radius: 11px;
  }

  .messages-inbox-modern .messages-locker-item-copy{
    gap: .08rem;
  }

  .messages-inbox-modern .messages-locker-item-copy strong{
    font-size: .92rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .messages-inbox-modern .messages-locker-item-copy span{
    font-size: .78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .messages-inbox-modern .messages-locker-item-actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: .42rem;
  }

  .messages-inbox-modern .messages-locker-item-link{
    width: 100%;
    min-height: 2rem;
    padding: 0 .7rem;
  }

  .messages-inbox-modern .messages-shortcuts > *{
    border-right: 0 !important;
  }

  .messages-inbox-modern .messages-shortcuts > *:not(:last-child){
    border-bottom: 1px solid rgba(159,163,160,.12);
  }

  .messages-inbox-modern .messages-shortcut-card,
  .messages-inbox-modern .messages-shortcut-detail{
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .messages-inbox-modern .messages-shortcut-card{
    padding: .76rem .9rem;
  }

  .messages-inbox-modern .messages-sidebar-header{
    align-items: center;
    gap: .45rem;
    padding: 0 .88rem;
    padding-right: 4.9rem;
  }

  .messages-inbox-modern .messages-sidebar-heading{
    min-width: 0;
  }

  .messages-inbox-modern .messages-sidebar-actions-row{
    margin-left: auto;
    gap: .38rem;
  }

  .messages-inbox-modern .messages-sidebar{
    padding-top: .82rem;
  }

  .messages-inbox-modern .messages-search{
    margin-top: .38rem;
    padding: 0 .88rem;
  }

  .messages-inbox-modern .messages-search input{
    min-height: 2.86rem;
  }

  .messages-inbox-modern .messages-tabs{
    margin-top: .42rem;
    padding: .64rem .88rem .56rem;
  }

  .messages-inbox-modern .messages-list{
    padding-top: .18rem;
    padding-left: .42rem;
    padding-right: .42rem;
  }

  .messages-inbox-modern .messages-shortcut-detail[open]{
    z-index: 12;
  }

  .messages-inbox-modern .messages-tabs{
    gap: .28rem .4rem;
  }

  .messages-inbox-modern .messages-tabs .pill-badge,
  .messages-inbox-modern .messages-tabs a.pill-badge{
    padding: .38rem .58rem;
    font-size: .8rem;
    min-width: 0;
  }

  .messages-inbox-modern .message-list-link{
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
  }

  .messages-inbox-modern .message-list-meta,
  .messages-inbox-modern .message-list-title,
  .messages-inbox-modern .message-list-name,
  .messages-inbox-modern .message-list-snippet{
    min-width: 0;
  }

  .messages-inbox-modern .message-list-snippet{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .messages-inbox-modern .message-list-actions{
    min-width: 2.4rem;
  }

  .messages-inbox-modern .message-list-actions .muted.small{
    max-width: 2.8rem;
    text-align: right;
  }
}

@media (max-width: 820px){
  html[data-theme="light"] .messages-inbox-modern .messages-fab-newchat{
    color: #191b19;
    border-color: rgba(86,127,0,.08);
    background: linear-gradient(135deg, rgba(147,203,58,.9), rgba(141,195,55,.82));
    box-shadow: 0 12px 24px rgba(22,25,22,.12);
  }
}

body.app[data-authenticated="1"] button,
body.app[data-authenticated="1"] input[type="submit"],
body.app[data-authenticated="1"] input[type="button"],
body.app[data-authenticated="1"] .button,
body.app[data-authenticated="1"] a.button,
body.app[data-authenticated="1"] a[role="button"],
body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] .secondary-button,
body.app[data-authenticated="1"] .plan-week-add,
body.app[data-authenticated="1"] .plan-week-remove{
  box-shadow: none !important;
}

body.app[data-authenticated="1"] button:hover,
body.app[data-authenticated="1"] button:focus,
body.app[data-authenticated="1"] button:focus-visible,
body.app[data-authenticated="1"] button:active,
body.app[data-authenticated="1"] input[type="submit"]:hover,
body.app[data-authenticated="1"] input[type="submit"]:focus,
body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
body.app[data-authenticated="1"] input[type="submit"]:active,
body.app[data-authenticated="1"] input[type="button"]:hover,
body.app[data-authenticated="1"] input[type="button"]:focus,
body.app[data-authenticated="1"] input[type="button"]:focus-visible,
body.app[data-authenticated="1"] input[type="button"]:active,
body.app[data-authenticated="1"] .button:hover,
body.app[data-authenticated="1"] .button:focus,
body.app[data-authenticated="1"] .button:focus-visible,
body.app[data-authenticated="1"] .button:active,
body.app[data-authenticated="1"] a.button:hover,
body.app[data-authenticated="1"] a.button:focus,
body.app[data-authenticated="1"] a.button:focus-visible,
body.app[data-authenticated="1"] a.button:active,
body.app[data-authenticated="1"] a[role="button"]:hover,
body.app[data-authenticated="1"] a[role="button"]:focus,
body.app[data-authenticated="1"] a[role="button"]:focus-visible,
body.app[data-authenticated="1"] a[role="button"]:active,
body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] .secondary-button:hover,
body.app[data-authenticated="1"] .secondary-button:focus,
body.app[data-authenticated="1"] .secondary-button:focus-visible,
body.app[data-authenticated="1"] .secondary-button:active,
body.app[data-authenticated="1"] .plan-week-add:hover,
body.app[data-authenticated="1"] .plan-week-add:focus,
body.app[data-authenticated="1"] .plan-week-add:focus-visible,
body.app[data-authenticated="1"] .plan-week-add:active,
body.app[data-authenticated="1"] .plan-week-remove:hover,
body.app[data-authenticated="1"] .plan-week-remove:focus,
body.app[data-authenticated="1"] .plan-week-remove:focus-visible,
body.app[data-authenticated="1"] .plan-week-remove:active{
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] .page-actions .pill-link,
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .plan-day-edit-btn,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .day-complete-btn,
body.app[data-authenticated="1"] .secondary{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] .page-actions .pill-link:hover,
body.app[data-authenticated="1"] .page-actions .pill-link:focus,
body.app[data-authenticated="1"] .page-actions .pill-link:focus-visible,
body.app[data-authenticated="1"] .page-actions .pill-link:active,
body.app[data-authenticated="1"] .history-page-action-btn:hover,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .history-checkin-btn:hover,
body.app[data-authenticated="1"] .history-checkin-btn:focus,
body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
body.app[data-authenticated="1"] .history-checkin-btn:active,
body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
body.app[data-authenticated="1"] .plan-day-edit-btn:active,
body.app[data-authenticated="1"] .history-month-btn:hover,
body.app[data-authenticated="1"] .history-month-btn:focus,
body.app[data-authenticated="1"] .history-month-btn:focus-visible,
body.app[data-authenticated="1"] .history-month-btn:active,
body.app[data-authenticated="1"] .day-complete-btn:hover,
body.app[data-authenticated="1"] .day-complete-btn:focus,
body.app[data-authenticated="1"] .day-complete-btn:focus-visible,
body.app[data-authenticated="1"] .day-complete-btn:active,
body.app[data-authenticated="1"] .secondary:hover,
body.app[data-authenticated="1"] .secondary:focus,
body.app[data-authenticated="1"] .secondary:focus-visible,
body.app[data-authenticated="1"] .secondary:active{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-page-action-btn:hover,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .history-checkin-btn:hover,
body.app[data-authenticated="1"] .history-checkin-btn:focus,
body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
body.app[data-authenticated="1"] .history-checkin-btn:active,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .history-month-btn:hover,
body.app[data-authenticated="1"] .history-month-btn:focus,
body.app[data-authenticated="1"] .history-month-btn:focus-visible,
body.app[data-authenticated="1"] .history-month-btn:active,
body.app[data-authenticated="1"] .history-calendar,
body.app[data-authenticated="1"] .history-detail,
body.app[data-authenticated="1"] .calendar-day.selected,
body.app[data-authenticated="1"] .calendar-day:hover{
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] button,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"],
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .button,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  outline: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active{
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  outline: none !important;
}

body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .plan-day-edit-btn,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .messages-primary-cta,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link,
body.app[data-authenticated="1"] .contacts-primary-btn,
body.app[data-authenticated="1"] .contacts-message-btn{
  border: var(--ui-btn-border-width) solid var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):hover,
body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus,
body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus-visible,
body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):active,
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):hover,
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus,
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus-visible,
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):active,
body.app[data-authenticated="1"] .history-page-action-btn:hover,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .history-checkin-btn:hover,
body.app[data-authenticated="1"] .history-checkin-btn:focus,
body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
body.app[data-authenticated="1"] .history-checkin-btn:active,
body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
body.app[data-authenticated="1"] .plan-day-edit-btn:active,
body.app[data-authenticated="1"] .history-month-btn:hover,
body.app[data-authenticated="1"] .history-month-btn:focus,
body.app[data-authenticated="1"] .history-month-btn:focus-visible,
body.app[data-authenticated="1"] .history-month-btn:active,
body.app[data-authenticated="1"] .messages-primary-cta:hover,
body.app[data-authenticated="1"] .messages-primary-cta:focus,
body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
body.app[data-authenticated="1"] .messages-primary-cta:active,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active,
body.app[data-authenticated="1"] .contacts-primary-btn:hover,
body.app[data-authenticated="1"] .contacts-primary-btn:focus,
body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-primary-btn:active,
body.app[data-authenticated="1"] .contacts-message-btn:hover,
body.app[data-authenticated="1"] .contacts-message-btn:focus,
body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-message-btn:active{
  border-color: rgba(229,233,229,.28) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger) .nav-icon-lucide,
body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn) .nav-icon-lucide,
body.app[data-authenticated="1"] .history-page-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-checkin-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .plan-day-edit-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-month-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .messages-primary-cta .nav-icon-lucide,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat .nav-icon-lucide,
body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-primary-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-message-btn .nav-icon-lucide{
  color: currentColor !important;
}

.auto-save-btn,
.auto-save-btn:hover,
.auto-save-btn:focus,
.auto-save-btn:focus-visible,
.auto-save-btn:active{
  border-color: rgba(21,128,61,.72) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.26), rgba(22,163,74,.18)) !important;
  color: #166534 !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .auto-save-btn,
html[data-theme="dark"] .auto-save-btn:hover,
html[data-theme="dark"] .auto-save-btn:focus,
html[data-theme="dark"] .auto-save-btn:focus-visible,
html[data-theme="dark"] .auto-save-btn:active{
  border-color: rgba(74,222,128,.62) !important;
  background: linear-gradient(180deg, rgba(34,197,94,.28), rgba(22,163,74,.2)) !important;
  color: #dcfce7 !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

.auto-danger-btn,
.auto-danger-btn:hover,
.auto-danger-btn:focus,
.auto-danger-btn:focus-visible,
.auto-danger-btn:active{
  border-color: rgba(220,38,38,.5) !important;
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(220,38,38,.14)) !important;
  color: #991b1b !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .auto-danger-btn,
html[data-theme="dark"] .auto-danger-btn:hover,
html[data-theme="dark"] .auto-danger-btn:focus,
html[data-theme="dark"] .auto-danger-btn:focus-visible,
html[data-theme="dark"] .auto-danger-btn:active{
  border-color: rgba(252,165,165,.42) !important;
  background: linear-gradient(180deg, rgba(153,27,27,.34), rgba(69,10,10,.28)) !important;
  color: #fee2e2 !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .auto-save-btn,
body.app[data-authenticated="1"] .auto-save-btn:hover,
body.app[data-authenticated="1"] .auto-save-btn:focus,
body.app[data-authenticated="1"] .auto-save-btn:focus-visible,
body.app[data-authenticated="1"] .auto-save-btn:active{
  border-color: rgba(21,128,61,.72) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:active{
  border-color: rgba(74,222,128,.62) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .auto-danger-btn,
body.app[data-authenticated="1"] .auto-danger-btn:hover,
body.app[data-authenticated="1"] .auto-danger-btn:focus,
body.app[data-authenticated="1"] .auto-danger-btn:focus-visible,
body.app[data-authenticated="1"] .auto-danger-btn:active{
  border-color: rgba(220,38,38,.5) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn:active{
  border-color: rgba(252,165,165,.42) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  border-radius: var(--btn-radius) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] button,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"],
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .button,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cta{
  outline: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"]:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cta:active{
  outline: none !important;
}

body.app[data-authenticated="1"] .plan-edit-btn,
body.app[data-authenticated="1"] .plan-edit-btn:hover,
body.app[data-authenticated="1"] .plan-edit-btn:focus,
body.app[data-authenticated="1"] .plan-edit-btn:focus-visible,
body.app[data-authenticated="1"] .plan-edit-btn:active{
  border-color: rgba(245,158,11,.46) !important;
  background: rgba(245,158,11,.16) !important;
  color: #92400e !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-edit-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-edit-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-edit-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-edit-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-edit-btn:active{
  border-color: rgba(250,204,21,.36) !important;
  background: rgba(161,98,7,.24) !important;
  color: #fde68a !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .coach-payment-share-close,
body.app[data-authenticated="1"] .coach-payment-share-close:hover,
body.app[data-authenticated="1"] .coach-payment-share-close:focus,
body.app[data-authenticated="1"] .coach-payment-share-close:focus-visible,
body.app[data-authenticated="1"] .coach-payment-share-close:active{
  width: 2.6rem !important;
  height: 2.6rem !important;
  min-width: 2.6rem !important;
  min-height: 2.6rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #7f1d1d !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-share-close,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-share-close:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-share-close:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-share-close:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-share-close:active{
  border: 0 !important;
  background: transparent !important;
  color: #fca5a5 !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] [aria-label^="Close"],
body.app[data-authenticated="1"] .subtle-danger-icon-btn,
body.app[data-authenticated="1"] .custom-food-barcode-close,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn,
body.app[data-authenticated="1"] .coach-automation-close-btn,
body.app[data-authenticated="1"] .locker-share-close-btn,
body.app[data-authenticated="1"] .coach-payment-share-close{
  width: 2.6rem !important;
  height: 2.6rem !important;
  min-width: 2.6rem !important;
  min-height: 2.6rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
}

[aria-label^="Close"],
[data-modal-close],
[data-payment-automation-close],
.custom-food-barcode-close,
.coach-payment-automation-close-btn,
.coach-automation-close-btn,
.locker-share-close-btn,
.coach-payment-share-close{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b91c1c;
}

[aria-label^="Close"]:hover,
[aria-label^="Close"]:focus,
[aria-label^="Close"]:focus-visible,
[data-modal-close]:hover,
[data-modal-close]:focus,
[data-modal-close]:focus-visible,
[data-payment-automation-close]:hover,
[data-payment-automation-close]:focus,
[data-payment-automation-close]:focus-visible,
.custom-food-barcode-close:hover,
.custom-food-barcode-close:focus,
.custom-food-barcode-close:focus-visible,
.coach-payment-automation-close-btn:hover,
.coach-payment-automation-close-btn:focus,
.coach-payment-automation-close-btn:focus-visible,
.coach-automation-close-btn:hover,
.coach-automation-close-btn:focus,
.coach-automation-close-btn:focus-visible,
.locker-share-close-btn:hover,
.locker-share-close-btn:focus,
.locker-share-close-btn:focus-visible,
.coach-payment-share-close:hover,
.coach-payment-share-close:focus,
.coach-payment-share-close:focus-visible{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #991b1b;
}

html[data-theme="dark"] [aria-label^="Close"],
html[data-theme="dark"] [data-modal-close],
html[data-theme="dark"] [data-payment-automation-close],
html[data-theme="dark"] .custom-food-barcode-close,
html[data-theme="dark"] .coach-payment-automation-close-btn,
html[data-theme="dark"] .coach-automation-close-btn,
html[data-theme="dark"] .locker-share-close-btn,
html[data-theme="dark"] .coach-payment-share-close{
  color: #fca5a5;
}

html[data-theme="dark"] [aria-label^="Close"]:hover,
html[data-theme="dark"] [aria-label^="Close"]:focus,
html[data-theme="dark"] [aria-label^="Close"]:focus-visible,
html[data-theme="dark"] [data-modal-close]:hover,
html[data-theme="dark"] [data-modal-close]:focus,
html[data-theme="dark"] [data-modal-close]:focus-visible,
html[data-theme="dark"] [data-payment-automation-close]:hover,
html[data-theme="dark"] [data-payment-automation-close]:focus,
html[data-theme="dark"] [data-payment-automation-close]:focus-visible,
html[data-theme="dark"] .custom-food-barcode-close:hover,
html[data-theme="dark"] .custom-food-barcode-close:focus,
html[data-theme="dark"] .custom-food-barcode-close:focus-visible,
html[data-theme="dark"] .coach-payment-automation-close-btn:hover,
html[data-theme="dark"] .coach-payment-automation-close-btn:focus,
html[data-theme="dark"] .coach-payment-automation-close-btn:focus-visible,
html[data-theme="dark"] .coach-automation-close-btn:hover,
html[data-theme="dark"] .coach-automation-close-btn:focus,
html[data-theme="dark"] .coach-automation-close-btn:focus-visible,
html[data-theme="dark"] .locker-share-close-btn:hover,
html[data-theme="dark"] .locker-share-close-btn:focus,
html[data-theme="dark"] .locker-share-close-btn:focus-visible,
html[data-theme="dark"] .coach-payment-share-close:hover,
html[data-theme="dark"] .coach-payment-share-close:focus,
html[data-theme="dark"] .coach-payment-share-close:focus-visible{
  color: #f87171;
}

button.subtle-edit-btn,
a.subtle-edit-btn,
span.subtle-edit-btn,
button.subtle-danger-icon-btn,
a.subtle-danger-icon-btn,
span.subtle-danger-icon-btn,
.progress-photo-icon-action,
.library-icon-btn:has([data-lucide="pencil"]),
.library-icon-btn:has([data-lucide="trash-2"]),
.booking-link-icon-btn[aria-label*="Delete"],
.booking-link-icon-btn[aria-label*="Edit"]{
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
}

button.subtle-edit-btn,
a.subtle-edit-btn,
span.subtle-edit-btn,
.progress-photo-edit-btn,
.library-icon-btn:has([data-lucide="pencil"]),
.booking-link-icon-btn[aria-label*="Edit"]{
  color: #fbbf24 !important;
}

html:not([data-theme="dark"]) .coach-library-page .library-icon-btn:has([data-lucide="pencil"]){
  color: #161917 !important;
}

button.subtle-edit-btn:hover,
button.subtle-edit-btn:focus,
button.subtle-edit-btn:focus-visible,
a.subtle-edit-btn:hover,
a.subtle-edit-btn:focus,
a.subtle-edit-btn:focus-visible,
span.subtle-edit-btn:hover,
span.subtle-edit-btn:focus,
span.subtle-edit-btn:focus-visible,
.progress-photo-edit-btn:hover,
.progress-photo-edit-btn:focus,
.progress-photo-edit-btn:focus-visible,
.library-icon-btn:has([data-lucide="pencil"]):hover,
.library-icon-btn:has([data-lucide="pencil"]):focus,
.library-icon-btn:has([data-lucide="pencil"]):focus-visible,
.booking-link-icon-btn[aria-label*="Edit"]:hover,
.booking-link-icon-btn[aria-label*="Edit"]:focus,
.booking-link-icon-btn[aria-label*="Edit"]:focus-visible{
  color: #fde68a !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .coach-library-page .library-icon-btn:has([data-lucide="pencil"]):hover,
html:not([data-theme="dark"]) .coach-library-page .library-icon-btn:has([data-lucide="pencil"]):focus,
html:not([data-theme="dark"]) .coach-library-page .library-icon-btn:has([data-lucide="pencil"]):focus-visible{
  color: #161917 !important;
}

button.subtle-danger-icon-btn,
a.subtle-danger-icon-btn,
span.subtle-danger-icon-btn,
.progress-photo-delete-btn,
.library-icon-btn:has([data-lucide="trash-2"]),
.booking-link-icon-btn[aria-label*="Delete"]{
  color: #fca5a5 !important;
}

button.subtle-danger-icon-btn:hover,
button.subtle-danger-icon-btn:focus,
button.subtle-danger-icon-btn:focus-visible,
a.subtle-danger-icon-btn:hover,
a.subtle-danger-icon-btn:focus,
a.subtle-danger-icon-btn:focus-visible,
span.subtle-danger-icon-btn:hover,
span.subtle-danger-icon-btn:focus,
span.subtle-danger-icon-btn:focus-visible,
.progress-photo-delete-btn:hover,
.progress-photo-delete-btn:focus,
.progress-photo-delete-btn:focus-visible,
.library-icon-btn:has([data-lucide="trash-2"]):hover,
.library-icon-btn:has([data-lucide="trash-2"]):focus,
.library-icon-btn:has([data-lucide="trash-2"]):focus-visible,
.booking-link-icon-btn[aria-label*="Delete"]:hover,
.booking-link-icon-btn[aria-label*="Delete"]:focus,
.booking-link-icon-btn[aria-label*="Delete"]:focus-visible{
  color: #fecaca !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.authenticated button.subtle-danger-icon-btn:has([data-lucide="trash-2"]),
body.authenticated a.subtle-danger-icon-btn:has([data-lucide="trash-2"]),
body.authenticated .subtle-danger-icon-btn:has([data-lucide="trash-2"]){
  width:auto !important;
  min-width:2.5rem !important;
  height:2.25rem !important;
  min-height:2.25rem !important;
  padding:0 .72rem !important;
  border-radius:12px !important;
}

.progress-shell{
  display:grid;
  gap:1.25rem;
  background:linear-gradient(180deg, rgba(38,41,39,.96), rgba(23,26,24,.98));
  border:1px solid rgba(111,155,41,.24);
}
.progress-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.progress-head h3{
  margin:0 0 .35rem;
  font-size:2rem;
}
.progress-range-filter{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.6rem;
}
.progress-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
}
/* One scrolling row, not a wrapping block. Six tabs that wrap — and on a phone
   stretch to full width each — put a wall of buttons above every panel, which
   is the bulk of the page before any content. */
.progress-subtabs{
  display:flex;
  flex-wrap:nowrap;
  gap:.4rem;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-padding-inline:.4rem;
  padding-bottom:.15rem;
  scrollbar-width:none;
}
.progress-subtabs::-webkit-scrollbar{ display:none; }
.progress-subtabs > *{
  flex:0 0 auto;
}
.progress-subtab-btn{
  border-radius:16px!important;
}
.progress-tab-panel{
  display:none;
}
.progress-tab-panel.is-active{
  display:block;
}
.progress-summary-card,
.progress-section{
  background:rgba(17,20,17,.44);
  border:1px solid rgba(123,172,44,.18);
  border-radius:22px;
}
.progress-summary-card{
  padding:1rem 1.1rem;
  display:grid;
  gap:.5rem;
}
.progress-summary-card strong{
  font-size:1.9rem;
  line-height:1;
}
.progress-summary-kicker{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  color:#c3c7c3;
  font-size:.95rem;
  font-weight:700;
}
.progress-section{
  padding:1.2rem;
  display:grid;
  gap:1rem;
}
.progress-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.progress-section-head p{
  margin:.35rem 0 0;
}
.progress-metric-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.85rem;
}
.progress-metric-strip div,
.progress-current-pill{
  background:rgba(28,30,28,.78);
  border:1px solid rgba(120,168,45,.18);
  border-radius:18px;
  padding:.8rem .95rem;
  display:grid;
  gap:.28rem;
}
.progress-metric-strip strong,
.progress-current-pill strong{
  font-size:1.2rem;
}
.progress-section-actions{
  display:flex;
  align-items:center;
  gap:.8rem;
}
.progress-section-head.compact{
  align-items:center;
}
.progress-action-btn,
.progress-primary-btn{
  border-radius:16px!important;
}
.progress-primary-btn{
  background:rgba(151,211,55,.18)!important;
  color:#b9fd52!important;
  border:1px solid rgba(151,211,55,.28)!important;
}
.progress-photos-section{
  gap:1.1rem;
}
.progress-photo-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.85rem;
}
.progress-photo-summary-card{
  display:grid;
  gap:.35rem;
  padding:.95rem 1rem;
  border-radius:18px;
  background:rgba(28,30,28,.78);
  border:1px solid rgba(120,168,45,.18);
}
.progress-photo-summary-card strong{
  font-size:1.45rem;
  line-height:1;
}
.progress-photo-history{
  display:grid;
  gap:1rem;
}
.progress-photo-date-card{
  display:grid;
  gap:.9rem;
  padding:1rem;
  border-radius:20px;
  background:rgba(22,25,23,.6);
  border:1px solid rgba(118,165,41,.14);
}
.progress-photo-date-disclosure{
  gap:0;
}
.progress-photo-date-summary{
  list-style:none;
  cursor:pointer;
}
.progress-photo-date-summary::-webkit-details-marker{
  display:none;
}
.progress-photo-date-summary::marker{
  content:"";
}
.progress-photo-date-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.progress-photo-date-actions{
  display:flex;
  align-items:center;
  gap:.5rem;
  margin-left:auto;
}
.progress-photo-date-body{
  margin-top:.9rem;
}
.progress-photo-date-summary:hover,
.progress-photo-date-summary:focus,
.progress-photo-date-summary:focus-visible,
.progress-photo-date-summary:active{
  background:transparent !important;
  outline:none;
  box-shadow:none !important;
  -webkit-tap-highlight-color:transparent;
}
.progress-photo-angle-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.9rem;
}
.progress-photo-tile{
  display:grid;
  gap:.7rem;
  min-width:0;
  padding:.85rem;
  border-radius:18px;
  background:rgba(15,17,15,.6);
  border:1px solid rgba(116,162,43,.18);
}
.progress-photo-tile.is-empty{
  background:rgba(25,28,26,.38);
  border-style:dashed;
}
.progress-photo-tile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}
.progress-photo-tile-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
}
.progress-photo-icon-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#81b430;
  padding:0;
  background:none;
  border:0;
  box-shadow:none !important;
  text-decoration:none;
  transition:color .18s ease, transform .18s ease;
}
.progress-photo-icon-action:hover,
.progress-photo-icon-action:focus-visible{
  color:#f8fbff;
  outline:none;
  transform:translateY(-1px);
}
.progress-photo-angle-badge{
  display:inline-flex;
  align-items:center;
  color:#e7eae7;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.01em;
}
.progress-photo-delete-btn{
  color:#fca5a5;
}
.progress-photo-edit-btn{
  color:#fbbf24;
}
.progress-photo-delete-btn:hover,
.progress-photo-delete-btn:focus-visible{
  color:#fecaca;
}
.progress-photo-edit-btn:hover,
.progress-photo-edit-btn:focus-visible{
  color:#fde68a;
}
.progress-photo-frame{
  position:relative;
  aspect-ratio:4 / 5;
  overflow:hidden;
  border-radius:16px;
  background:rgba(11,13,11,.78);
  border:1px solid rgba(111,155,41,.16);
}
.progress-photo-frame img,
.progress-photo-compare-image-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.progress-photo-tile-meta{
  display:grid;
  gap:.35rem;
}
.progress-photo-notes,
.progress-photo-compare-notes{
  color:#dce0dd;
  font-size:.88rem;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.progress-photo-empty{
  min-height:120px;
}
.progress-photo-upload-modal{
  --progress-modal-desktop-max:760px;
  width:min(760px, calc(100vw - 2rem));
}
.progress-photo-upload-form{
  gap:1rem;
}
.progress-photo-upload-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.85rem;
}
.progress-photo-upload-field{
  display:grid;
  gap:.45rem;
  justify-items:start;
  min-width:0;
  padding:.95rem;
  border-radius:18px;
  background:rgba(24,27,25,.66);
  border:1px solid rgba(119,166,43,.18);
  overflow:hidden;
  cursor:pointer;
  position:relative;
}
.progress-photo-upload-field input[type="file"]{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.progress-photo-upload-trigger{
  width:2.65rem;
  height:2.65rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(151,211,55,.18);
  border:1px solid rgba(151,211,55,.28);
  color:#e7eae7;
}
.progress-photo-upload-trigger .nav-icon-lucide{
  width:1rem;
  height:1rem;
}
.progress-photo-upload-slot-status{
  min-height:2.4em;
  display:block;
  color:#b7bbb8;
  overflow-wrap:anywhere;
}
.progress-photo-upload-slot-status.is-filled{
  color:#e6eae7;
  font-weight:700;
}
.progress-photo-upload-progress-card{
  --progress-modal-desktop-max:460px;
  width:min(460px, calc(100vw - 2rem));
}
.progress-photo-edit-preview{
  display:grid;
  gap:.75rem;
}
.progress-photo-edit-preview .progress-photo-frame{
  max-width:220px;
}
.progress-photo-edit-meta{
  display:grid;
  gap:.2rem;
}
.progress-photo-upload-progress-shell{
  width:100%;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(118,165,41,.16);
  border:1px solid rgba(118,165,41,.18);
}
.progress-photo-upload-progress-bar{
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #97d337, #94cd37);
  transition:width .18s ease;
}
.progress-photo-upload-progress-meta{
  margin-top:.85rem;
  display:grid;
  gap:.25rem;
}
.progress-photo-upload-progress-meta strong{
  font-size:1.5rem;
}
.progress-modal-card.progress-photo-compare-modal{
  --progress-modal-desktop-max:1360px;
  width:min(1440px, calc(100vw - 1rem));
  max-width:calc(100vw - 1rem);
  max-height:calc(100vh - 1rem);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.progress-modal-card.progress-photo-compare-modal .modal-header{
  padding-bottom:.55rem;
}
.progress-modal-card.progress-photo-compare-modal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-left:0;
  padding-right:.85rem;
  padding-bottom:0;
  scrollbar-gutter:stable;
}
.progress-modal-card.progress-photo-viewer-modal{
  width:min(100vw - 1rem, 1440px);
  max-width:calc(100vw - 1rem);
  max-height:calc(100vh - 1rem);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.progress-modal-card.progress-photo-viewer-modal .modal-body{
  flex:1 1 auto;
  min-height:0;
  padding:.5rem;
  overflow:auto;
}
.progress-photo-viewer-stage{
  min-height:0;
  height:100%;
  display:grid;
  place-items:center;
}
.progress-photo-viewer-stage img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:calc(100vh - 120px);
  object-fit:contain;
}
.progress-photo-compare{
  display:grid;
  gap:.55rem;
}
.progress-photo-compare-angle-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.progress-photo-compare-selects{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.65rem;
}
.progress-photo-compare-selects label{
  display:grid;
  gap:.4rem;
}
.progress-photo-compare-grid{
  display:flex;
  gap:0;
  align-items:flex-start;
  justify-content:center;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  overflow:hidden;
  min-height:0;
}
.progress-photo-compare-pane{
  display:flex;
  gap:0;
  min-width:0;
  flex:0 0 auto;
  width:auto;
  margin:0;
  padding:0;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  align-items:flex-start;
  justify-content:flex-start;
}
.progress-photo-compare-pane-head{
  display:none;
}
.progress-photo-compare-frame{
  min-height:0;
  display:flex;
  gap:0;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  align-items:flex-start;
  justify-content:flex-start;
  width:auto;
}
.progress-photo-compare-image-wrap{
  margin:0;
  display:block;
  position: relative;
  gap:0;
  min-width:0;
  width:auto;
  max-width:none;
  height:auto;
  overflow:hidden;
  touch-action:none;
}
.progress-photo-compare-zoom-controls{
  position: absolute;
  left: .55rem;
  right: .55rem;
  bottom: .55rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.6rem;
  margin-top:0;
  z-index: 12;
  background: transparent !important;
  pointer-events: auto;
  touch-action: manipulation;
}
.progress-photo-compare-zoom-controls label{
  display:flex;
  align-items:center;
  gap:.45rem;
  font-size:.8rem;
  color:var(--muted);
  background: transparent !important;
}
.progress-photo-compare-zoom-controls input[type="range"]{
  width:124px;
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-x;
}
.progress-photo-compare-zoom-controls input[type="range"]::-webkit-slider-runnable-track{
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.progress-photo-compare-zoom-controls input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.95);
}
.progress-photo-compare-zoom-controls input[type="range"]::-moz-range-track{
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.progress-photo-compare-zoom-controls input[type="range"]::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.95);
}
.progress-photo-compare-image-wrap[role="button"]{
  cursor:pointer;
  outline:none;
  -webkit-tap-highlight-color:transparent;
}
.progress-photo-compare-image-wrap.is-zoomed{
  cursor: grab;
}
.progress-photo-compare-image-wrap.is-zoomed:active{
  cursor: grabbing;
}
.progress-photo-compare-image-wrap[role="button"]:hover,
.progress-photo-compare-image-wrap[role="button"]:focus,
.progress-photo-compare-image-wrap[role="button"]:focus-visible,
.progress-photo-compare-image-wrap[role="button"]:active{
  outline:none;
  box-shadow:none;
  background:transparent;
}
.progress-photo-compare-image-wrap img{
  position: relative;
  z-index: 1;
  display:block;
  user-select: none;
  -webkit-user-drag: none;
  width:auto;
  height:auto;
  max-width:calc((100vw - 4rem) / 2);
  max-height:calc(100vh - 220px);
  aspect-ratio:auto;
  border-radius:0;
  border:0;
  background:transparent;
  object-fit:contain;
  transform-origin:center center;
  transition:transform .12s ease-out;
  will-change:transform;
}
/* Chart tokens live on both shells: the PB trend modal drives the same shared
   renderer but is not a .progress-chart-shell, so without this its stroke and
   fill fell back to the inherited initial (black).
   --accent tints the area gradient and point halo; --line is the brighter
   stroke, which keeps the line reading clearly against its own fill
   (4.99:1 on the shell surface, vs 4.18:1 for the accent). */
.progress-chart-shell,
.history-pb-trend-chart-shell{
  --progress-chart-accent:#659306;
  --progress-chart-line:#6ea103;
}
.progress-chart-shell{
  position:relative;
  padding:.5rem .25rem .25rem;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(19,22,20,.66), rgba(17,20,17,.4));
  overflow:hidden;
}
.progress-chart{
  width:100%;
  height:auto;
  display:block;
  touch-action:pan-y;
}
/* On phones the chart runs to the card edges so the plot gets the full screen
   width instead of losing it to the section gutter. */
@media (max-width: 560px){
  .progress-section > .progress-chart-shell{
    margin-inline:-1.2rem;
    width:auto;
    padding-inline:0;
    border-radius:0;
  }
}
.progress-chart-grid{
  stroke:color-mix(in srgb, var(--muted) 22%, transparent);
  stroke-width:1;
  stroke-dasharray:2 5;
}
.progress-chart-goal-line{
  stroke:#facc15;
  stroke-width:2;
  stroke-dasharray:8 6;
  opacity:0;
  transition:opacity .55s ease .35s;
}
.progress-chart-shell.is-animated .progress-chart-goal-line{ opacity:1; }
.progress-chart-goal-line.is-visible{ opacity:1; }
.progress-chart-goal-label{
  fill:#facc15;
  font-size:11px;
  font-weight:700;
}
.progress-chart-area{
  fill:var(--progress-chart-accent);
  opacity:0;
  transition:opacity .9s ease .15s;
}
.progress-chart-shell.is-animated .progress-chart-area{ opacity:1; }
.progress-chart-area.is-visible{ opacity:1; }
.progress-chart-path{
  fill:none;
  stroke:var(--progress-chart-line);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 3px 8px color-mix(in srgb, var(--progress-chart-line) 38%, transparent));
  transition:stroke-dashoffset 1.15s cubic-bezier(.4,.05,.2,1);
}
/* Visible by default; the reveal animation hides each point only while it
   plays ("both" fill). Where animations are switched off (coach accounts turn
   them off inside cards), the points still show instead of staying at 0. */
.progress-chart-point-group{
  transform-box:fill-box;
  transform-origin:center;
}
.progress-chart-shell.is-animated .progress-chart-point-group,
.history-pb-trend-chart-shell.is-animated .progress-chart-point-group{
  animation:progressPointIn .5s cubic-bezier(.34,1.56,.64,1) both;
  animation-delay:calc(.55s + var(--i, 0) * .06s);
}
@keyframes progressPointIn{
  0%{ opacity:0; transform:translateY(6px) scale(.4); }
  100%{ opacity:1; transform:none; }
}
.progress-chart-point-halo{
  fill:color-mix(in srgb, var(--progress-chart-accent) 20%, transparent);
  opacity:0;
  transition:opacity .18s ease;
  pointer-events:none;
}
.progress-chart-point-group:hover .progress-chart-point-halo,
.progress-chart-point-group:focus-within .progress-chart-point-halo{ opacity:1; }
.progress-chart-shell.is-animated .progress-chart-point-group.is-last .progress-chart-point-halo,
.history-pb-trend-chart-shell.is-animated .progress-chart-point-group.is-last .progress-chart-point-halo{
  opacity:1;
  animation:progressLastPulse 2.6s ease-in-out 1.5s infinite;
}
@keyframes progressLastPulse{
  0%,100%{ opacity:.16; r:11; }
  50%{ opacity:.34; r:15; }
}
.progress-chart-point{
  fill:var(--progress-chart-line);
  stroke:var(--card);
  stroke-width:2;
  cursor:pointer;
  transition:r .15s ease;
}
/* A personal best is marked, not drawn into the line's shape. Amber filled
   against a ring of the card colour, so it reads as a marker on the line in
   either theme rather than a thicker dot. */
.progress-chart-point.is-pb{
  fill:#facc15;
  stroke:var(--card);
  stroke-width:2.5;
  r:5.5;
}
.progress-chart-point.is-pb.is-latest,
.progress-chart-point.is-pb.is-active{
  r:6.5;
}
.progress-chart-point.is-latest,
.progress-chart-point.is-active{
  r:5.5;
}
/* Hidden until a point is selected. This must be a class: the renderer used to
   rely on the hidden attribute, which does nothing on an SVG element, so the
   crosshair was permanently visible. */
.progress-chart-guide{
  stroke:color-mix(in srgb, var(--muted) 58%, transparent);
  stroke-width:1;
  stroke-dasharray:3 4;
  pointer-events:none;
  visibility:hidden;
}
.progress-chart-guide.is-visible{
  visibility:visible;
}
.progress-chart-point-group:hover .progress-chart-point,
.progress-chart-point-group:focus-within .progress-chart-point{ r:6; }
/* Note: progress-chart reveal animation is intentionally played for all users
   (reduce-motion not honoured here) — kept in sync with the JS guard. */
.progress-chart-axis-label{
  fill:#81b430;
  font-size:12px;
}
.progress-chart-shell.is-compact .progress-chart-axis-label,
.history-pb-trend-chart-shell.is-compact .progress-chart-axis-label{
  font-size:11px;
}
.progress-chart-tooltip{
  position:absolute;
  display:grid;
  gap:.1rem;
  min-width:96px;
  max-width:calc(100% - 12px);
  padding:.45rem .6rem;
  border-radius:12px;
  background:rgba(11,13,11,.94);
  border:1px solid rgba(113,157,44,.24);
  color:#f8fbff;
  text-align:left;
  pointer-events:none;
  z-index:6;
  box-shadow:none!important;
}
.progress-chart-tooltip[hidden]{ display:none; }
.progress-chart-tooltip strong{
  font-size:.9rem;
  line-height:1.2;
}
.progress-chart-tooltip span{
  font-size:.74rem;
  line-height:1.3;
  color:rgba(229,233,229,.9);
  overflow-wrap:anywhere;
}
.progress-chart-tooltip span.is-pb,
.history-pb-trend-tooltip span.is-pb{
  color:#facc15;
  font-weight:700;
}
.progress-weight-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  margin:.25rem 0 1rem;
}
.progress-weight-hero > div{
  display:grid;
  gap:.15rem;
}
.progress-weight-hero strong{
  font-size:clamp(2rem, 4vw, 3rem);
  line-height:1;
  letter-spacing:0;
}
.progress-weight-hero strong small{
  font-size:.45em;
  color:var(--muted);
}
.progress-weight-delta{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}
.progress-weight-delta.is-down{ color:#22c55e; }
.progress-weight-delta.is-up{ color:#f59e0b; }
.progress-weight-delta .nav-icon-lucide{ width:1rem; height:1rem; }
.progress-weight-log{
  margin-top:1.25rem;
  padding-top:1rem;
  border-top:1px solid var(--border);
}
.progress-weight-entry-list{ display:grid; }
.progress-weight-entry-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:.5rem;
  min-height:48px;
  border-bottom:1px solid var(--border);
}
.progress-weight-entry-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  min-width:0;
  padding:.7rem .15rem;
  border:0;
  background:transparent;
  color:var(--ink);
  text-align:left;
  cursor:pointer;
}
.progress-weight-entry-main span{ color:var(--muted); }
.progress-weight-entry-main strong{ white-space:nowrap; }
.progress-weight-entry-row form{ margin:0; }
.progress-weight-entry-row .progress-entry-icon-action{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
}
.progress-weight-modal-card .modal-body{
  max-height:min(72dvh, 680px);
  overflow:auto;
}
.progress-pb-metric-toggle,
.progress-chart-range{
  display:flex;
  gap:.5rem;
  margin:0 0 .75rem;
}
.progress-pb-metric-toggle[hidden]{ display:none; }
.progress-pb-metric-toggle .pill-link,
.progress-chart-range .pill-link{
  flex:0 1 auto;
  min-height:38px;
}
/* Time range presets sit in one row above the chart they scope. */
.progress-chart-range{
  flex-wrap:wrap;
  margin-bottom:.5rem;
}
.progress-chart-range .pill-link{
  min-width:48px;
  padding-inline:.7rem;
  justify-content:center;
}
.progress-empty-state{
  min-height:200px;
  border:1px dashed rgba(119,167,44,.24);
  border-radius:18px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#c2c6c3;
  padding:1rem;
}
.progress-empty-state.compact{
  min-height:120px;
}
.progress-entries{
  display:grid;
  gap:.85rem;
}
.progress-entry-table{
  display:grid;
  gap:.55rem;
}
.progress-entry-table--measurements{
  gap:.85rem;
}
.progress-entry-row{
  display:grid;
  grid-template-columns:140px 100px 120px minmax(0,1fr);
  gap:.9rem;
  align-items:start;
  padding:.8rem .95rem;
  border-radius:16px;
  background:rgba(25,28,26,.8);
  border:1px solid rgba(118,165,41,.12);
}
.progress-entry-row--with-actions{
  grid-template-columns:140px 100px 120px minmax(0,1fr) auto;
}
.progress-entry-row--head{
  background:transparent;
  border:none;
  color:#81b430;
  font-size:.86rem;
  padding:0 .2rem;
}
.progress-entry-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
}
.progress-entry-actions form{
  margin:0;
}
.progress-entry-action-btn{
  min-height:40px;
}
.progress-entry-icon-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.2rem;
  height:1.2rem;
  color:#81b430;
  cursor:pointer;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  appearance:none;
  box-shadow:none;
  filter:none;
  transition:color .18s ease, opacity .18s ease;
}
.progress-entry-icon-action .nav-icon-lucide{
  width:1rem;
  height:1rem;
}
.progress-entry-icon-action:hover,
.progress-entry-icon-action:focus-visible{
  outline:none;
  color:#e0e4e0;
}
.progress-entry-icon-action--edit{
  color:#d08a18;
}
.progress-entry-icon-action--edit:hover,
.progress-entry-icon-action--edit:focus-visible{
  color:#f0af39;
}
.progress-entry-icon-action--delete{
  color:#ef7a80;
}
.progress-entry-icon-action--delete:hover,
.progress-entry-icon-action--delete:focus-visible{
  color:#ff9ba1;
}
.progress-measurements-layout{
  display:grid;
  grid-template-columns:minmax(320px, 480px) minmax(260px, 1fr);
  gap:1rem;
  align-items:start;
}
.progress-measurements-figure,
.progress-measurements-current,
.progress-measurements-form,
.progress-measurement-trend{
  background:rgba(28,30,28,.78);
  border:1px solid rgba(120,168,45,.18);
  border-radius:22px;
}
.progress-measurements-figure,
.progress-measurement-trend{
  padding:1rem;
  position:relative;
  overflow:hidden;
}
.progress-measurement-figure-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.85rem;
}
.progress-measurement-map{
  position:relative;
  width:100%;
  max-width:460px;
  min-height:540px;
  aspect-ratio:460 / 560;
  margin:0 auto;
  overflow:hidden;
  --measurement-side-padding: clamp(1rem, 4.6%, 1.35rem);
  --measurement-column-width: clamp(122px, 26%, 154px);
}
.measurement-guide-image{
  position:absolute;
  inset:2% 0 0;
  width:100%;
  height:96%;
  object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 16px 28px rgba(22,25,22,.1));
}
.measurement-guide-image--female{
  display:none;
}
[data-measurement-gender="female"] .measurement-guide-image--male{
  display:none;
}
[data-measurement-gender="female"] .measurement-guide-image--female{
  display:block;
}
.measurement-region{
  position:absolute;
  left:var(--x);
  top:var(--y);
  width:var(--w);
  height:var(--h);
  transform:translate(-50%, -50%);
  cursor:pointer;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  appearance:none;
  transition:opacity .18s ease;
  opacity:0;
  z-index:2;
}
.measurement-region.is-selected{
  opacity:0;
}
.measurement-label-column{
  position:absolute;
  top:0;
  bottom:0;
  width:var(--measurement-column-width);
  pointer-events:none;
  z-index:3;
}
.measurement-label-column--left{
  left:var(--measurement-side-padding);
}
.measurement-label-column--right{
  right:var(--measurement-side-padding);
}
.measurement-label{
  position:absolute;
  top:var(--row-y);
  transform:translateY(-50%);
  inset-inline:0;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  appearance:none;
  cursor:pointer;
  pointer-events:auto;
  z-index:3;
  min-width:0;
}
.measurement-label--left{
  text-align:right;
}
.measurement-label--right{
  text-align:left;
}
.measurement-label-text{
  display:inline-flex;
  align-items:center;
  gap:.28rem;
  flex-wrap:nowrap;
  color:#8ec633;
  font-size:13px;
  font-weight:700;
  line-height:1.15;
  min-width:0;
  max-width:100%;
}
.measurement-label--left .measurement-label-text{
  justify-content:flex-end;
  margin-left:auto;
}
.measurement-label--right .measurement-label-text{
  justify-content:flex-start;
  margin-right:auto;
}
.measurement-label-name,
.measurement-label-value-text{
  white-space:nowrap;
  max-width:100%;
}
.measurement-label-name{
  color:inherit;
}
.measurement-label-value-text{
  color:#c5c9c6;
  font-weight:700;
}
.measurement-label.is-selected .measurement-label-text{
  color:#e6eae7;
}
.measurement-label.is-selected .measurement-label-value-text{
  color:#eff3ef;
}
.measurement-label:focus-visible{
  outline:none;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only .settings-logout-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only a[role="button"].secondary.settings-logout-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] a.small.secondary.settings-logout-btn{
  border-color: rgba(248,113,113,.42) !important;
  color: var(--ui-btn-fg) !important;
  background: var(--ui-btn-bg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only .settings-logout-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only .settings-logout-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only .settings-logout-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.mobile-only .settings-logout-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] a.small.secondary.settings-logout-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a.small.secondary.settings-logout-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a.small.secondary.settings-logout-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a.small.secondary.settings-logout-btn:active{
  border-color: rgba(248,113,113,.56) !important;
  color: var(--ui-btn-fg) !important;
  background: var(--ui-btn-hover-bg) !important;
  box-shadow: none !important;
}

.progress-measurements-side{
  display:grid;
  gap:1rem;
}
.progress-measurements-current{
  padding:1rem 1.1rem;
  display:grid;
  gap:.6rem;
}
.progress-measurements-headline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.progress-measurement-value{
  font-size:1.4rem;
  font-weight:800;
  color:#f0f4f1;
}
.progress-measurements-form{
  padding:1rem 1.1rem;
}
.progress-measurement-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
}
.progress-measurement-help{
  margin:.1rem 0 0;
  padding-left:1rem;
  display:grid;
  gap:.45rem;
  color:#8ec633;
}
.progress-measurement-help li{
  margin:0;
}
.subtle-edit-btn,
button.subtle-edit-btn,
a.subtle-edit-btn,
span.subtle-edit-btn{
  border-color:rgba(202,138,4,.42) !important;
  background:linear-gradient(180deg, rgba(250,204,21,.16), rgba(202,138,4,.12)) !important;
  color:#854d0e !important;
  box-shadow:none !important;
}
.subtle-edit-btn:hover,
.subtle-edit-btn:focus-visible,
button.subtle-edit-btn:hover,
button.subtle-edit-btn:focus-visible,
a.subtle-edit-btn:hover,
a.subtle-edit-btn:focus-visible,
span.subtle-edit-btn:hover,
span.subtle-edit-btn:focus-visible{
  border-color:rgba(202,138,4,.48) !important;
  background:linear-gradient(180deg, rgba(250,204,21,.2), rgba(202,138,4,.15)) !important;
  color:#713f12 !important;
  box-shadow:none !important;
}

.progress-measurement-actions .progress-measurements-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-width:14rem;
  min-height:44px;
  padding:.62rem 1.35rem;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  outline:none !important;
  background:var(--card) !important;
  box-shadow:none !important;
  color:var(--text) !important;
  cursor:pointer;
  user-select:none;
  transform:translateY(0);
  transition:transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}

@media (max-width: 640px){
  .progress-measurement-actions .progress-measurements-cta{
    min-width:15rem;
    padding:.65rem 1.55rem;
  }
}

.progress-measurement-actions .progress-measurements-cta .nav-icon-lucide,
.progress-measurement-actions .progress-measurements-cta > span:last-child{
  transform:translateY(0);
  transition:transform .18s ease, color .18s ease;
}

.progress-measurement-actions .progress-measurements-cta:hover,
.progress-measurement-actions .progress-measurements-cta:focus,
.progress-measurement-actions .progress-measurements-cta:focus-visible{
  background:var(--panel) !important;
  border-color:var(--accent) !important;
  box-shadow:none !important;
  outline:none !important;
  color:var(--text) !important;
  transform:translateY(-1px);
}

.progress-measurement-actions .progress-measurements-cta:hover .nav-icon-lucide,
.progress-measurement-actions .progress-measurements-cta:focus .nav-icon-lucide,
.progress-measurement-actions .progress-measurements-cta:focus-visible .nav-icon-lucide,
.progress-measurement-actions .progress-measurements-cta:hover > span:last-child,
.progress-measurement-actions .progress-measurements-cta:focus > span:last-child,
.progress-measurement-actions .progress-measurements-cta:focus-visible > span:last-child{
  transform:translateY(-1px);
}

html[data-theme="dark"] .progress-measurement-actions .progress-measurements-cta{
  color:var(--text) !important;
}

html[data-theme="dark"] .progress-measurement-actions .progress-measurements-cta:hover,
html[data-theme="dark"] .progress-measurement-actions .progress-measurements-cta:focus,
html[data-theme="dark"] .progress-measurement-actions .progress-measurements-cta:focus-visible{
  color:var(--text) !important;
}
.progress-measurement-modal-card{
  width:min(560px, calc(100vw - 2rem));
  max-width:100%;
  box-sizing:border-box;
}
.progress-measurement-modal-current{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem 1rem;
  border-radius:18px;
  border:1px solid rgba(120,168,45,.18);
  background:rgba(28,30,28,.58);
}
.progress-measurement-modal-current strong{
  font-size:1.25rem;
  font-weight:800;
  color:#f0f4f1;
}
.progress-entry-row--measurements{
  grid-template-columns:140px minmax(0,1.5fr) 120px minmax(0,1fr);
}
.progress-entry-row--measurements.progress-entry-row--with-actions{
  grid-template-columns:140px minmax(0,1.5fr) 120px minmax(0,1fr) auto;
}
.progress-modal-card{
  --progress-modal-desktop-max:520px;
  width:min(520px, calc(100vw - 2rem));
}
.progress-modal{
  z-index:5200;
}
.progress-modal .modal-backdrop{
  background:rgba(9,11,9,.72);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  z-index:0;
}
.progress-modal .modal-card,
.progress-modal .modal-body,
.progress-modal .progress-form-grid,
.progress-modal .modal-actions{
  position:relative;
  z-index:2;
  pointer-events:auto;
}
.progress-modal .modal-card,
.progress-modal .modal-body,
.progress-modal .progress-form-grid,
.progress-modal .progress-form-grid label{
  min-width:0;
  box-sizing:border-box;
}
.progress-form-grid{
  display:grid;
  gap:1rem;
  min-width:0;
}
.progress-form-grid label{
  display:grid;
  gap:.45rem;
  min-width:0;
}
.progress-form-grid label.full{
  grid-column:1 / -1;
}
.progress-modal .modal-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:.8rem;
  margin-top:.35rem;
}
.progress-modal .progress-form-grid input:not([type="hidden"]),
.progress-modal .progress-form-grid textarea,
.progress-modal .progress-form-grid select{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  display:block;
}
.progress-body-fat-comparison-modal{
  --progress-modal-desktop-max:780px;
  width:min(780px, calc(100vw - 2rem));
  max-height:calc(100vh - 2rem);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.progress-body-fat-comparison-modal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.progress-body-fat-comparison-card{
  display:grid;
  gap:.85rem;
}
.progress-body-fat-comparison-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.progress-body-fat-comparison-figure{
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(120,168,45,.18);
  background:rgba(255,255,255,.94);
  padding:0;
}
.progress-body-fat-comparison-image{
  display:block;
  width:100%;
  height:auto;
}
.progress-body-fat-comparison-image--female,
.progress-body-fat-comparison-image--neutral{
  display:none;
}
[data-body-fat-comparison][data-gender="female"] .progress-body-fat-comparison-image--male{
  display:none;
}
[data-body-fat-comparison][data-gender="female"] .progress-body-fat-comparison-image--female{
  display:block;
}
[data-body-fat-comparison][data-gender="neutral"] .progress-body-fat-comparison-image--male,
[data-body-fat-comparison][data-gender="neutral"] .progress-body-fat-comparison-image--female{
  display:none;
}
[data-body-fat-comparison][data-gender="neutral"] .progress-body-fat-comparison-image--neutral{
  display:block;
}
.progress-page-head{
  margin-bottom:1rem;
}
.progress-page-nav{
  display:flex;
  gap:.6rem;
}
html:not([data-theme="dark"]) .progress-shell{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,247,.98));
  border-color:rgba(201,205,201,.72);
}
html:not([data-theme="dark"]) .progress-summary-card,
html:not([data-theme="dark"]) .progress-section{
  background:rgba(252,253,255,.96);
  border-color:rgba(213,217,213,.78);
}
html:not([data-theme="dark"]) .progress-summary-kicker,
html:not([data-theme="dark"]) .progress-chart-axis-label,
html:not([data-theme="dark"]) .progress-entry-row--head{
  color:#597d20;
}
html:not([data-theme="dark"]) .progress-metric-strip div,
html:not([data-theme="dark"]) .progress-current-pill,
html:not([data-theme="dark"]) .progress-entry-row{
  background:#f7faff;
  border-color:#dde1dd;
}
html:not([data-theme="dark"]) .progress-photo-summary-card,
html:not([data-theme="dark"]) .progress-photo-date-card,
html:not([data-theme="dark"]) .progress-photo-tile,
html:not([data-theme="dark"]) .progress-photo-upload-field{
  background:#f7faff;
  border-color:#dde1dd;
}
html:not([data-theme="dark"]) .progress-photo-upload-trigger{
  background:rgba(151,211,55,.12);
  border-color:rgba(151,211,55,.22);
  color:#364d10;
}
html:not([data-theme="dark"]) .progress-photo-upload-slot-status{
  color:#597d20;
}
html:not([data-theme="dark"]) .progress-photo-upload-slot-status.is-filled{
  color:#364d10;
}
html:not([data-theme="dark"]) .progress-photo-angle-badge{
  color:#364d10;
}
html:not([data-theme="dark"]) .progress-photo-icon-action{
  color:#597d20;
}
html:not([data-theme="dark"]) .progress-photo-icon-action:hover,
html:not([data-theme="dark"]) .progress-photo-icon-action:focus-visible{
  color:#161916;
}
html:not([data-theme="dark"]) .progress-photo-delete-btn{
  color:#b91c1c;
}
html:not([data-theme="dark"]) .progress-photo-edit-btn{
  color:#b45309;
}
html:not([data-theme="dark"]) .progress-photo-frame,
html:not([data-theme="dark"]) .progress-photo-compare-image-wrap img{
  background:#f1f5f1;
  border-color:#dde1dd;
}
html:not([data-theme="dark"]) .progress-photo-notes,
html:not([data-theme="dark"]) .progress-photo-compare-notes{
  color:#525552;
}
html:not([data-theme="dark"]) .progress-photo-compare-caption{
  color:#597d20;
}
html:not([data-theme="dark"]) .progress-chart-shell{
  background:linear-gradient(180deg, rgba(245,249,246,.96), rgba(241,245,242,.92));
}
html:not([data-theme="dark"]) .progress-chart-tooltip{
  background:#161916;
  border-color:#d1d5d2;
  color:#f8fafc;
}
html:not([data-theme="dark"]) .progress-measurements-figure,
html:not([data-theme="dark"]) .progress-measurements-current,
html:not([data-theme="dark"]) .progress-measurements-form,
html:not([data-theme="dark"]) .progress-measurement-trend{
  background:#f7faff;
  border-color:#dde1dd;
}
html:not([data-theme="dark"]) .progress-measurement-help{
  color:#616461;
}
html:not([data-theme="dark"]) .measurement-label-text{
  color:#616461;
}
html:not([data-theme="dark"]) .progress-measurement-value{
  color:#161916;
}
html:not([data-theme="dark"]) .subtle-edit-btn,
html:not([data-theme="dark"]) button.subtle-edit-btn,
html:not([data-theme="dark"]) a.subtle-edit-btn{
  color:#854d0e !important;
  border-color:rgba(202,138,4,.34) !important;
  background:linear-gradient(180deg, rgba(250,204,21,.15), rgba(234,179,8,.08)) !important;
}
html:not([data-theme="dark"]) .progress-measurement-modal-current{
  background:#f7faff;
  border-color:#dde1dd;
}
html:not([data-theme="dark"]) .progress-measurement-modal-current strong{
  color:#161916;
}
html:not([data-theme="dark"]) .progress-body-fat-comparison-marker-label{
  color:#166534;
}
html[data-theme="dark"] .progress-body-fat-comparison-figure{
  background:rgba(255,255,255,.96);
}
@media (min-width: 761px){
  body.app[data-desktop-sidebar="1"]{
    --progress-modal-sidebar-width:220px;
  }
  body.app[data-desktop-sidebar="1"].sidebar-collapsed{
    --progress-modal-sidebar-width:72px;
  }
  body.app[data-desktop-sidebar="1"] .progress-modal{
    left:var(--progress-modal-sidebar-width, 220px);
    width:calc(100vw - var(--progress-modal-sidebar-width, 220px));
  }
  body.app[data-desktop-sidebar="1"] .progress-modal-card,
  body.app[data-desktop-sidebar="1"] .progress-photo-upload-progress-card{
    max-width:min(var(--progress-modal-desktop-max, 520px), calc(100vw - var(--progress-modal-sidebar-width, 220px) - 2rem));
    margin-left:auto;
    margin-right:auto;
  }
}
@media (max-width: 1100px){
  .progress-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .progress-metric-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .progress-photo-angle-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .progress-measurements-layout{
    grid-template-columns:1fr;
  }
  .progress-measurement-map{
    min-height:510px;
    --measurement-side-padding: clamp(.85rem, 4.2%, 1.1rem);
    --measurement-column-width: clamp(110px, 24%, 136px);
  }
  .measurement-label-text{
    font-size:12px;
    gap:.22rem;
  }
}
@media (max-width: 760px){
  .progress-modal.is-open{
    align-items:flex-start;
    padding-top:max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem));
    padding-bottom:.25rem;
    overflow:auto;
  }
  .progress-head,
  .progress-section-head{
    flex-direction:column;
  }
  .progress-range-filter{
    justify-content:flex-start;
  }
  .progress-summary-grid,
  .progress-metric-strip{
    grid-template-columns:1fr;
  }
  .progress-chart-shell{
    padding:.45rem .35rem .35rem;
    overflow:hidden;
  }
  .progress-chart{
    width:100%;
    min-width:0;
    height:auto;
  }
  .progress-measurement-modal-card,
  .progress-modal-card{
    width:min(100vw - 1rem, 560px);
    max-width:calc(100vw - 1rem);
    margin:0 auto;
  }
  .progress-modal-card.progress-photo-compare-modal{
    margin-top:0;
    max-height:calc(100dvh - max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) - .25rem);
  }
  .progress-modal-card.progress-photo-viewer-modal{
    width:calc(100vw - .5rem);
    max-width:calc(100vw - .5rem);
    max-height:calc(100dvh - max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) - .25rem);
    margin-top:0;
  }
  .progress-body-fat-comparison-modal{
    margin-top:max(.75rem, env(safe-area-inset-top));
    max-height:calc(100dvh - max(1.5rem, env(safe-area-inset-top)) - 1rem);
  }
  .progress-modal .modal-header{
    gap:.75rem;
    align-items:flex-start;
  }
  .progress-modal .modal-header > div{
    min-width:0;
  }
  .progress-modal .modal-body{
    padding: .9rem;
    overflow-x:hidden;
  }
  .progress-measurement-modal-current{
    padding:.8rem .85rem;
    min-width:0;
  }
  .progress-measurement-modal-current strong{
    min-width:0;
    overflow-wrap:anywhere;
  }
  .progress-form-grid{
    gap:.85rem;
  }
  .progress-form-grid label,
  .progress-modal .modal-actions{
    width:100%;
  }
  .progress-form-grid input[type="date"],
  .progress-form-grid input[type="number"],
  .progress-form-grid textarea{
    font-size:16px;
  }
  .progress-modal .modal-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:.65rem;
  }
  .progress-modal .modal-actions > *{
    width:100%;
    min-width:0;
  }
  .progress-measurement-map{
    min-height:0;
    width:min(100%, 420px);
    aspect-ratio:460 / 560;
    max-width:100%;
    --measurement-side-padding: .65rem;
    --measurement-column-width: clamp(98px, 23%, 124px);
  }
  .measurement-label-text{
    font-size:10.5px;
    line-height:1.05;
    gap:.16rem;
    flex-wrap:nowrap;
  }
  .measurement-label-name,
  .measurement-label-value-text{
    white-space:nowrap;
  }
  .progress-section-actions,
  .progress-page-nav{
    width:100%;
    flex-wrap:wrap;
  }
  /* The tab row keeps scrolling instead of wrapping at this width. */
  .progress-subtabs{
    width:100%;
    flex-wrap:nowrap;
  }
  .progress-photo-summary-grid,
  .progress-photo-angle-grid,
  .progress-photo-upload-grid,
  .progress-photo-compare-selects{
    grid-template-columns:1fr;
  }
  .progress-photo-compare-grid{
    display:flex;
    gap:0;
    padding:0;
    border-radius:0;
    background:transparent;
    border:0;
    box-shadow:none;
  }
  .progress-photo-compare-grid.is-expanded{
    display:block;
  }
  .progress-photo-compare-pane.is-collapsed{
    display:none;
  }
  .progress-photo-compare-pane.is-expanded{
    grid-column:1 / -1;
  }
  .progress-photo-compare-pane{
    gap:0;
    width:100%;
    margin:0;
    padding:0;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    flex:1 1 50%;
  }
  .progress-photo-date-head,
  .progress-photo-compare-pane-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .progress-photo-compare-pane-head strong{
    font-size:1rem;
    line-height:1.15;
  }
  .progress-photo-compare-modal .modal-header{
    padding-top:.9rem;
    align-items:flex-start;
  }
  .progress-photo-compare-modal .modal-header strong{
    display:block;
    line-height:1.15;
  }
  .progress-photo-tile-actions{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .progress-photo-compare-frame{
    min-height:300px;
    align-items:stretch;
  }
  .progress-photo-compare-pane.is-expanded .progress-photo-compare-frame{
    min-height:72vh;
  }
  .progress-photo-compare-image-wrap{
    width:100%;
    height:100%;
  }
  .progress-photo-compare-image-wrap img{
    width:100%;
    height:100%;
    aspect-ratio:9 / 14;
    object-fit:cover;
    border-radius:0;
    border:0;
  }
  .progress-modal-card.progress-photo-viewer-modal .modal-body{
    padding:.25rem;
  }
  .progress-photo-viewer-stage img{
    width:100%;
    max-width:100%;
    max-height:calc(100dvh - max(5.6rem, calc(env(safe-area-inset-top) + 4.6rem)) - 1.5rem);
  }
  .progress-photo-upload-trigger{
    width:2.35rem;
    height:2.35rem;
  }
  .progress-photo-upload-modal,
  .progress-photo-compare-modal,
  .progress-photo-upload-progress-card{
    width:min(100vw - 1rem, 760px);
    max-width:calc(100vw - 1rem);
  }
  .progress-photo-summary-card strong{
    font-size:1.25rem;
  }
  .history-cal-head > .page-actions,
  .page-head > .page-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }
  .history-cal-head > .page-actions.history-month-nav{
    width:auto;
    display:flex;
    grid-template-columns:none;
    flex-wrap:nowrap;
    gap:.45rem;
  }
  .history-cal-head > .page-actions .history-page-action-btn,
  .history-cal-head > .page-actions .history-checkin-btn,
  .page-head > .page-actions .history-page-action-btn,
  .page-head > .page-actions .history-checkin-btn{
    width:100%;
    min-width:0;
    justify-content:center;
    min-height:2.45rem;
    padding:.58rem .8rem;
    font-size:.9rem;
    white-space:nowrap;
  }
  .progress-subtabs{
    flex-direction:row;
    gap:.45rem;
  }
  .progress-subtabs > *{
    flex:0 0 auto;
    min-height:2.35rem;
    padding:.55rem .8rem;
    font-size:.88rem;
    border-radius:13px !important;
  }
  .progress-subtab-btn .nav-icon-lucide{
    width:.9rem;
    height:.9rem;
  }
  .settings-page-head{
    align-items:flex-start;
  }
  .settings-page-head > .settings-head-actions{
    width:auto;
    margin-left:auto;
    display:flex;
    grid-template-columns:none;
    flex-wrap:nowrap;
    justify-content:flex-end;
    align-self:flex-start;
  }
  .settings-page-head > .settings-head-actions .settings-logout-btn,
  .settings-page-head > .settings-head-actions .small{
    width:auto;
    min-width:0;
    justify-content:center;
  }
  .progress-section-actions > *,
  .progress-page-nav > *{
    flex:1 1 180px;
  }
  .progress-section-actions > *,
  .progress-page-nav > *{
    min-height:2.45rem;
    padding:.58rem .9rem;
    font-size:.9rem;
  }
  .progress-entry-row{
    grid-template-columns:1fr 1fr;
  }
  .progress-entry-row--with-actions,
  .progress-entry-row--measurements.progress-entry-row--with-actions{
    grid-template-columns:1fr 1fr;
  }
  .progress-entry-row--measurements{
    grid-template-columns:1fr;
  }
  .progress-entry-row span:nth-child(4){
    grid-column:1 / -1;
  }
  .progress-entry-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .progress-measurement-modal-current{
    flex-direction:column;
    align-items:flex-start;
  }
  .progress-measurement-figure-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .progress-body-fat-comparison-head{
    flex-direction:column;
  }
}
@media (max-width: 820px){
  body.app[data-authenticated="1"] .progress-modal.progress-mobile-shell{
    inset: var(--appbar-height, 72px) 0 var(--mobile-nav-height, calc(78px + env(safe-area-inset-bottom, 0px))) 0;
    z-index: 8;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow: hidden;
  }
  body.app[data-authenticated="1"] .progress-mobile-shell > .modal-card{
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }
  body.app[data-authenticated="1"] .progress-mobile-shell > .modal-card > .modal-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}
.messages-inbox-modern .messages-workspace-composer{
  position: relative;
  padding: .9rem 1rem 1rem;
}

.messages-inbox-modern .message-composer{
  display: grid;
  gap: .7rem;
  min-width: 0;
}

.messages-inbox-modern .composer-field{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .6rem;
  padding: .2rem 0 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}

.messages-inbox-modern .composer-plus,
.messages-inbox-modern .composer-mic,
.messages-inbox-modern .composer-send{
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent !important;
  color: #f8fafc;
  border-color: transparent !important;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 0;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  text-decoration: none;
  transform: translate3d(0, 0, 0);
  transition: transform .14s ease, color .14s ease, opacity .14s ease;
}

.messages-inbox-modern .composer-plus,
.messages-inbox-modern .composer-mic,
.messages-inbox-modern .composer-send,
.messages-inbox-modern .composer-plus:hover,
.messages-inbox-modern .composer-mic:hover,
.messages-inbox-modern .composer-send:hover,
.messages-inbox-modern .composer-plus:focus,
.messages-inbox-modern .composer-mic:focus,
.messages-inbox-modern .composer-send:focus,
.messages-inbox-modern .composer-plus:focus-visible,
.messages-inbox-modern .composer-mic:focus-visible,
.messages-inbox-modern .composer-send:focus-visible,
.messages-inbox-modern .composer-plus:active,
.messages-inbox-modern .composer-mic:active,
.messages-inbox-modern .composer-send:active{
  background-color: transparent !important;
  background-image: none !important;
  border-style: none !important;
  border-width: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.messages-inbox-modern .composer-plus:hover,
.messages-inbox-modern .composer-mic:hover,
.messages-inbox-modern .composer-send:hover,
.messages-inbox-modern .composer-plus:focus-visible,
.messages-inbox-modern .composer-mic:focus-visible,
.messages-inbox-modern .composer-send:focus-visible{
  background: transparent !important;
  outline: 0;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  transform: translate3d(0, -1px, 0) scale(1.03);
}

.messages-inbox-modern .composer-plus,
.messages-inbox-modern .composer-mic,
.messages-inbox-modern .composer-send,
.messages-inbox-modern .composer-plus:hover,
.messages-inbox-modern .composer-mic:hover,
.messages-inbox-modern .composer-send:hover,
.messages-inbox-modern .composer-plus:focus,
.messages-inbox-modern .composer-mic:focus,
.messages-inbox-modern .composer-send:focus,
.messages-inbox-modern .composer-plus:focus-visible,
.messages-inbox-modern .composer-mic:focus-visible,
.messages-inbox-modern .composer-send:focus-visible,
.messages-inbox-modern .composer-plus:active,
.messages-inbox-modern .composer-mic:active,
.messages-inbox-modern .composer-send:active{
  border-image: none !important;
  background-clip: border-box !important;
}

.messages-inbox-modern .composer-plus::before,
.messages-inbox-modern .composer-plus::after,
.messages-inbox-modern .composer-mic::before,
.messages-inbox-modern .composer-mic::after,
.messages-inbox-modern .composer-send::before,
.messages-inbox-modern .composer-send::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.messages-inbox-modern .composer-send{
  color: #f8fafc;
}

.messages-inbox-modern .composer-send:disabled{
  opacity: .55;
  cursor: wait;
}

.messages-inbox-modern .composer-plus:active,
.messages-inbox-modern .composer-mic:active,
.messages-inbox-modern .composer-send:active{
  transform: translate3d(0, 1px, 0) scale(.98);
}

.messages-inbox-modern .composer-plus .nav-icon-lucide,
.messages-inbox-modern .composer-mic .nav-icon-lucide,
.messages-inbox-modern .composer-send .nav-icon-lucide{
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2.05;
  color: inherit !important;
  stroke: currentColor !important;
}

.messages-inbox-modern .composer-plus::before,
.messages-inbox-modern .composer-plus::after,
.messages-inbox-modern .composer-mic::before,
.messages-inbox-modern .composer-mic::after,
.messages-inbox-modern .composer-send::before,
.messages-inbox-modern .composer-send::after{
  content: none !important;
  display: none !important;
}

.messages-inbox-modern .composer-plus.icon-btn,
.messages-inbox-modern .composer-mic.icon-btn,
.messages-inbox-modern .composer-send.icon-btn,
.messages-inbox-modern button.composer-plus,
.messages-inbox-modern button.composer-mic,
.messages-inbox-modern button.composer-send{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background-clip: padding-box !important;
  border-image: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  text-decoration: none !important;
}

.messages-inbox-modern .message-composer button.composer-plus,
.messages-inbox-modern .message-composer button.composer-mic,
.messages-inbox-modern .message-composer button.composer-send,
.messages-inbox-modern .message-composer button.composer-plus:hover,
.messages-inbox-modern .message-composer button.composer-mic:hover,
.messages-inbox-modern .message-composer button.composer-send:hover,
.messages-inbox-modern .message-composer button.composer-plus:focus,
.messages-inbox-modern .message-composer button.composer-mic:focus,
.messages-inbox-modern .message-composer button.composer-send:focus,
.messages-inbox-modern .message-composer button.composer-plus:focus-visible,
.messages-inbox-modern .message-composer button.composer-mic:focus-visible,
.messages-inbox-modern .message-composer button.composer-send:focus-visible,
.messages-inbox-modern .message-composer button.composer-plus:active,
.messages-inbox-modern .message-composer button.composer-mic:active,
.messages-inbox-modern .message-composer button.composer-send:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.messages-inbox-modern .message-composer button.composer-plus::before,
.messages-inbox-modern .message-composer button.composer-plus::after,
.messages-inbox-modern .message-composer button.composer-mic::before,
.messages-inbox-modern .message-composer button.composer-mic::after,
.messages-inbox-modern .message-composer button.composer-send::before,
.messages-inbox-modern .message-composer button.composer-send::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.messages-inbox-modern .composer-input-shell{
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 0;
  min-height: 3.1rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.messages-inbox-modern .messages-workspace-composer textarea{
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  max-height: 10rem;
  resize: none;
  padding: .78rem .4rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #f8fafc;
  font-size: 1rem;
}

.messages-inbox-modern .messages-workspace-composer textarea:focus{
  outline: none;
  box-shadow: none;
}

.messages-inbox-modern .messages-workspace-composer textarea::placeholder{
  color: rgba(159,163,160,.92);
}

.messages-inbox-modern .composer-attachment-menu{
  position: absolute;
  left: 0;
  bottom: calc(100% + .45rem);
  width: min(16.4rem, calc(100vw - 2rem));
  padding: .95rem 1rem .9rem;
  border-radius: 10px;
  border: 0;
  background: #2b2b2e;
  box-shadow: 0 16px 30px rgba(0,0,0,.34);
  z-index: 25;
}

.messages-inbox-modern .composer-attachment-menu-label{
  margin-bottom: .7rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a5a8a5;
}

.messages-inbox-modern .composer-attachment-option{
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .4rem 0;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  transition: transform .14s ease, opacity .14s ease, color .14s ease;
}

.messages-inbox-modern .composer-attachment-option:hover,
.messages-inbox-modern .composer-attachment-option:focus-visible{
  background: transparent;
  opacity: 1;
  transform: translate3d(0, -1px, 0);
  outline: none;
}

.messages-inbox-modern .composer-attachment-option:active{
  transform: translate3d(0, 1px, 0);
}

.messages-inbox-modern .composer-attachment-option-icon{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #f3f4f6;
  transform: translate3d(0, 0, 0);
  transition: transform .16s ease, color .16s ease;
}

.messages-inbox-modern .composer-attachment-option-copy{
  display: grid;
  gap: .1rem;
  max-width: none;
  opacity: 1;
  overflow: visible;
  white-space: nowrap;
  transform: translate3d(0, 0, 0);
  transition: transform .16s ease, color .16s ease;
  pointer-events: auto;
}

.messages-inbox-modern .composer-attachment-option-copy strong{
  font-size: .96rem;
  color: #f8fafc;
}

.messages-inbox-modern .composer-attachment-option-copy span{
  font-size: .8rem;
  color: #bbbfbc;
}

.messages-inbox-modern .composer-attachment-option:hover .composer-attachment-option-icon,
.messages-inbox-modern .composer-attachment-option:focus-visible .composer-attachment-option-icon{
  transform: translate3d(0, -1px, 0) scale(1.03);
}

.messages-inbox-modern .composer-attachment-option:hover .composer-attachment-option-copy,
.messages-inbox-modern .composer-attachment-option:focus-visible .composer-attachment-option-copy{
  transform: translate3d(0, -1px, 0) scale(1.02);
}

.messages-inbox-modern .composer-upload-preview{
  display: grid;
  gap: .45rem;
}

.messages-inbox-modern .composer-preview-chip{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .7rem;
  align-items: center;
  padding: .7rem .8rem;
  border-radius: 16px;
  border: 1px solid rgba(159,163,160,.14);
  background: rgba(22,25,22,.82);
}

.messages-inbox-modern .composer-preview-chip.is-voice{
  grid-template-columns: auto 1fr minmax(8rem, 12rem) auto;
}

.messages-inbox-modern .composer-preview-chip-icon{
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-inbox-modern .composer-preview-chip-copy{
  min-width: 0;
  display: grid;
  gap: .08rem;
}

.messages-inbox-modern .composer-preview-chip-copy strong,
.messages-inbox-modern .composer-preview-chip-copy span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-inbox-modern .composer-preview-chip-copy span{
  color: rgba(229,233,229,.72);
  font-size: .84rem;
}

.messages-inbox-modern .composer-preview-chip audio{
  width: 100%;
  min-width: 0;
  height: 2.4rem;
}

.messages-inbox-modern .composer-preview-chip-remove{
  border: 0;
  background: transparent;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-inbox-modern .composer-inline-error{
  padding: .65rem .8rem;
  border-radius: 14px;
  border: 1px solid rgba(248,113,113,.24);
  background: rgba(127,29,29,.18);
  color: #fecaca;
  font-size: .92rem;
  display: grid;
  gap: .55rem;
}

.messages-inbox-modern .composer-inline-error[hidden]{
  display: none !important;
}

.messages-inbox-modern .composer-inline-error-message{
  display: block;
}

.messages-inbox-modern .composer-inline-error-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.messages-inbox-modern .composer-inline-error-device{
  display: inline-flex;
  align-items: center;
}

.messages-inbox-modern .composer-inline-error-device select{
  min-height: 2rem;
  max-width: min(240px, 100%);
  border-radius: 10px;
  border: 1px solid rgba(248,250,252,.14);
  background: rgba(22,25,22,.58);
  color: #f8fafc;
  padding: .3rem .75rem;
}

.messages-inbox-modern .composer-inline-error-retry{
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(248,250,252,.14);
  color: inherit;
  padding: .35rem .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}

.messages-inbox-modern .composer-inline-error-retry:hover,
.messages-inbox-modern .composer-inline-error-retry:focus-visible{
  background: rgba(248,250,252,.22);
  transform: translateY(-1px);
  outline: none;
}

.messages-inbox-modern .composer-recording-strip[hidden]{
  display: none !important;
}

.messages-inbox-modern .composer-recording-strip{
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: .7rem;
  align-items: center;
}

.messages-inbox-modern .composer-recording-bars{
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 3px;
  gap: 4px;
  align-items: center;
}

.messages-inbox-modern .composer-recording-bars span{
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #689901, #83b532);
  animation: none;
}

.messages-inbox-modern .message-composer.is-recording .composer-recording-bars span{
  animation: composer-record-bars 1s ease-in-out infinite;
}

.messages-inbox-modern .composer-recording-bars span:nth-child(3n){ animation-duration: 1.2s; height: 18px; }
.messages-inbox-modern .composer-recording-bars span:nth-child(3n+1){ animation-duration: .85s; height: 10px; }
.messages-inbox-modern .composer-recording-bars span:nth-child(3n+2){ animation-duration: 1.05s; height: 14px; }

.messages-inbox-modern .composer-recording-live{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  color: rgba(229,233,229,.78);
  font-size: .86rem;
}

.messages-inbox-modern .composer-recording-dot{
  width: .52rem;
  height: .52rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239,68,68,.12);
}

.messages-inbox-modern .composer-recording-timer{
  font-variant-numeric: tabular-nums;
  font-size: .86rem;
  color: rgba(229,233,229,.72);
}

.messages-inbox-modern .message-media-stack{
  display: grid;
  gap: .6rem;
  margin-top: .45rem;
}

.messages-inbox-modern .message-media-card{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(159,163,160,.12);
  background: rgba(6,8,6,.18);
}

.messages-inbox-modern .message-media-image{
  display: block;
  max-width: min(23rem, 70vw);
  cursor: zoom-in;
}

.messages-inbox-modern .message-media-image img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.messages-inbox-modern .message-media-video{
  max-width: min(23rem, 70vw);
}

.messages-inbox-modern .message-media-video video{
  display: block;
  width: 100%;
  max-height: 20rem;
  background: #060806;
}

.messages-inbox-modern .message-media-document{
  max-width: min(21rem, 70vw);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: center;
  padding: .85rem .95rem;
  color: inherit;
  text-decoration: none;
}

.messages-inbox-modern .message-media-document-icon,
.messages-inbox-modern .message-media-voice-indicator{
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  flex: 0 0 auto;
}

.messages-inbox-modern .message-media-document-copy,
.messages-inbox-modern .message-media-voice-copy{
  min-width: 0;
  display: grid;
  gap: .12rem;
}

.messages-inbox-modern .message-media-document-copy span,
.messages-inbox-modern .message-media-voice-copy span{
  font-size: .82rem;
  color: rgba(229,233,229,.72);
}

.messages-inbox-modern .message-media-voice{
  max-width: min(23rem, 76vw);
  display: grid;
  gap: .55rem;
  padding: .8rem .9rem;
}

.messages-inbox-modern .message-media-voice-head{
  display: flex;
  align-items: center;
  gap: .7rem;
}

.messages-inbox-modern .message-media-voice audio{
  width: 100%;
  height: 2.4rem;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-field{
  background: transparent;
  border-color: transparent;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-input-shell{
  background: transparent;
  border-color: transparent;
}

html:not([data-theme="dark"]) .messages-inbox-modern .messages-workspace-composer textarea,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-plus,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-mic{
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-send{
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-inline-error{
  background: rgba(254,226,226,.8);
  border-color: rgba(239,68,68,.22);
  color: #b91c1c;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-inline-error-device select{
  background: rgba(255,255,255,.94);
  border-color: rgba(159,163,160,.22);
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-inline-error-retry{
  background: rgba(22,25,22,.08);
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-plus,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-mic,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-send{
  color: #161917 !important;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-plus .nav-icon-lucide,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-mic .nav-icon-lucide,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-send .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] .messages-inbox-modern .composer-plus,
html[data-theme="dark"] .messages-inbox-modern .composer-mic,
html[data-theme="dark"] .messages-inbox-modern .composer-send{
  color: #ffffff !important;
  background-color: transparent !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-color: transparent !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  filter: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent;
}

html[data-theme="dark"] .messages-inbox-modern .composer-plus .nav-icon-lucide,
html[data-theme="dark"] .messages-inbox-modern .composer-mic .nav-icon-lucide,
html[data-theme="dark"] .messages-inbox-modern .composer-send .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html[data-theme="dark"] .messages-inbox-modern .composer-plus:hover,
html[data-theme="dark"] .messages-inbox-modern .composer-mic:hover,
html[data-theme="dark"] .messages-inbox-modern .composer-send:hover,
html[data-theme="dark"] .messages-inbox-modern .composer-plus:focus,
html[data-theme="dark"] .messages-inbox-modern .composer-mic:focus,
html[data-theme="dark"] .messages-inbox-modern .composer-send:focus,
html[data-theme="dark"] .messages-inbox-modern .composer-plus:focus-visible,
html[data-theme="dark"] .messages-inbox-modern .composer-mic:focus-visible,
html[data-theme="dark"] .messages-inbox-modern .composer-send:focus-visible,
html[data-theme="dark"] .messages-inbox-modern .composer-plus:active,
html[data-theme="dark"] .messages-inbox-modern .composer-mic:active,
html[data-theme="dark"] .messages-inbox-modern .composer-send:active{
  background-color: transparent !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html[data-theme="dark"] .messages-inbox-modern button.composer-plus,
html[data-theme="dark"] .messages-inbox-modern button.composer-mic,
html[data-theme="dark"] .messages-inbox-modern button.composer-send{
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-plus,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-mic,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-send{
  color: #000000 !important;
}

html:not([data-theme="dark"]) .messages-inbox-modern .messages-workspace-composer textarea::placeholder{
  color: #9fa3a0;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-menu{
  background: linear-gradient(180deg, rgba(243,246,243,.98), rgba(235,239,236,.96));
  border: 1px solid rgba(141,195,55,.24);
  box-shadow: 0 16px 30px rgba(86,127,0,.12);
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-menu-label{
  color: #4e6f18;
}

html:not([data-theme="dark"]) .messages-inbox-modern .messages-workspace-actions .kebab-panel,
html:not([data-theme="dark"]) .messages-inbox-modern .kebab-panel{
  background: linear-gradient(180deg, rgba(243,246,243,.98), rgba(235,239,236,.96));
  border: 1px solid rgba(141,195,55,.24);
  box-shadow: 0 16px 30px rgba(86,127,0,.12);
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-option-icon{
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-option-copy strong{
  color: #161917;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-option-copy span{
  color: #525552;
}

html:not([data-theme="dark"]) .conversation-action-label{
  color: currentColor;
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-attachment-option-copy span,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-preview-chip-copy span,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-recording-live,
html:not([data-theme="dark"]) .messages-inbox-modern .composer-recording-timer,
html:not([data-theme="dark"]) .messages-inbox-modern .message-media-document-copy span,
html:not([data-theme="dark"]) .messages-inbox-modern .message-media-voice-copy span{
  color: rgba(22,25,22,.65);
}

html:not([data-theme="dark"]) .messages-inbox-modern .composer-preview-chip,
html:not([data-theme="dark"]) .messages-inbox-modern .message-media-card{
  background: rgba(255,255,255,.96);
  border-color: rgba(159,163,160,.18);
}

@media (max-width: 820px){
  .messages-inbox-modern .messages-workspace-composer{
    padding: .75rem .65rem calc(.8rem + env(safe-area-inset-bottom, 0px));
  }

  .messages-inbox-modern .composer-field{
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .45rem;
    padding: .45rem;
    border-radius: 18px;
  }

  .messages-inbox-modern .composer-plus,
  .messages-inbox-modern .composer-mic,
  .messages-inbox-modern .composer-send{
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .messages-inbox-modern .composer-input-shell{
    padding-left: .7rem;
    min-width: 0;
  }

  .messages-inbox-modern .messages-workspace-composer textarea{
    width: 100%;
    min-width: 0;
  }

  .messages-inbox-modern .composer-attachment-menu{
    left: .65rem;
    right: .65rem;
    width: auto;
    bottom: calc(100% + .45rem);
  }

  .messages-inbox-modern .composer-preview-chip.is-voice{
    grid-template-columns: auto 1fr auto;
  }

  .messages-inbox-modern .composer-preview-chip audio{
    grid-column: 1 / -1;
  }

  .messages-inbox-modern .message-media-image,
  .messages-inbox-modern .message-media-video,
  .messages-inbox-modern .message-media-document,
  .messages-inbox-modern .message-media-voice{
    max-width: min(100%, 19.5rem);
  }

  .messages-inbox-modern .composer-recording-strip{
    grid-template-columns: auto 1fr auto;
    min-width: 0;
    gap: .45rem;
  }

  .messages-inbox-modern .composer-recording-live{
    display: none;
  }

  .messages-inbox-modern .composer-recording-bars{
    grid-auto-columns: 2px;
    gap: 3px;
    overflow: hidden;
  }
}

@keyframes composer-record-bars{
  0%, 100%{
    transform: scaleY(.6);
    opacity: .6;
  }
  50%{
    transform: scaleY(1.15);
    opacity: 1;
  }
}

/* Global borderless icon-only actions */
.icon-btn,
.message-menu-trigger,
.coach-directory-more > summary,
.plain-close-icon,
.sheet-close,
.messages-announcements-overlay-close,
.booking-viewer-external-btn,
.booking-viewer-fallback-close,
.progress-photo-icon-action,
.progress-entry-icon-action,
button.subtle-danger-icon-btn,
a.subtle-danger-icon-btn,
span.subtle-danger-icon-btn,
button.subtle-edit-btn:not(.progress-measurements-cta):has(.nav-icon-lucide),
a.subtle-edit-btn:not(.progress-measurements-cta):has(.nav-icon-lucide),
span.subtle-edit-btn:not(.progress-measurements-cta):has(.nav-icon-lucide),
button:has(> .nav-icon-lucide[data-lucide="x"]),
a:has(> .nav-icon-lucide[data-lucide="x"]),
span:has(> .nav-icon-lucide[data-lucide="x"]),
button:has(> .nav-icon-lucide[data-lucide="trash-2"]),
a:has(> .nav-icon-lucide[data-lucide="trash-2"]),
span:has(> .nav-icon-lucide[data-lucide="trash-2"]),
button:has(> .nav-icon-lucide[data-lucide="download"]),
a:has(> .nav-icon-lucide[data-lucide="download"]),
span:has(> .nav-icon-lucide[data-lucide="download"]),
button:has(> .nav-icon-lucide[data-lucide="pencil"]),
a:has(> .nav-icon-lucide[data-lucide="pencil"]),
span:has(> .nav-icon-lucide[data-lucide="pencil"]),
button:has(> .nav-icon-lucide[data-lucide="square-pen"]),
a:has(> .nav-icon-lucide[data-lucide="square-pen"]),
span:has(> .nav-icon-lucide[data-lucide="square-pen"]){
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

button:has(> .nav-icon-lucide[data-lucide="trash-2"]),
a:has(> .nav-icon-lucide[data-lucide="trash-2"]),
span:has(> .nav-icon-lucide[data-lucide="trash-2"]){
  -webkit-appearance: none !important;
  appearance: none !important;
  color: #f87171 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  transform: translate3d(0, 0, 0) !important;
  transition: transform .14s ease, color .14s ease !important;
}

button:has(> .nav-icon-lucide[data-lucide="download"]),
a:has(> .nav-icon-lucide[data-lucide="download"]),
span:has(> .nav-icon-lucide[data-lucide="download"]){
  -webkit-appearance: none !important;
  appearance: none !important;
  color: #97d337 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  transform: translate3d(0, 0, 0) !important;
  transition: transform .14s ease, color .14s ease !important;
}

button:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  width: 1.1rem !important;
  height: 1.1rem !important;
  color: #f87171 !important;
  stroke: #f87171 !important;
  opacity: 1 !important;
}

button:has(> .nav-icon-lucide[data-lucide="download"]) .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="download"]) .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="download"]) .nav-icon-lucide{
  width: 1.1rem !important;
  height: 1.1rem !important;
  color: #97d337 !important;
  stroke: #97d337 !important;
  opacity: 1 !important;
}

.plain-close-icon,
button:has(> .nav-icon-lucide[data-lucide="x"]),
a:has(> .nav-icon-lucide[data-lucide="x"]),
span:has(> .nav-icon-lucide[data-lucide="x"]){
  -webkit-appearance: none !important;
  appearance: none !important;
  color: var(--ui-close-fg) !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 1.4rem !important;
  min-height: 1.4rem !important;
  width: 1.4rem !important;
  height: 1.4rem !important;
  border-radius: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  transform: translate3d(0, 0, 0) !important;
  transition: transform .14s ease, color .14s ease !important;
}

.plain-close-icon .nav-icon-lucide,
button:has(> .nav-icon-lucide[data-lucide="x"]) .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="x"]) .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="x"]) .nav-icon-lucide{
  width: 1.1rem !important;
  height: 1.1rem !important;
  stroke-width: 2.2 !important;
}

.icon-btn:hover,
.icon-btn:focus,
.icon-btn:focus-visible,
.message-menu-trigger:hover,
.message-menu-trigger:focus,
.message-menu-trigger:focus-visible,
.coach-directory-more > summary:hover,
.coach-directory-more > summary:focus,
.coach-directory-more > summary:focus-visible,
.plain-close-icon:hover,
.plain-close-icon:focus,
.plain-close-icon:focus-visible,
.sheet-close:hover,
.sheet-close:focus,
.sheet-close:focus-visible,
.messages-announcements-overlay-close:hover,
.messages-announcements-overlay-close:focus,
.messages-announcements-overlay-close:focus-visible,
.booking-viewer-external-btn:hover,
.booking-viewer-external-btn:focus,
.booking-viewer-external-btn:focus-visible,
.booking-viewer-fallback-close:hover,
.booking-viewer-fallback-close:focus,
.booking-viewer-fallback-close:focus-visible,
.progress-photo-icon-action:hover,
.progress-photo-icon-action:focus,
.progress-photo-icon-action:focus-visible,
.progress-entry-icon-action:hover,
.progress-entry-icon-action:focus,
.progress-entry-icon-action:focus-visible,
button.subtle-danger-icon-btn:hover,
button.subtle-danger-icon-btn:focus,
button.subtle-danger-icon-btn:focus-visible,
a.subtle-danger-icon-btn:hover,
a.subtle-danger-icon-btn:focus,
a.subtle-danger-icon-btn:focus-visible,
span.subtle-danger-icon-btn:hover,
span.subtle-danger-icon-btn:focus,
span.subtle-danger-icon-btn:focus-visible,
button.subtle-edit-btn:has(.nav-icon-lucide):hover,
button.subtle-edit-btn:has(.nav-icon-lucide):focus,
button.subtle-edit-btn:has(.nav-icon-lucide):focus-visible,
a.subtle-edit-btn:has(.nav-icon-lucide):hover,
a.subtle-edit-btn:has(.nav-icon-lucide):focus,
a.subtle-edit-btn:has(.nav-icon-lucide):focus-visible,
span.subtle-edit-btn:has(.nav-icon-lucide):hover,
span.subtle-edit-btn:has(.nav-icon-lucide):focus,
span.subtle-edit-btn:has(.nav-icon-lucide):focus-visible{
  border: 0 !important;
  box-shadow: none !important;
}

button:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover,
button:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus,
button:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible{
  color: #fca5a5 !important;
  background: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
  transform: translate3d(0, -1px, 0) !important;
}

button:has(> .nav-icon-lucide[data-lucide="download"]):hover,
button:has(> .nav-icon-lucide[data-lucide="download"]):focus,
button:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible,
a:has(> .nav-icon-lucide[data-lucide="download"]):hover,
a:has(> .nav-icon-lucide[data-lucide="download"]):focus,
a:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible,
span:has(> .nav-icon-lucide[data-lucide="download"]):hover,
span:has(> .nav-icon-lucide[data-lucide="download"]):focus,
span:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible{
  color: #aaeb42 !important;
  background: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
  transform: translate3d(0, -1px, 0) !important;
}

button:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover .nav-icon-lucide,
button:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus .nav-icon-lucide,
button:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible .nav-icon-lucide{
  color: #fca5a5 !important;
  stroke: #fca5a5 !important;
}

button:has(> .nav-icon-lucide[data-lucide="download"]):hover .nav-icon-lucide,
button:has(> .nav-icon-lucide[data-lucide="download"]):focus .nav-icon-lucide,
button:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="download"]):hover .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="download"]):focus .nav-icon-lucide,
a:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="download"]):hover .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="download"]):focus .nav-icon-lucide,
span:has(> .nav-icon-lucide[data-lucide="download"]):focus-visible .nav-icon-lucide{
  color: #aaeb42 !important;
  stroke: #aaeb42 !important;
}

button:has(> .nav-icon-lucide[data-lucide="trash-2"]):active,
a:has(> .nav-icon-lucide[data-lucide="trash-2"]):active,
span:has(> .nav-icon-lucide[data-lucide="trash-2"]):active{
  transform: translate3d(0, 1px, 0) !important;
}

button:has(> .nav-icon-lucide[data-lucide="download"]):active,
a:has(> .nav-icon-lucide[data-lucide="download"]):active,
span:has(> .nav-icon-lucide[data-lucide="download"]):active{
  transform: translate3d(0, 1px, 0) !important;
}

html[data-theme="dark"] button:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="dark"] a:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="dark"] span:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="dark"] .subtle-danger-icon-btn:has([data-lucide="trash-2"]),
html[data-theme="dark"] .library-plan-icon-action.is-danger,
html[data-theme="dark"] .locker-action-btn-danger{
  background: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

html[data-theme="dark"] button:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] a:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] span:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] .subtle-danger-icon-btn:has([data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] .library-plan-icon-action.is-danger .nav-icon-lucide,
html[data-theme="dark"] .locker-action-btn-danger .nav-icon-lucide{
  color: #f87171 !important;
  stroke: #f87171 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="dark"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  color: #ffffff !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
}

html[data-theme="light"] .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]),
html[data-theme="light"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]){
  color: #525552 !important;
  border-color: rgba(159,163,160,.18) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 10px 24px rgba(22,25,22,.06) !important;
}

html[data-theme="light"] .settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="light"] .settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: #525552 !important;
  stroke: #525552 !important;
  opacity: 1 !important;
}

.settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]),
.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]),
.settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]):hover,
.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]):hover,
.settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus,
.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]):focus,
.settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]):focus-visible,
.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]):focus-visible,
.settings-summary-icon:has(> .nav-icon-lucide[data-lucide="trash-2"]):active,
.settings-summary-icon:has(.nav-icon-lucide[data-lucide="trash-2"]):active{
  transform: none !important;
}

.plain-close-icon:hover,
.plain-close-icon:focus,
.plain-close-icon:focus-visible,
button:has(> .nav-icon-lucide[data-lucide="x"]):hover,
button:has(> .nav-icon-lucide[data-lucide="x"]):focus,
button:has(> .nav-icon-lucide[data-lucide="x"]):focus-visible,
a:has(> .nav-icon-lucide[data-lucide="x"]):hover,
a:has(> .nav-icon-lucide[data-lucide="x"]):focus,
a:has(> .nav-icon-lucide[data-lucide="x"]):focus-visible,
span:has(> .nav-icon-lucide[data-lucide="x"]):hover,
span:has(> .nav-icon-lucide[data-lucide="x"]):focus,
span:has(> .nav-icon-lucide[data-lucide="x"]):focus-visible{
  color: var(--ui-close-hover-fg) !important;
  background: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
  transform: translate3d(0, -1px, 0) !important;
}

.plain-close-icon:active,
button:has(> .nav-icon-lucide[data-lucide="x"]):active,
a:has(> .nav-icon-lucide[data-lucide="x"]):active,
span:has(> .nav-icon-lucide[data-lucide="x"]):active{
  transform: translate3d(0, 1px, 0) !important;
}

/* Shared ghost action icon controls */
.coach-library-page .library-plan-actions .library-icon-btn,
.coach-library-page .library-plan-icon-action,
.coach-library-page .locker-action-btn,
.booking-link-icon-btn[aria-label*="Delete"],
.booking-link-icon-btn[aria-label*="Edit"],
.booking-link-icon-btn[aria-label*="Download"],
.booking-link-icon-btn[aria-label*="Open"],
.booking-link-icon-btn[aria-label*="Share"],
.messages-inbox-modern .message-composer button.composer-plus,
.messages-inbox-modern .message-composer button.composer-mic,
.messages-inbox-modern .message-composer button.composer-send{
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  background-clip: padding-box !important;
  border-image: none !important;
  filter: none !important;
}

.coach-library-page .library-plan-actions .library-icon-btn::before,
.coach-library-page .library-plan-actions .library-icon-btn::after,
.coach-library-page .library-plan-icon-action::before,
.coach-library-page .library-plan-icon-action::after,
.coach-library-page .locker-action-btn::before,
.coach-library-page .locker-action-btn::after,
.booking-link-icon-btn[aria-label*="Delete"]::before,
.booking-link-icon-btn[aria-label*="Delete"]::after,
.booking-link-icon-btn[aria-label*="Edit"]::before,
.booking-link-icon-btn[aria-label*="Edit"]::after,
.booking-link-icon-btn[aria-label*="Download"]::before,
.booking-link-icon-btn[aria-label*="Download"]::after,
.booking-link-icon-btn[aria-label*="Open"]::before,
.booking-link-icon-btn[aria-label*="Open"]::after,
.booking-link-icon-btn[aria-label*="Share"]::before,
.booking-link-icon-btn[aria-label*="Share"]::after,
.messages-inbox-modern .message-composer button.composer-plus::before,
.messages-inbox-modern .message-composer button.composer-plus::after,
.messages-inbox-modern .message-composer button.composer-mic::before,
.messages-inbox-modern .message-composer button.composer-mic::after,
.messages-inbox-modern .message-composer button.composer-send::before,
.messages-inbox-modern .message-composer button.composer-send::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.coach-library-page .library-plan-actions .library-icon-btn:hover,
.coach-library-page .library-plan-actions .library-icon-btn:focus-visible,
.coach-library-page .library-plan-icon-action:hover,
.coach-library-page .library-plan-icon-action:focus-visible,
.coach-library-page .locker-action-btn:hover,
.coach-library-page .locker-action-btn:focus-visible,
.booking-link-icon-btn[aria-label*="Delete"]:hover,
.booking-link-icon-btn[aria-label*="Delete"]:focus-visible,
.booking-link-icon-btn[aria-label*="Edit"]:hover,
.booking-link-icon-btn[aria-label*="Edit"]:focus-visible,
.booking-link-icon-btn[aria-label*="Download"]:hover,
.booking-link-icon-btn[aria-label*="Download"]:focus-visible,
.booking-link-icon-btn[aria-label*="Open"]:hover,
.booking-link-icon-btn[aria-label*="Open"]:focus-visible,
.booking-link-icon-btn[aria-label*="Share"]:hover,
.booking-link-icon-btn[aria-label*="Share"]:focus-visible,
.messages-inbox-modern .message-composer button.composer-plus:hover,
.messages-inbox-modern .message-composer button.composer-plus:focus-visible,
.messages-inbox-modern .message-composer button.composer-mic:hover,
.messages-inbox-modern .message-composer button.composer-mic:focus-visible,
.messages-inbox-modern .message-composer button.composer-send:hover,
.messages-inbox-modern .message-composer button.composer-send:focus-visible{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  transform: translateY(-1px) scale(1.05);
}

.coach-library-page .library-plan-actions .library-icon-btn:active,
.coach-library-page .library-plan-icon-action:active,
.coach-library-page .locker-action-btn:active,
.booking-link-icon-btn[aria-label*="Delete"]:active,
.booking-link-icon-btn[aria-label*="Edit"]:active,
.booking-link-icon-btn[aria-label*="Download"]:active,
.booking-link-icon-btn[aria-label*="Open"]:active,
.booking-link-icon-btn[aria-label*="Share"]:active,
.messages-inbox-modern .message-composer button.composer-plus:active,
.messages-inbox-modern .message-composer button.composer-mic:active,
.messages-inbox-modern .message-composer button.composer-send:active{
  transform: translateY(1px) scale(.98);
}

.workout-complete-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
  z-index:5000;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, visibility 0s linear .18s;
}
.workout-complete-modal.open{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  transition-delay:0s;
}
.workout-complete-backdrop{
  position:absolute;
  inset:0;
  background:rgba(13,15,13,.68);
  backdrop-filter:blur(6px);
}
.workout-complete-confetti{
  position:absolute;
  inset:0;
  z-index:3;
  overflow:hidden;
  pointer-events:none;
}
.workout-complete-confetti-piece{
  --confetti-drift:0px;
  --confetti-turn:540deg;
  position:absolute;
  top:-1.5rem;
  width:7px;
  height:13px;
  opacity:0;
  animation:workout-complete-confetti-fall 1.6s cubic-bezier(.16,.72,.28,1) forwards;
}
@keyframes workout-complete-confetti-fall{
  0%{ opacity:0; transform:translate3d(0, -2vh, 0) rotate(0deg); }
  8%{ opacity:1; }
  88%{ opacity:1; }
  100%{ opacity:0; transform:translate3d(var(--confetti-drift), 105vh, 0) rotate(var(--confetti-turn)); }
}
.workout-complete-card{
  position:relative;
  z-index:2;
  width:min(760px, calc(100vw - 2rem));
  max-height:min(820px, calc(100dvh - 2rem));
  overflow-y:auto;
  border:1px solid var(--color-border);
  border-radius:var(--radius-lg);
  padding:1.75rem;
  background:var(--color-bg-secondary);
  box-shadow:var(--shadow);
  color:var(--color-text-primary);
  transform:translateY(10px) scale(.99);
  transition:transform .22s ease;
}
.workout-complete-modal.open .workout-complete-card{
  transform:translateY(0) scale(1);
}
.workout-complete-close,
.workout-complete-close:hover,
.workout-complete-close:focus,
.workout-complete-close:focus-visible,
.workout-complete-close:active{
  position:absolute;
  top:.8rem;
  right:.8rem;
  display:grid;
  place-items:center;
  width:2.5rem;
  min-width:2.5rem;
  height:2.5rem;
  min-height:2.5rem;
  padding:0;
  border:0 !important;
  border-radius:0 !important;
  outline:0;
  background:transparent !important;
  color:var(--color-text-secondary);
  box-shadow:none !important;
  transform:none !important;
}
.workout-complete-close .nav-icon-lucide{
  width:1.25rem;
  height:1.25rem;
}
.workout-complete-hero{
  display:flex;
  gap:.9rem;
  align-items:center;
  padding-right:2.5rem;
}
.workout-complete-copy h3{
  margin:.1rem 0 .25rem;
  font-size:1.65rem;
  line-height:1.15;
  letter-spacing:0;
}
.workout-complete-copy p{
  margin:0;
  color:var(--color-text-secondary);
}
.workout-complete-kicker{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#16a34a;
}
.workout-complete-badge{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-top:1.25rem;
  padding:.75rem .9rem;
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  background:var(--color-bg-primary);
  color:var(--color-text-secondary);
  font-size:.88rem;
  font-weight:600;
}
.workout-complete-badge .nav-icon-lucide{
  width:1rem;
  height:1rem;
  color:#16a34a;
}
.workout-complete-stats{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.65rem;
}
.workout-complete-summary-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(220px, .65fr);
  gap:1rem;
  align-items:stretch;
  margin-top:1rem;
}
.workout-complete-muscles{
  min-width:0;
  padding:1rem;
  border:1px solid var(--color-border);
  border-radius:var(--radius);
  background:var(--color-bg-primary);
}
.workout-complete-section-head{
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-bottom:.5rem;
}
.workout-complete-section-icon{
  display:grid;
  place-items:center;
  width:2rem;
  height:2rem;
  flex:0 0 auto;
  border-radius:50%;
  color:var(--color-accent);
  background:color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.workout-complete-section-icon .nav-icon-lucide{
  width:1rem;
  height:1rem;
}
.workout-complete-section-head h4{
  margin:0;
  font-size:.95rem;
}
.workout-complete-section-head p{
  margin:.12rem 0 0;
  color:var(--color-text-secondary);
  font-size:.72rem;
}
.muscle-body-map.workout-complete-muscle-map{
  min-height:0;
  gap:.25rem;
}
.workout-complete-muscles .workout-complete-muscle-map svg{
  height:230px;
}
.workout-complete-muscles .workout-complete-muscle-map figcaption{
  font-size:.7rem;
}
.workout-complete-muscle-detail{
  display:grid;
  gap:.35rem;
  margin-top:.65rem;
  min-height:1.35rem;
  font-size:.78rem;
}
.workout-complete-muscle-detail-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:.5rem 1rem;
}
.workout-complete-muscle-detail-row span{
  color:var(--color-text-secondary);
  white-space:nowrap;
}
.workout-complete-pbs{
  margin-top:1.25rem;
  padding:1rem;
  border:1px solid var(--color-border);
  border-radius:var(--radius);
  background:var(--color-bg-primary);
}
.workout-complete-pbs-kicker{
  margin-bottom:.65rem;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#16a34a;
}
.workout-complete-pbs-list{
  display:grid;
  gap:.55rem;
}
.workout-complete-pb-item{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:baseline;
  padding:.55rem 0;
  border-bottom:1px solid var(--color-border);
}
.workout-complete-pb-item:last-child{
  border-bottom:0;
}
.workout-complete-pb-movement{
  color:var(--color-text-primary);
}
.workout-complete-pb-value{
  white-space:nowrap;
  color:#16a34a;
}
.workout-complete-stat{
  min-width:0;
  min-height:80px;
  padding:.9rem;
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  background:var(--color-bg-primary);
}
.workout-complete-stat-label{
  display:block;
  margin-bottom:.3rem;
  color:var(--color-text-secondary);
  font-size:.76rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.workout-complete-stat strong{
  display:block;
  color:var(--color-text-primary);
  font-size:1.2rem;
  line-height:1.1;
  overflow-wrap:anywhere;
}
.workout-complete-footer{
  display:flex;
  justify-content:flex-end;
  margin-top:1.35rem;
}
.workout-complete-done{
  min-width:190px;
}
body.workout-complete-open{
  overflow:hidden;
}
@media (max-width: 900px){
  .workout-complete-modal{
    align-items:flex-start;
    padding:0;
    padding-top:var(--appbar-height, 0px);
    padding-bottom:var(--mobile-nav-height, 0px);
  }
  .workout-complete-card{
    width:100%;
    height:calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    min-height:calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    max-height:calc(100dvh - var(--appbar-height, 0px) - var(--mobile-nav-height, 0px));
    display:flex;
    flex-direction:column;
    border-radius:0;
    padding:.8rem .75rem max(.75rem, env(safe-area-inset-bottom));
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .workout-complete-hero{
    align-items:center;
    gap:.65rem;
    padding-right:2.25rem;
  }
      .workout-complete-copy h3{
    margin:0 0 .1rem;
    font-size:1.25rem;
  }
  .workout-complete-copy p{
    font-size:.8rem;
    line-height:1.25;
  }
  .workout-complete-kicker{
    display:none;
  }
  .workout-complete-badge{
    margin-top:.6rem;
    padding:.5rem .65rem;
    font-size:.75rem;
  }
  .workout-complete-stats{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:.4rem;
  }
  .workout-complete-summary-grid{
    grid-template-columns:1fr;
    gap:.55rem;
    margin-top:.6rem;
  }
  .workout-complete-muscles{
    order:-1;
    padding:.6rem .7rem;
  }
  .workout-complete-section-head{
    margin-bottom:.2rem;
  }
  .workout-complete-section-icon{
    width:1.7rem;
    height:1.7rem;
  }
  .workout-complete-section-head h4{
    font-size:.82rem;
  }
  .workout-complete-section-head p{
    font-size:.66rem;
  }
  .muscle-body-map.workout-complete-muscle-map{
    width:min(360px, 100%);
    margin:0 auto;
  }
  .workout-complete-muscles .workout-complete-muscle-map svg{
    height:clamp(185px, 24dvh, 280px);
  }
  .workout-complete-muscles .workout-complete-muscle-map figcaption{
    display:none;
  }
  .workout-complete-stat{
    min-height:58px;
    padding:.55rem .5rem;
  }
  .workout-complete-stat-label{
    margin-bottom:.18rem;
    font-size:.65rem;
  }
  .workout-complete-stat strong{
    font-size:.98rem;
  }
  .workout-complete-stat:last-child:nth-child(3n + 2){
    grid-column:span 2;
  }
  .workout-complete-pbs{
    margin-top:.6rem;
    padding:.6rem .7rem;
  }
  .workout-complete-pbs-kicker{
    margin-bottom:.25rem;
    font-size:.66rem;
  }
  .workout-complete-pb-item{
    gap:.5rem;
    padding:.35rem 0;
    font-size:.76rem;
  }
  .workout-complete-footer{
    margin-top:auto;
    padding-top:.75rem;
    position:static;
  }
  html body.app[data-authenticated="1"] .workout-complete-done.workout-complete-done{
    width:100%;
    min-height:2.85rem !important;
  }
}
@media (prefers-reduced-motion: reduce){
  .workout-complete-modal,
  .workout-complete-card{
    transition:none;
  }
  .workout-complete-confetti{
    display:none;
  }
}

/* Global authenticated app button theme */
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  /* Reads the shared tokens instead of painting a grey gradient over them.
     This layer is why token changes had no visible effect in dark mode: it
     hardcoded border, background and colour at (0,9,7) with !important, so
     every variant underneath it rendered as the same grey slab. */
  border: var(--ui-btn-border-width) solid var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop{
  border: 1px solid #000000 !important;
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  border: 1px solid rgba(22,25,22,.8) !important;
  background: #272a27 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):active,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active{
  border-color: #000000 !important;
  background: #f8fafc !important;
  color: #000000 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active{
  border-color: rgba(62,65,62,.7) !important;
  background: #3e413e !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions a .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions button .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions .pill-link .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions a svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions button svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions .pill-link svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions a .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions button .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions .pill-link .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions a svg,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions button svg,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions .pill-link svg,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action .nav-icon-lucide{
  color: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle{
  border: 1px solid var(--ui-btn-dark-border) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:active{
  border-color: var(--ui-btn-dark-hover-border) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* .macropro-copy-btn / #macropro-calculate dropped from the block above:
   they now go through the standard glossy dark-mode button system
   instead of this bespoke dark-variant styling. */

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active{
  border-color: var(--ui-btn-primary-border) !important;
  background: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate{
  border: 1px solid var(--ui-btn-light-border) !important;
  background: var(--ui-btn-light-bg) !important;
  color: var(--ui-btn-light-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:active{
  border-color: var(--ui-btn-light-hover-border) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  color: var(--ui-btn-light-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle.active{
  border-color: var(--ui-btn-primary-border) !important;
  background: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate .nav-icon-lucide{
  color: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  /* Reads the shared tokens instead of painting a grey gradient over them.
     This layer is why token changes had no visible effect in dark mode: it
     hardcoded border, background and colour at (0,9,7) with !important, so
     every variant underneath it rendered as the same grey slab. */
  border: var(--ui-btn-border-width) solid var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-hover-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  border: 1px solid rgba(22,25,22,.85) !important;
  background: #161916 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active{
  border-color: rgba(62,65,62,.7) !important;
  background: #272a27 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn .nav-icon-lucide{
  color: currentColor !important;
}

/* Flatten button surfaces globally: no gradients */
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  background-image: none !important;
  background-color: var(--ui-btn-dark-bg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active{
  background-image: none !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger):active,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-fab-newchat:active,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-inbox-modern .messages-empty-actions .pill-link:active,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle.active{
  background-image: none !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
}

.workout-builder-page .plan-add-btn{
  border-radius: 16px !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn{
  border-color: rgba(159,163,160,.34) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn{
  border-color: rgba(229,233,229,.96) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:focus,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.week-page-head .page-actions .week-page-action{
  border-radius: 16px !important;
}

html[data-theme="dark"] .settings-summary-icon{
  border-color: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  color: #d1d5d2 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .settings-summary-icon{
  border-color: rgba(229,233,229,.96) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: #525552 !important;
  box-shadow: 0 6px 14px rgba(22,25,22,.05) !important;
}

.settings-delete-disclosure-summary{
  min-height: 42px;
  padding: 0 .95rem;
  border-radius: 12px;
  border: 1px solid rgba(159,163,160,.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.settings-delete-disclosure-summary::-webkit-details-marker{
  display: none;
}

.settings-delete-disclosure-summary::marker{
  content: "";
}

html[data-theme="dark"] .settings-delete-disclosure-summary{
  background-image: none !important;
  background-color: #262926 !important;
  color: #e5e9e5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .settings-delete-disclosure-summary:hover,
html[data-theme="dark"] .settings-delete-disclosure-summary:focus,
html[data-theme="dark"] .settings-delete-disclosure-summary:focus-visible,
html[data-theme="dark"] .settings-delete-disclosure-summary:active{
  background-image: none !important;
  background-color: rgba(39,42,39,.78) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .settings-delete-disclosure-summary{
  border-color: rgba(229,233,229,.96) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
  box-shadow: 0 6px 14px rgba(22,25,22,.05) !important;
}

html[data-theme="light"] .settings-delete-disclosure-summary:hover,
html[data-theme="light"] .settings-delete-disclosure-summary:focus,
html[data-theme="light"] .settings-delete-disclosure-summary:focus-visible,
html[data-theme="light"] .settings-delete-disclosure-summary:active{
  background-image: none !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 16px rgba(22,25,22,.06) !important;
}

/* Normalize plain settings action buttons/links that do not carry shared classes */
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn){
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(159,163,160,.34) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 10px 22px rgba(22,25,22,.16) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active{
  border-color: rgba(209,213,210,.42) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 24px rgba(22,25,22,.18) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn){
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(229,233,229,.96) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 3px rgba(22,25,22,.12) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn):active{
  border-color: rgba(209,213,210,1) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 10px 18px rgba(22,25,22,.08) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > button:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-body > form > a[role="button"]:not(.settings-delete-account-btn):not(.settings-disconnect-btn) .nav-icon-lucide{
  color: currentColor !important;
}

/* Match delete account button to the same neutral settings action style as clear cache */
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn{
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(159,163,160,.34) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background-image: none !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn{
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(229,233,229,.96) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background-image: none !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn .nav-icon-lucide{
  color: currentColor !important;
}

/* Force dashboard Start/Continue CTA onto the shared info button variant */
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop{
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid var(--ui-btn-info-border) !important;
  background-image: none !important;
  background-color: var(--ui-btn-info-bg) !important;
  color: var(--ui-btn-info-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active{
  border-color: var(--ui-btn-info-hover-border) !important;
  background-image: none !important;
  background-color: var(--ui-btn-info-hover-bg) !important;
  color: var(--ui-btn-info-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop{
  min-height: 42px !important;
  border-radius: 16px !important;
  border: 1px solid var(--ui-btn-info-border) !important;
  background-image: none !important;
  background-color: var(--ui-btn-info-bg) !important;
  color: var(--ui-btn-info-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:active,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active{
  border-color: var(--ui-btn-info-hover-border) !important;
  background-image: none !important;
  background-color: var(--ui-btn-info-hover-bg) !important;
  color: var(--ui-btn-info-fg) !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide{
  color: currentColor !important;
}

/* Final global button flattening: remove residual highlight/glow chrome across authenticated app pages */
body.app[data-authenticated="1"] button,
body.app[data-authenticated="1"] input[type="submit"],
body.app[data-authenticated="1"] input[type="button"],
body.app[data-authenticated="1"] .button,
body.app[data-authenticated="1"] a.button,
body.app[data-authenticated="1"] a[role="button"],
body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] .secondary,
body.app[data-authenticated="1"] .secondary-button{
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] button:hover,
body.app[data-authenticated="1"] button:focus,
body.app[data-authenticated="1"] button:focus-visible,
body.app[data-authenticated="1"] button:active,
body.app[data-authenticated="1"] input[type="submit"]:hover,
body.app[data-authenticated="1"] input[type="submit"]:focus,
body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
body.app[data-authenticated="1"] input[type="submit"]:active,
body.app[data-authenticated="1"] input[type="button"]:hover,
body.app[data-authenticated="1"] input[type="button"]:focus,
body.app[data-authenticated="1"] input[type="button"]:focus-visible,
body.app[data-authenticated="1"] input[type="button"]:active,
body.app[data-authenticated="1"] .button:hover,
body.app[data-authenticated="1"] .button:focus,
body.app[data-authenticated="1"] .button:focus-visible,
body.app[data-authenticated="1"] .button:active,
body.app[data-authenticated="1"] a.button:hover,
body.app[data-authenticated="1"] a.button:focus,
body.app[data-authenticated="1"] a.button:focus-visible,
body.app[data-authenticated="1"] a.button:active,
body.app[data-authenticated="1"] a[role="button"]:hover,
body.app[data-authenticated="1"] a[role="button"]:focus,
body.app[data-authenticated="1"] a[role="button"]:focus-visible,
body.app[data-authenticated="1"] a[role="button"]:active,
body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] .secondary:hover,
body.app[data-authenticated="1"] .secondary:focus,
body.app[data-authenticated="1"] .secondary:focus-visible,
body.app[data-authenticated="1"] .secondary:active,
body.app[data-authenticated="1"] .secondary-button:hover,
body.app[data-authenticated="1"] .secondary-button:focus,
body.app[data-authenticated="1"] .secondary-button:focus-visible,
body.app[data-authenticated="1"] .secondary-button:active{
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #edit-targets-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-water-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-food-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #add-custom-food-btn{
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #edit-targets-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #edit-targets-btn svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-water-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-water-btn svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-food-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #log-food-btn svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #add-custom-food-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-actions #add-custom-food-btn svg{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-delete-account-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .plan-save-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle{
  border: 1px solid rgba(159,163,160,.34) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle[aria-expanded="true"]{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle{
  border: 1px solid rgba(229,233,229,.96) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle[aria-expanded="true"]{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle svg,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-toggle svg{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn{
  border: 1px solid rgba(159,163,160,.34) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle[aria-expanded="true"],
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn{
  border: 1px solid rgba(229,233,229,.96) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle[aria-expanded="true"],
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle svg,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn svg,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle svg,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn svg{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip.is-active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-chip.is-active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip.is-active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .workout-builder-page .exercise-filter-chip.is-active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active{
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn{
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle.active,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section .settings-upgrade-lock-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-section #clear-local-cache-btn:active{
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] button:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] a:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] span:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] button:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] a:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] span:has(> .nav-icon-lucide[data-lucide="trash-2"]) .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .locker-action-btn{
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .locker-action-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .locker-action-btn{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  color: #161917 !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .locker-action-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a.secondary:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions button.secondary:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions a[role="button"].secondary:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .secondary:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] button::before,
body.app[data-authenticated="1"] button::after,
body.app[data-authenticated="1"] input[type="submit"]::before,
body.app[data-authenticated="1"] input[type="submit"]::after,
body.app[data-authenticated="1"] input[type="button"]::before,
body.app[data-authenticated="1"] input[type="button"]::after,
body.app[data-authenticated="1"] .button::before,
body.app[data-authenticated="1"] .button::after,
body.app[data-authenticated="1"] a.button::before,
body.app[data-authenticated="1"] a.button::after,
body.app[data-authenticated="1"] a[role="button"]::before,
body.app[data-authenticated="1"] a[role="button"]::after,
body.app[data-authenticated="1"] .pill-link::before,
body.app[data-authenticated="1"] .pill-link::after,
body.app[data-authenticated="1"] .secondary::before,
body.app[data-authenticated="1"] .secondary::after,
body.app[data-authenticated="1"] .secondary-button::before,
body.app[data-authenticated="1"] .secondary-button::after,
body.app[data-authenticated="1"] .btn-primary::before,
body.app[data-authenticated="1"] .btn-primary::after,
body.app[data-authenticated="1"] .plan-save-btn::before,
body.app[data-authenticated="1"] .plan-save-btn::after,
body.app[data-authenticated="1"] .plan-delete-btn::before,
body.app[data-authenticated="1"] .plan-delete-btn::after{
  content: none !important;
  display: none !important;
}

body.app[data-authenticated="1"] button,
body.app[data-authenticated="1"] input[type="submit"],
body.app[data-authenticated="1"] input[type="button"],
body.app[data-authenticated="1"] .button,
body.app[data-authenticated="1"] a.button,
body.app[data-authenticated="1"] a[role="button"],
body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] .secondary,
body.app[data-authenticated="1"] .secondary-button,
body.app[data-authenticated="1"] .btn-primary,
body.app[data-authenticated="1"] .plan-save-btn,
body.app[data-authenticated="1"] .plan-delete-btn{
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  outline: none !important;
  -webkit-box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] button:hover,
body.app[data-authenticated="1"] button:focus,
body.app[data-authenticated="1"] button:focus-visible,
body.app[data-authenticated="1"] button:active,
body.app[data-authenticated="1"] input[type="submit"]:hover,
body.app[data-authenticated="1"] input[type="submit"]:focus,
body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
body.app[data-authenticated="1"] input[type="submit"]:active,
body.app[data-authenticated="1"] input[type="button"]:hover,
body.app[data-authenticated="1"] input[type="button"]:focus,
body.app[data-authenticated="1"] input[type="button"]:focus-visible,
body.app[data-authenticated="1"] input[type="button"]:active,
body.app[data-authenticated="1"] .button:hover,
body.app[data-authenticated="1"] .button:focus,
body.app[data-authenticated="1"] .button:focus-visible,
body.app[data-authenticated="1"] .button:active,
body.app[data-authenticated="1"] a.button:hover,
body.app[data-authenticated="1"] a.button:focus,
body.app[data-authenticated="1"] a.button:focus-visible,
body.app[data-authenticated="1"] a.button:active,
body.app[data-authenticated="1"] a[role="button"]:hover,
body.app[data-authenticated="1"] a[role="button"]:focus,
body.app[data-authenticated="1"] a[role="button"]:focus-visible,
body.app[data-authenticated="1"] a[role="button"]:active,
body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] .secondary:hover,
body.app[data-authenticated="1"] .secondary:focus,
body.app[data-authenticated="1"] .secondary:focus-visible,
body.app[data-authenticated="1"] .secondary:active,
body.app[data-authenticated="1"] .secondary-button:hover,
body.app[data-authenticated="1"] .secondary-button:focus,
body.app[data-authenticated="1"] .secondary-button:focus-visible,
body.app[data-authenticated="1"] .secondary-button:active,
body.app[data-authenticated="1"] .btn-primary:hover,
body.app[data-authenticated="1"] .btn-primary:focus,
body.app[data-authenticated="1"] .btn-primary:focus-visible,
body.app[data-authenticated="1"] .btn-primary:active,
body.app[data-authenticated="1"] .plan-save-btn:hover,
body.app[data-authenticated="1"] .plan-save-btn:focus,
body.app[data-authenticated="1"] .plan-save-btn:focus-visible,
body.app[data-authenticated="1"] .plan-save-btn:active,
body.app[data-authenticated="1"] .plan-delete-btn:hover,
body.app[data-authenticated="1"] .plan-delete-btn:focus,
body.app[data-authenticated="1"] .plan-delete-btn:focus-visible,
body.app[data-authenticated="1"] .plan-delete-btn:active{
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  -webkit-box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .water-goal-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .checkin-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .checkin-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .checkin-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .checkin-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .checkin-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:active{
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]{
  border: 1px solid rgba(159,163,160,.34) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]{
  border: 1px solid rgba(229,233,229,.96) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log #save-meal-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-log .food-log-form > button[type="submit"]:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-toggle{
  border: 1px solid rgba(159,163,160,.34) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-panel.is-expanded .plan-actions-toggle{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-toggle{
  border: 1px solid rgba(229,233,229,.96) !important;
  border-radius: 16px !important;
  background: var(--ui-btn-light-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-panel.is-expanded .plan-actions-toggle{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-icon,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-icon{
  color: currentColor !important;
  background: transparent !important;
  border-color: rgba(159,163,160,.34) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .plan-actions-toggle .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-actions-toggle .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn,
body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn{
  border-radius: 16px !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:focus,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form .plan-add-btn:active,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:focus,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .plan-add-form button.small.plan-add-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide{
  color: var(--ui-btn-dark-fg) !important;
  stroke: currentColor !important;
}

html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide{
  color: #000000 !important;
  stroke: currentColor !important;
}

body.app[data-authenticated="1"] .coach-automations-new-btn,
body.app[data-authenticated="1"] .coach-automation-action-btn,
body.app[data-authenticated="1"] .coach-automation-accent-btn,
body.app[data-authenticated="1"] .coach-client-payment-action-btn,
body.app[data-authenticated="1"] .coach-payments-save-btn,
body.app[data-authenticated="1"] .coach-client-history-jump-submit,
body.app[data-authenticated="1"] .plan-io-action,
body.app[data-authenticated="1"] #coach-payment-share-send-btn,
body.app[data-authenticated="1"] #directory-payment-automation-send-btn,
body.app[data-authenticated="1"] #coach-directory-invite-toggle,
body.app[data-authenticated="1"] #coach-directory-invite-copy,
body.app[data-authenticated="1"] #coach-directory-invite-regenerate,
body.app[data-authenticated="1"] #coach-payment-share-link-add,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn{
  border-radius: 16px !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn{
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn.is-selected,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:active{
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn),
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn{
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn:not(.subtle-danger-btn):active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn.is-selected,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit:active,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action:active,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle:active,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy:active,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate:active,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add:hover,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add:focus,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:active{
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-io-action .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-send-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-copy .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] #coach-payment-share-link-add .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-io-action .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-send-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #directory-payment-automation-send-btn .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-toggle .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-copy .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-directory-invite-regenerate .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] #coach-payment-share-link-add .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}


body.app[data-authenticated="1"] .booking-link-save-btn,
body.app[data-authenticated="1"] .booking-link-add-btn {
  border-radius: 16px !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}


html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn {
  border: 1px solid rgba(159,163,160,.34) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}


html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn:active {
  border-color: rgba(209,213,210,.42) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}


html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn {
  border: 1px solid rgba(229,233,229,.96) !important;
  background: var(--ui-btn-light-bg) !important;
  color: #f8fafc !important;
}


html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn:active {
  border-color: rgba(209,213,210,1) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  color: #f8fafc !important;
}

/* Final authoritative authenticated app button system */
body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
body.app[data-authenticated="1"] input[type="submit"],
body.app[data-authenticated="1"] input[type="button"],
body.app[data-authenticated="1"] .button,
body.app[data-authenticated="1"] a.button,
body.app[data-authenticated="1"] a[role="button"],
body.app[data-authenticated="1"] .pill-link,
body.app[data-authenticated="1"] .secondary-button,
body.app[data-authenticated="1"] .settings-save-btn,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
body.app[data-authenticated="1"] .dashboard-workout-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
body.app[data-authenticated="1"] .messages-primary-cta,
body.app[data-authenticated="1"] .contacts-primary-btn,
body.app[data-authenticated="1"] .contacts-message-btn,
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .plan-day-edit-btn,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  --ui-btn-bg: var(--ui-btn-default-bg);
  --ui-btn-border: var(--ui-btn-default-border);
  --ui-btn-fg: var(--ui-btn-default-fg);
  --ui-btn-hover-bg: var(--ui-btn-default-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-default-hover-border);
  --ui-btn-active-bg: var(--ui-btn-hover-bg);
  --ui-btn-active-border: var(--ui-btn-hover-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-gap);
  min-height: var(--ui-btn-min-height);
  padding: var(--ui-btn-padding-y) var(--ui-btn-padding-x);
  border-radius: var(--ui-btn-radius) !important;
  border: 1px solid var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .pill-link.secondary,
body.app[data-authenticated="1"] .secondary-button,
body.app[data-authenticated="1"] .secondary,
body.app[data-authenticated="1"] a.secondary[role="button"],
body.app[data-authenticated="1"] button.secondary{
  --ui-btn-bg: var(--ui-btn-secondary-bg);
  --ui-btn-border: var(--ui-btn-secondary-border);
  --ui-btn-fg: var(--ui-btn-secondary-fg);
  --ui-btn-hover-bg: var(--ui-btn-secondary-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-secondary-hover-border);
}

html[data-theme="light"] body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] input[type="submit"],
html[data-theme="light"] body.app[data-authenticated="1"] input[type="button"],
html[data-theme="light"] body.app[data-authenticated="1"] .button,
html[data-theme="light"] body.app[data-authenticated="1"] a.button,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"],
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary-button,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  --ui-btn-bg: var(--ui-btn-light-bg);
  --ui-btn-border: var(--ui-btn-light-border);
  --ui-btn-fg: var(--ui-btn-light-fg);
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-light-hover-border);
  --ui-btn-active-bg: var(--ui-btn-light-hover-bg);
  --ui-btn-active-border: var(--ui-btn-light-hover-border);
}

html[data-theme="dark"] body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="submit"],
html[data-theme="dark"] body.app[data-authenticated="1"] input[type="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .button,
html[data-theme="dark"] body.app[data-authenticated="1"] a.button,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"],
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  --ui-btn-bg: var(--ui-btn-dark-bg);
  --ui-btn-border: var(--ui-btn-dark-border);
  --ui-btn-fg: var(--ui-btn-dark-fg);
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-dark-hover-border);
  --ui-btn-active-bg: var(--ui-btn-dark-hover-bg);
  --ui-btn-active-border: var(--ui-btn-dark-hover-border);
}

body.app[data-authenticated="1"] .auto-save-btn,
body.app[data-authenticated="1"] .day-save-btn,
body.app[data-authenticated="1"] .btn-success{
  --ui-btn-bg: var(--ui-btn-success-bg);
  --ui-btn-border: var(--ui-btn-success-border);
  --ui-btn-fg: var(--ui-btn-success-fg);
  --ui-btn-hover-bg: var(--ui-btn-success-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-success-hover-border);
}

body.app[data-authenticated="1"] .auto-danger-btn,
body.app[data-authenticated="1"] .plan-cancel-btn,
body.app[data-authenticated="1"] .subtle-danger-btn,
body.app[data-authenticated="1"] .is-danger,
body.app[data-authenticated="1"] .btn-danger{
  --ui-btn-bg: var(--ui-btn-danger-bg);
  --ui-btn-border: var(--ui-btn-danger-border);
  --ui-btn-fg: var(--ui-btn-danger-fg);
  --ui-btn-hover-bg: var(--ui-btn-danger-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-danger-hover-border);
}

body.app[data-authenticated="1"] .messages-primary-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
body.app[data-authenticated="1"] .contacts-primary-btn,
body.app[data-authenticated="1"] .day-complete-btn,
body.app[data-authenticated="1"] .btn-primary{
  --ui-btn-bg: var(--ui-btn-primary-bg);
  --ui-btn-border: var(--ui-btn-primary-border);
  --ui-btn-fg: var(--ui-btn-primary-fg);
  --ui-btn-hover-bg: var(--ui-btn-primary-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-primary-hover-border);
}

body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):hover,
body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):focus,
body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):focus-visible,
body.app[data-authenticated="1"] input[type="submit"]:hover,
body.app[data-authenticated="1"] input[type="submit"]:focus,
body.app[data-authenticated="1"] input[type="submit"]:focus-visible,
body.app[data-authenticated="1"] input[type="button"]:hover,
body.app[data-authenticated="1"] input[type="button"]:focus,
body.app[data-authenticated="1"] input[type="button"]:focus-visible,
body.app[data-authenticated="1"] .button:hover,
body.app[data-authenticated="1"] .button:focus,
body.app[data-authenticated="1"] .button:focus-visible,
body.app[data-authenticated="1"] a.button:hover,
body.app[data-authenticated="1"] a.button:focus,
body.app[data-authenticated="1"] a.button:focus-visible,
body.app[data-authenticated="1"] a[role="button"]:hover,
body.app[data-authenticated="1"] a[role="button"]:focus,
body.app[data-authenticated="1"] a[role="button"]:focus-visible,
body.app[data-authenticated="1"] .pill-link:hover,
body.app[data-authenticated="1"] .pill-link:focus,
body.app[data-authenticated="1"] .pill-link:focus-visible,
body.app[data-authenticated="1"] .secondary-button:hover,
body.app[data-authenticated="1"] .secondary-button:focus,
body.app[data-authenticated="1"] .secondary-button:focus-visible,
body.app[data-authenticated="1"] .settings-save-btn:hover,
body.app[data-authenticated="1"] .settings-save-btn:focus,
body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
body.app[data-authenticated="1"] .messages-primary-cta:hover,
body.app[data-authenticated="1"] .messages-primary-cta:focus,
body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
body.app[data-authenticated="1"] .contacts-primary-btn:hover,
body.app[data-authenticated="1"] .contacts-primary-btn:focus,
body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-message-btn:hover,
body.app[data-authenticated="1"] .contacts-message-btn:focus,
body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:hover,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-checkin-btn:hover,
body.app[data-authenticated="1"] .history-checkin-btn:focus,
body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible,
body.app[data-authenticated="1"] .history-month-btn:hover,
body.app[data-authenticated="1"] .history-month-btn:focus,
body.app[data-authenticated="1"] .history-month-btn:focus-visible,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible{
  background: var(--ui-btn-hover-bg) !important;
  border-color: var(--ui-btn-hover-border) !important;
  color: var(--ui-btn-fg) !important;
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] button:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):active,
body.app[data-authenticated="1"] input[type="submit"]:active,
body.app[data-authenticated="1"] input[type="button"]:active,
body.app[data-authenticated="1"] .button:active,
body.app[data-authenticated="1"] a.button:active,
body.app[data-authenticated="1"] a[role="button"]:active,
body.app[data-authenticated="1"] .pill-link:active,
body.app[data-authenticated="1"] .secondary-button:active,
body.app[data-authenticated="1"] .settings-save-btn:active,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
body.app[data-authenticated="1"] .dashboard-workout-cta:active,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active,
body.app[data-authenticated="1"] .messages-primary-cta:active,
body.app[data-authenticated="1"] .contacts-primary-btn:active,
body.app[data-authenticated="1"] .contacts-message-btn:active,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .history-checkin-btn:active,
body.app[data-authenticated="1"] .plan-day-edit-btn:active,
body.app[data-authenticated="1"] .history-month-btn:active,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active{
  background: var(--ui-btn-active-bg) !important;
  border-color: var(--ui-btn-active-border) !important;
  color: var(--ui-btn-fg) !important;
  transform: translateY(0) !important;
}

/* Emoji reaction options stay fully transparent (no per-emoji box), even
   when selected. The broad authenticated button rule above (specificity
   0,6,3) paints every button; these theme-prefixed doubled-class selectors
   match that specificity and win on source order. */
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option,
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.is-active,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.is-active,
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:active,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:active{
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option:focus-visible{
  background: var(--soft) !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .pill-link .nav-icon-lucide,
body.app[data-authenticated="1"] .button .nav-icon-lucide,
body.app[data-authenticated="1"] a.button .nav-icon-lucide,
body.app[data-authenticated="1"] .secondary-button .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-save-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide,
body.app[data-authenticated="1"] .messages-primary-cta .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-primary-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-message-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-page-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-checkin-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .plan-day-edit-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-month-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

/* Final page-specific button cleanup for progress/history */
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-range-filter .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn{
  background: var(--ui-btn-dark-bg) !important;
  border-color: var(--ui-btn-dark-border) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus-visible{
  background: var(--ui-btn-dark-hover-bg) !important;
  border-color: var(--ui-btn-dark-hover-border) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-range-filter .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn{
  background: var(--ui-btn-light-bg) !important;
  border-color: var(--ui-btn-light-border) !important;
  color: var(--ui-btn-light-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-range-filter .pill-link:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus-visible{
  background: var(--ui-btn-light-hover-bg) !important;
  border-color: var(--ui-btn-light-hover-border) !important;
  color: var(--ui-btn-light-fg) !important;
}

body.app[data-authenticated="1"] .progress-primary-btn,
body.app[data-authenticated="1"] .progress-subtab-btn.active,
body.app[data-authenticated="1"] .progress-range-filter .pill-link.active,
body.app[data-authenticated="1"] .progress-photo-angle-tab.active,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn.active{
  background: var(--ui-btn-primary-bg) !important;
  border-color: var(--ui-btn-primary-border) !important;
  color: var(--ui-btn-primary-fg) !important;
}

/* Final authenticated button coverage sweep */
body.app[data-authenticated="1"] .progress-subtab-btn,
body.app[data-authenticated="1"] .progress-action-btn,
body.app[data-authenticated="1"] .progress-photo-angle-tab,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .contacts-primary-btn,
body.app[data-authenticated="1"] .contacts-secondary-btn,
body.app[data-authenticated="1"] .contacts-message-btn,
body.app[data-authenticated="1"] .messages-primary-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
body.app[data-authenticated="1"] .settings-save-btn,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
body.app[data-authenticated="1"] #clear-local-cache-btn,
body.app[data-authenticated="1"] .macropro-toggle,
body.app[data-authenticated="1"] .macropro-copy-btn,
body.app[data-authenticated="1"] #macropro-calculate,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
body.app[data-authenticated="1"] .booking-link-save-btn,
body.app[data-authenticated="1"] .booking-link-add-btn,
body.app[data-authenticated="1"] .coach-client-payment-action-btn,
body.app[data-authenticated="1"] .coach-client-payment-row-btn,
body.app[data-authenticated="1"] .coach-client-history-jump-submit,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn,
body.app[data-authenticated="1"] .coach-automations-new-btn,
body.app[data-authenticated="1"] .coach-automation-use-btn,
body.app[data-authenticated="1"] .coach-automation-action-btn,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn,
body.app[data-authenticated="1"] .coach-automation-variable-btn,
body.app[data-authenticated="1"] .coach-automation-accent-btn,
body.app[data-authenticated="1"] .coach-automation-tab,
body.app[data-authenticated="1"] .coach-payments-save-btn,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action,
body.app[data-authenticated="1"] .plan-day-edit-btn {
  --ui-btn-bg: var(--ui-btn-default-bg);
  --ui-btn-border: var(--ui-btn-default-border);
  --ui-btn-fg: var(--ui-btn-default-fg);
  --ui-btn-hover-bg: var(--ui-btn-default-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-default-hover-border);
  --ui-btn-active-bg: var(--ui-btn-hover-bg);
  --ui-btn-active-border: var(--ui-btn-hover-border);
  border-color: var(--ui-btn-border) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-secondary-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #clear-local-cache-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="light"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-add-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-payment-row-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-client-history-jump-submit,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-close-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-new-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-use-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-toolbar-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-variable-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-accent-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automation-tab,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-payments-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn {
  --ui-btn-bg: var(--ui-btn-light-bg);
  --ui-btn-border: var(--ui-btn-light-border);
  --ui-btn-fg: var(--ui-btn-light-fg);
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-light-hover-border);
  --ui-btn-active-bg: var(--ui-btn-light-hover-bg);
  --ui-btn-active-border: var(--ui-btn-light-hover-border);
}

html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-secondary-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-message-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta,
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #clear-local-cache-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-calculate,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-add-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-row-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-jump-submit,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-close-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-new-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-use-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-toolbar-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-variable-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-accent-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automation-tab,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-payments-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn {
  --ui-btn-bg: var(--ui-btn-dark-bg);
  --ui-btn-border: var(--ui-btn-dark-border);
  --ui-btn-fg: var(--ui-btn-dark-fg);
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-dark-hover-border);
  --ui-btn-active-bg: var(--ui-btn-dark-hover-bg);
  --ui-btn-active-border: var(--ui-btn-dark-hover-border);
}

/* Semantic button variants, reinstated.

   The theme remaps above put every button in the app on one subtle surface,
   and at (0,6,3) they outranked every variant rule, which sit at (0,3,1). So
   primary, success and danger were all rendering identically to a plain
   button: the app had one button appearance in total. Repeating the mappings
   here, after those rules and carrying the same :not() guard chain, reaches
   (0,7,2) and restores the hierarchy that was already intended.

   tinted is the one addition: the accent at low opacity for page and toolbar
   actions, so they read as actions without competing with the primary. */

html[data-theme="light"] body.app[data-authenticated="1"] .btn-primary:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .progress-primary-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .messages-primary-cta:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .contacts-primary-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .day-complete-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .btn-primary:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-primary-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .contacts-primary-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .day-complete-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator){
  --ui-btn-bg: var(--ui-btn-primary-bg);
  --ui-btn-border: var(--ui-btn-primary-border);
  --ui-btn-fg: var(--ui-btn-primary-fg);
  --ui-btn-hover-bg: var(--ui-btn-primary-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-primary-hover-border);
  --ui-btn-active-bg: var(--ui-btn-primary-hover-bg);
  --ui-btn-active-border: var(--ui-btn-primary-hover-border);
}

html[data-theme="light"] body.app[data-authenticated="1"] .auto-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .day-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .btn-success:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .day-save-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .btn-success:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator){
  --ui-btn-bg: var(--ui-btn-success-bg);
  --ui-btn-border: var(--ui-btn-success-border);
  --ui-btn-fg: var(--ui-btn-success-fg);
  --ui-btn-hover-bg: var(--ui-btn-success-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-success-hover-border);
  --ui-btn-active-bg: var(--ui-btn-success-hover-bg);
  --ui-btn-active-border: var(--ui-btn-success-hover-border);
}

html[data-theme="light"] body.app[data-authenticated="1"] .auto-danger-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .plan-cancel-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .subtle-danger-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .is-danger:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .btn-danger:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .auto-danger-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-cancel-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .subtle-danger-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .is-danger:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .btn-danger:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator){
  --ui-btn-bg: var(--ui-btn-danger-bg);
  --ui-btn-border: var(--ui-btn-danger-border);
  --ui-btn-fg: var(--ui-btn-danger-fg);
  --ui-btn-hover-bg: var(--ui-btn-danger-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-danger-hover-border);
  --ui-btn-active-bg: var(--ui-btn-danger-hover-bg);
  --ui-btn-active-border: var(--ui-btn-danger-hover-border);
}

html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-action:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .plan-day-edit-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-action:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-day-edit-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator),
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator){
  --ui-btn-bg: var(--ui-btn-tinted-bg);
  --ui-btn-border: var(--ui-btn-tinted-border);
  --ui-btn-fg: var(--ui-btn-tinted-fg);
  --ui-btn-hover-bg: var(--ui-btn-tinted-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-tinted-hover-border);
  --ui-btn-active-bg: var(--ui-btn-tinted-hover-bg);
  --ui-btn-active-border: var(--ui-btn-tinted-hover-border);
}

body.app[data-authenticated="1"] .progress-subtab-btn:hover,
body.app[data-authenticated="1"] .progress-subtab-btn:focus,
body.app[data-authenticated="1"] .progress-subtab-btn:focus-visible,
body.app[data-authenticated="1"] .progress-action-btn:hover,
body.app[data-authenticated="1"] .progress-action-btn:focus,
body.app[data-authenticated="1"] .progress-action-btn:focus-visible,
body.app[data-authenticated="1"] .progress-photo-angle-tab:hover,
body.app[data-authenticated="1"] .progress-photo-angle-tab:focus,
body.app[data-authenticated="1"] .progress-photo-angle-tab:focus-visible,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn:hover,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:hover,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-checkin-btn:hover,
body.app[data-authenticated="1"] .history-checkin-btn:focus,
body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
body.app[data-authenticated="1"] .history-month-btn:hover,
body.app[data-authenticated="1"] .history-month-btn:focus,
body.app[data-authenticated="1"] .history-month-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-primary-btn:hover,
body.app[data-authenticated="1"] .contacts-primary-btn:focus,
body.app[data-authenticated="1"] .contacts-primary-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-secondary-btn:hover,
body.app[data-authenticated="1"] .contacts-secondary-btn:focus,
body.app[data-authenticated="1"] .contacts-secondary-btn:focus-visible,
body.app[data-authenticated="1"] .contacts-message-btn:hover,
body.app[data-authenticated="1"] .contacts-message-btn:focus,
body.app[data-authenticated="1"] .contacts-message-btn:focus-visible,
body.app[data-authenticated="1"] .messages-primary-cta:hover,
body.app[data-authenticated="1"] .messages-primary-cta:focus,
body.app[data-authenticated="1"] .messages-primary-cta:focus-visible,
body.app[data-authenticated="1"] .dashboard-workout-cta:hover,
body.app[data-authenticated="1"] .dashboard-workout-cta:focus,
body.app[data-authenticated="1"] .dashboard-workout-cta:focus-visible,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:hover,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:focus-visible,
body.app[data-authenticated="1"] .settings-save-btn:hover,
body.app[data-authenticated="1"] .settings-save-btn:focus,
body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
body.app[data-authenticated="1"] #clear-local-cache-btn:hover,
body.app[data-authenticated="1"] #clear-local-cache-btn:focus,
body.app[data-authenticated="1"] #clear-local-cache-btn:focus-visible,
body.app[data-authenticated="1"] .macropro-toggle:hover,
body.app[data-authenticated="1"] .macropro-toggle:focus,
body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
body.app[data-authenticated="1"] .macropro-copy-btn:hover,
body.app[data-authenticated="1"] .macropro-copy-btn:focus,
body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
body.app[data-authenticated="1"] #macropro-calculate:hover,
body.app[data-authenticated="1"] #macropro-calculate:focus,
body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link:hover,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link:focus,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link:focus-visible,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:hover,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus-visible,
body.app[data-authenticated="1"] .booking-link-save-btn:hover,
body.app[data-authenticated="1"] .booking-link-save-btn:focus,
body.app[data-authenticated="1"] .booking-link-save-btn:focus-visible,
body.app[data-authenticated="1"] .booking-link-add-btn:hover,
body.app[data-authenticated="1"] .booking-link-add-btn:focus,
body.app[data-authenticated="1"] .booking-link-add-btn:focus-visible,
body.app[data-authenticated="1"] .coach-client-payment-action-btn:hover,
body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus,
body.app[data-authenticated="1"] .coach-client-payment-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-client-payment-row-btn:hover,
body.app[data-authenticated="1"] .coach-client-payment-row-btn:focus,
body.app[data-authenticated="1"] .coach-client-payment-row-btn:focus-visible,
body.app[data-authenticated="1"] .coach-client-history-jump-submit:hover,
body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus,
body.app[data-authenticated="1"] .coach-client-history-jump-submit:focus-visible,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn:hover,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn:focus,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn:focus-visible,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn:hover,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn:focus,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn:focus-visible,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:hover,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automations-new-btn:hover,
body.app[data-authenticated="1"] .coach-automations-new-btn:focus,
body.app[data-authenticated="1"] .coach-automations-new-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-use-btn:hover,
body.app[data-authenticated="1"] .coach-automation-use-btn:focus,
body.app[data-authenticated="1"] .coach-automation-use-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-action-btn:hover,
body.app[data-authenticated="1"] .coach-automation-action-btn:focus,
body.app[data-authenticated="1"] .coach-automation-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn:hover,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn:focus,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-variable-btn:hover,
body.app[data-authenticated="1"] .coach-automation-variable-btn:focus,
body.app[data-authenticated="1"] .coach-automation-variable-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-accent-btn:hover,
body.app[data-authenticated="1"] .coach-automation-accent-btn:focus,
body.app[data-authenticated="1"] .coach-automation-accent-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-tab:hover,
body.app[data-authenticated="1"] .coach-automation-tab:focus,
body.app[data-authenticated="1"] .coach-automation-tab:focus-visible,
body.app[data-authenticated="1"] .coach-payments-save-btn:hover,
body.app[data-authenticated="1"] .coach-payments-save-btn:focus,
body.app[data-authenticated="1"] .coach-payments-save-btn:focus-visible,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible,
body.app[data-authenticated="1"] .plan-day-edit-btn:hover,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus,
body.app[data-authenticated="1"] .plan-day-edit-btn:focus-visible {
  background: var(--ui-btn-hover-bg) !important;
  border-color: var(--ui-btn-hover-border) !important;
  color: var(--ui-btn-fg) !important;
}

body.app[data-authenticated="1"] .progress-subtab-btn:active,
body.app[data-authenticated="1"] .progress-action-btn:active,
body.app[data-authenticated="1"] .progress-photo-angle-tab:active,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn:active,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .history-checkin-btn:active,
body.app[data-authenticated="1"] .history-month-btn:active,
body.app[data-authenticated="1"] .contacts-primary-btn:active,
body.app[data-authenticated="1"] .contacts-secondary-btn:active,
body.app[data-authenticated="1"] .contacts-message-btn:active,
body.app[data-authenticated="1"] .messages-primary-cta:active,
body.app[data-authenticated="1"] .dashboard-workout-cta:active,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop:active,
body.app[data-authenticated="1"] .settings-save-btn:active,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn:active,
body.app[data-authenticated="1"] #clear-local-cache-btn:active,
body.app[data-authenticated="1"] .macropro-toggle:active,
body.app[data-authenticated="1"] .macropro-copy-btn:active,
body.app[data-authenticated="1"] #macropro-calculate:active,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link:active,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:active,
body.app[data-authenticated="1"] .booking-link-save-btn:active,
body.app[data-authenticated="1"] .booking-link-add-btn:active,
body.app[data-authenticated="1"] .coach-client-payment-action-btn:active,
body.app[data-authenticated="1"] .coach-client-payment-row-btn:active,
body.app[data-authenticated="1"] .coach-client-history-jump-submit:active,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn:active,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn:active,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn:active,
body.app[data-authenticated="1"] .coach-automations-new-btn:active,
body.app[data-authenticated="1"] .coach-automation-use-btn:active,
body.app[data-authenticated="1"] .coach-automation-action-btn:active,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn:active,
body.app[data-authenticated="1"] .coach-automation-variable-btn:active,
body.app[data-authenticated="1"] .coach-automation-accent-btn:active,
body.app[data-authenticated="1"] .coach-automation-tab:active,
body.app[data-authenticated="1"] .coach-payments-save-btn:active,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:active,
body.app[data-authenticated="1"] .plan-day-edit-btn:active {
  background: var(--ui-btn-active-bg) !important;
  border-color: var(--ui-btn-active-border) !important;
  color: var(--ui-btn-fg) !important;
}

body.app[data-authenticated="1"] .contacts-primary-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-secondary-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .contacts-message-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .messages-primary-cta .nav-icon-lucide,
body.app[data-authenticated="1"] .dashboard-workout-cta .nav-icon-lucide,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-save-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .macropro-toggle .nav-icon-lucide,
body.app[data-authenticated="1"] .macropro-copy-btn .nav-icon-lucide,
body.app[data-authenticated="1"] #macropro-calculate .nav-icon-lucide,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .pill-link .nav-icon-lucide,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button .nav-icon-lucide,
body.app[data-authenticated="1"] .booking-link-save-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .booking-link-add-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-client-payment-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-client-payment-row-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-client-history-jump-submit .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-payment-automation-close-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-payment-automation-cancel-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automations-new-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-use-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-toolbar-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-variable-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-accent-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-automation-tab .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-payments-save-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action .nav-icon-lucide,
body.app[data-authenticated="1"] .plan-day-edit-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

body.app[data-authenticated="1"] .progress-primary-btn,
body.app[data-authenticated="1"] .progress-subtab-btn.active,
body.app[data-authenticated="1"] .progress-range-filter .pill-link.active,
body.app[data-authenticated="1"] .progress-photo-angle-tab.active,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn.active,
body.app[data-authenticated="1"] .contacts-primary-btn,
body.app[data-authenticated="1"] .messages-primary-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta,
body.app[data-authenticated="1"] .dashboard-workout-cta-desktop,
body.app[data-authenticated="1"] .coach-payment-automation-confirm-btn,
body.app[data-authenticated="1"] .coach-automations-new-btn,
body.app[data-authenticated="1"] .coach-automation-use-btn,
body.app[data-authenticated="1"] .coach-automation-action-btn.is-primary,
body.app[data-authenticated="1"] .coach-payments-save-btn,
body.app[data-authenticated="1"] #macropro-calculate{
  background: var(--ui-btn-primary-bg) !important;
  border-color: var(--ui-btn-primary-border) !important;
  color: var(--ui-btn-primary-fg) !important;
}

body.app[data-authenticated="1"] .auto-save-btn,
body.app[data-authenticated="1"] .day-save-btn,
body.app[data-authenticated="1"] .coach-automation-icon-btn.is-success,
body.app[data-authenticated="1"] .coach-payments-icon-btn.is-success{
  background: var(--ui-btn-success-bg) !important;
  border-color: var(--ui-btn-success-border) !important;
  color: var(--ui-btn-success-fg) !important;
}

body.app[data-authenticated="1"] .auto-danger-btn,
body.app[data-authenticated="1"] .plan-cancel-btn,
body.app[data-authenticated="1"] .subtle-danger-btn,
body.app[data-authenticated="1"] .coach-client-payment-row-btn.is-danger,
body.app[data-authenticated="1"] .coach-payment-share-footer-actions .subtle-danger-btn,
body.app[data-authenticated="1"] .coach-automation-icon-btn.is-danger,
body.app[data-authenticated="1"] .coach-payment-share-close.subtle-danger-icon-btn,
body.app[data-authenticated="1"] .coach-payment-share-link-remove.subtle-danger-icon-btn{
  background: var(--ui-btn-danger-bg) !important;
  border-color: var(--ui-btn-danger-border) !important;
  color: var(--ui-btn-danger-fg) !important;
}

/* Final shared close-button system */
:root{
  --ui-close-size: 2.25rem;
  --ui-close-radius: 999px;
  --ui-close-fg: rgba(22,25,22,0.72);
  --ui-close-bg: rgba(255, 255, 255, 0.92);
  --ui-close-border: rgba(159,163,160,0.32);
  --ui-close-hover-fg: rgba(22,25,22,0.88);
  --ui-close-hover-bg: #ffffff;
  --ui-close-hover-border: rgba(159,163,160,0.44);
  --ui-close-active-bg: #f8fafc;
  --ui-close-active-border: rgba(159,163,160,0.5);
}

html[data-theme="dark"]{
  --ui-close-fg: rgba(255, 255, 255, 0.78);
  --ui-close-bg: rgba(39,42,39,0.88);
  --ui-close-border: rgba(159,163,160,0.22);
  --ui-close-hover-fg: rgba(255, 255, 255, 0.94);
  --ui-close-hover-bg: rgba(62,65,62,0.96);
  --ui-close-hover-border: rgba(159,163,160,0.32);
  --ui-close-active-bg: rgba(82,85,82,0.96);
  --ui-close-active-border: rgba(159,163,160,0.4);
}

.plain-close-icon,
.app-update-banner-dismiss,
.messages-announcements-overlay-close,
.custom-food-barcode-close,
.coach-payment-automation-close-btn,
.coach-automation-close-btn,
.locker-share-close-btn,
.coach-payment-share-close,
.sheet-close,
.week-workout-picker-close,
.booking-viewer-fallback-close{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--ui-close-size);
  min-width: var(--ui-close-size);
  height: var(--ui-close-size);
  min-height: var(--ui-close-size);
  padding: 0;
  border-radius: var(--ui-close-radius) !important;
  border: 1px solid var(--ui-close-border) !important;
  background: var(--ui-close-bg) !important;
  color: var(--ui-close-fg) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

.plain-close-icon .nav-icon-lucide,
.app-update-banner-dismiss .nav-icon-lucide,
.messages-announcements-overlay-close .nav-icon-lucide,
.custom-food-barcode-close .nav-icon-lucide,
.coach-payment-automation-close-btn .nav-icon-lucide,
.coach-automation-close-btn .nav-icon-lucide,
.locker-share-close-btn .nav-icon-lucide,
.coach-payment-share-close .nav-icon-lucide,
.sheet-close .nav-icon-lucide,
.week-workout-picker-close .nav-icon-lucide,
.booking-viewer-fallback-close .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: currentColor !important;
  stroke: currentColor !important;
}

.plain-close-icon:hover,
.plain-close-icon:focus,
.plain-close-icon:focus-visible,
.app-update-banner-dismiss:hover,
.app-update-banner-dismiss:focus,
.app-update-banner-dismiss:focus-visible,
.messages-announcements-overlay-close:hover,
.messages-announcements-overlay-close:focus,
.messages-announcements-overlay-close:focus-visible,
.custom-food-barcode-close:hover,
.custom-food-barcode-close:focus,
.custom-food-barcode-close:focus-visible,
.coach-payment-automation-close-btn:hover,
.coach-payment-automation-close-btn:focus,
.coach-payment-automation-close-btn:focus-visible,
.coach-automation-close-btn:hover,
.coach-automation-close-btn:focus,
.coach-automation-close-btn:focus-visible,
.locker-share-close-btn:hover,
.locker-share-close-btn:focus,
.locker-share-close-btn:focus-visible,
.coach-payment-share-close:hover,
.coach-payment-share-close:focus,
.coach-payment-share-close:focus-visible,
.sheet-close:hover,
.sheet-close:focus,
.sheet-close:focus-visible,
.week-workout-picker-close:hover,
.week-workout-picker-close:focus,
.week-workout-picker-close:focus-visible,
.booking-viewer-fallback-close:hover,
.booking-viewer-fallback-close:focus,
.booking-viewer-fallback-close:focus-visible{
  background: var(--ui-close-hover-bg) !important;
  border-color: var(--ui-close-hover-border) !important;
  color: var(--ui-close-hover-fg) !important;
  transform: translateY(-1px);
}

.plain-close-icon:active,
.app-update-banner-dismiss:active,
.messages-announcements-overlay-close:active,
.custom-food-barcode-close:active,
.coach-payment-automation-close-btn:active,
.coach-automation-close-btn:active,
.locker-share-close-btn:active,
.coach-payment-share-close:active,
.sheet-close:active,
.week-workout-picker-close:active,
.booking-viewer-fallback-close:active{
  background: var(--ui-close-active-bg) !important;
  border-color: var(--ui-close-active-border) !important;
  color: var(--ui-close-hover-fg) !important;
  transform: translateY(0);
}

/* Final explicit week-page action override */
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  background: var(--ui-btn-dark-bg) !important;
  border-color: var(--ui-btn-dark-border) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible{
  background: var(--ui-btn-dark-hover-bg) !important;
  border-color: var(--ui-btn-dark-hover-border) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action{
  background: var(--ui-btn-light-bg) !important;
  border-color: var(--ui-btn-light-border) !important;
  color: var(--ui-btn-light-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions a.secondary.week-page-action:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions button.secondary.week-page-action:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .week-page-head .page-actions .week-page-action:focus-visible{
  background: var(--ui-btn-light-hover-bg) !important;
  border-color: var(--ui-btn-light-hover-border) !important;
  color: var(--ui-btn-light-fg) !important;
}

/* Final authenticated secondary-action override */
body.app[data-authenticated="1"] a.secondary:not(.back-link),
body.app[data-authenticated="1"] button.secondary:not(.back-link),
body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link),
body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link),
body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link),
body.app[data-authenticated="1"] .secondary-button:not(.back-link){
  border-radius: var(--ui-btn-radius) !important;
  border: 1px solid var(--ui-btn-secondary-border) !important;
  background: var(--ui-btn-secondary-bg) !important;
  color: var(--ui-btn-secondary-fg) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] a.secondary:not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] button.secondary:not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] .secondary-button:not(.back-link){
  border-color: var(--ui-btn-light-border) !important;
  background: var(--ui-btn-light-bg) !important;
  color: var(--ui-btn-light-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] a.secondary:not(.back-link),
html[data-theme="dark"] body.app[data-authenticated="1"] button.secondary:not(.back-link),
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link),
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link),
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link),
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:not(.back-link){
  border-color: var(--ui-btn-dark-border) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] a.secondary:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] a.secondary:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] a.secondary:not(.back-link):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] button.secondary:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] button.secondary:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] button.secondary:not(.back-link):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):focus-visible{
  border-color: var(--ui-btn-light-hover-border) !important;
  background: var(--ui-btn-light-hover-bg) !important;
  color: var(--ui-btn-light-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] a.secondary:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a.secondary:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a.secondary:not(.back-link):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] button.secondary:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] button.secondary:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] button.secondary:not(.back-link):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .secondary-button:not(.back-link):focus-visible{
  border-color: var(--ui-btn-dark-hover-border) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}

body.app[data-authenticated="1"] a.secondary:not(.back-link):active,
body.app[data-authenticated="1"] button.secondary:not(.back-link):active,
body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link):active,
body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link):active,
body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link):active,
body.app[data-authenticated="1"] .secondary-button:not(.back-link):active{
  transform: translateY(0) !important;
}

body.app[data-authenticated="1"] a.secondary:not(.back-link) .nav-icon-lucide,
body.app[data-authenticated="1"] button.secondary:not(.back-link) .nav-icon-lucide,
body.app[data-authenticated="1"] a[role="button"].secondary:not(.back-link) .nav-icon-lucide,
body.app[data-authenticated="1"] .page-actions .secondary:not(.back-link) .nav-icon-lucide,
body.app[data-authenticated="1"] .pill-link.secondary:not(.back-link) .nav-icon-lucide,
body.app[data-authenticated="1"] .secondary-button:not(.back-link) .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

/* Final explicit page-family button override */
body.app[data-authenticated="1"] .settings-save-btn,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .history-checkin-btn,
body.app[data-authenticated="1"] .history-month-btn,
body.app[data-authenticated="1"] .progress-subtab-btn,
body.app[data-authenticated="1"] .progress-action-btn,
body.app[data-authenticated="1"] .progress-photo-angle-tab,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
body.app[data-authenticated="1"] .macropro-toggle,
body.app[data-authenticated="1"] .macropro-copy-btn,
body.app[data-authenticated="1"] .page-actions.nutrition-actions > a,
body.app[data-authenticated="1"] .page-actions.nutrition-actions > button,
body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle,
body.app[data-authenticated="1"] .coach-library-page .library-add-btn,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger),
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger){
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger),
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger){
  border-color: var(--ui-btn-light-border) !important;
  background-image: none !important;
  background: var(--ui-btn-light-bg) !important;
  background-color: var(--ui-btn-light-bg) !important;
  color: var(--ui-btn-light-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger),
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger){
  border-color: var(--ui-btn-dark-border) !important;
  background-image: none !important;
  background: var(--ui-btn-dark-bg) !important;
  background-color: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-subtab-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-action-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle[aria-expanded="true"],
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):focus-visible
{
  border-color: var(--ui-btn-light-hover-border) !important;
  background-image: none !important;
  background: var(--ui-btn-light-hover-bg) !important;
  background-color: var(--ui-btn-light-hover-bg) !important;
  color: var(--ui-btn-light-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-upgrade-lock-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-checkin-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .history-month-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-subtab-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-action-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-angle-tab:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .progress-photo-compare-date-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > a:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .page-actions.nutrition-actions > .pill-link:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle[aria-expanded="true"],
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-add-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger):focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn:not(.library-icon-btn-danger):focus-visible
{
  border-color: var(--ui-btn-dark-hover-border) !important;
  background-image: none !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .progress-subtab-btn.active,
body.app[data-authenticated="1"] .progress-range-filter .pill-link.active,
body.app[data-authenticated="1"] .progress-photo-angle-tab.active,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn.active,
body.app[data-authenticated="1"] .macropro-toggle.active{
  background-image: none !important;
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  border-color: var(--ui-btn-primary-border) !important;
  color: var(--ui-btn-primary-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn-danger{
  background-image: none !important;
  background: var(--ui-btn-danger-bg) !important;
  background-color: var(--ui-btn-danger-bg) !important;
  border-color: var(--ui-btn-danger-border) !important;
  color: var(--ui-btn-danger-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-add-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-icon-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .page-actions.nutrition-actions .nav-icon-lucide,
body.app[data-authenticated="1"] .nutrition-targets .targets-actions > button .nav-icon-lucide,
body.app[data-authenticated="1"] .history-page-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-checkin-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .history-month-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .progress-subtab-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .progress-action-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .progress-photo-angle-tab .nav-icon-lucide,
body.app[data-authenticated="1"] .progress-photo-compare-date-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-save-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .settings-upgrade-lock-btn .nav-icon-lucide,
body.app[data-authenticated="1"] .macropro-toggle .nav-icon-lucide,
body.app[data-authenticated="1"] .macropro-copy-btn .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

/* Final button cleanup: remove legacy glow/shadow treatment from shared app buttons */
body.app[data-authenticated="1"] .settings-save-btn,
body.app[data-authenticated="1"] .settings-save-btn:hover,
body.app[data-authenticated="1"] .settings-save-btn:focus,
body.app[data-authenticated="1"] .settings-save-btn:focus-visible,
body.app[data-authenticated="1"] .settings-save-btn:active,
body.app[data-authenticated="1"] .macropro-toggle,
body.app[data-authenticated="1"] .macropro-toggle:hover,
body.app[data-authenticated="1"] .macropro-toggle:focus,
body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
body.app[data-authenticated="1"] .macropro-toggle:active,
body.app[data-authenticated="1"] .macropro-toggle.active,
body.app[data-authenticated="1"] .macropro-copy-btn,
body.app[data-authenticated="1"] .macropro-copy-btn:hover,
body.app[data-authenticated="1"] .macropro-copy-btn:focus,
body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
body.app[data-authenticated="1"] .macropro-copy-btn:active,
body.app[data-authenticated="1"] #macropro-calculate,
body.app[data-authenticated="1"] #macropro-calculate:hover,
body.app[data-authenticated="1"] #macropro-calculate:focus,
body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
body.app[data-authenticated="1"] #macropro-calculate:active,
body.app[data-authenticated="1"] .booking-link-save-btn,
body.app[data-authenticated="1"] .booking-link-save-btn:hover,
body.app[data-authenticated="1"] .booking-link-save-btn:focus,
body.app[data-authenticated="1"] .booking-link-save-btn:focus-visible,
body.app[data-authenticated="1"] .booking-link-save-btn:active,
body.app[data-authenticated="1"] .coach-payments-save-btn,
body.app[data-authenticated="1"] .coach-payments-save-btn:hover,
body.app[data-authenticated="1"] .coach-payments-save-btn:focus,
body.app[data-authenticated="1"] .coach-payments-save-btn:focus-visible,
body.app[data-authenticated="1"] .coach-payments-save-btn:active,
body.app[data-authenticated="1"] .auto-save-btn,
body.app[data-authenticated="1"] .auto-save-btn:hover,
body.app[data-authenticated="1"] .auto-save-btn:focus,
body.app[data-authenticated="1"] .auto-save-btn:focus-visible,
body.app[data-authenticated="1"] .auto-save-btn:active,
body.app[data-authenticated="1"] .day-save-btn,
body.app[data-authenticated="1"] .day-save-btn:hover,
body.app[data-authenticated="1"] .day-save-btn:focus,
body.app[data-authenticated="1"] .day-save-btn:focus-visible,
body.app[data-authenticated="1"] .day-save-btn:active,
body.app[data-authenticated="1"] .plan-save-btn,
body.app[data-authenticated="1"] .plan-save-btn:hover,
body.app[data-authenticated="1"] .plan-save-btn:focus,
body.app[data-authenticated="1"] .plan-save-btn:focus-visible,
body.app[data-authenticated="1"] .plan-save-btn:active,
body.app[data-authenticated="1"] .subtle-save-btn,
body.app[data-authenticated="1"] .subtle-save-btn:hover,
body.app[data-authenticated="1"] .subtle-save-btn:focus,
body.app[data-authenticated="1"] .subtle-save-btn:focus-visible,
body.app[data-authenticated="1"] .subtle-save-btn:active,
body.app[data-authenticated="1"] .checkin-save-btn,
body.app[data-authenticated="1"] .checkin-save-btn:hover,
body.app[data-authenticated="1"] .checkin-save-btn:focus,
body.app[data-authenticated="1"] .checkin-save-btn:focus-visible,
body.app[data-authenticated="1"] .checkin-save-btn:active,
body.app[data-authenticated="1"] .water-goal-save-btn,
body.app[data-authenticated="1"] .water-goal-save-btn:hover,
body.app[data-authenticated="1"] .water-goal-save-btn:focus,
body.app[data-authenticated="1"] .water-goal-save-btn:focus-visible,
body.app[data-authenticated="1"] .water-goal-save-btn:active{
  box-shadow: none !important;
  text-shadow: none !important;
  background-image: none !important;
  filter: none !important;
  -webkit-box-shadow: none !important;
}

/* Final authoritative icon-only button system */
body.app[data-authenticated="1"] .btn-icon-only,
body.app[data-authenticated="1"] .icon-btn,
body.app[data-authenticated="1"] .appbar-icon-btn,
body.app[data-authenticated="1"] .appbar-workout-timer-btn,
body.app[data-authenticated="1"] .message-menu-trigger,
body.app[data-authenticated="1"] .messages-sidebar-announcements,
body.app[data-authenticated="1"] .messages-sidebar-compose,
body.app[data-authenticated="1"] .coach-automation-icon-btn,
body.app[data-authenticated="1"] .coach-payments-icon-btn,
body.app[data-authenticated="1"] .feed-action-button,
body.app[data-authenticated="1"] .feed-kudos-btn,
body.app[data-authenticated="1"] .feed-comment-btn{
  width: var(--ui-icon-btn-size) !important;
  min-width: var(--ui-icon-btn-size) !important;
  height: var(--ui-icon-btn-size) !important;
  min-height: var(--ui-icon-btn-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-width: 0 !important;
  border-color: transparent !important;
  border-radius: var(--ui-icon-btn-radius) !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  color: var(--ui-icon-btn-fg) !important;
}

body.app[data-authenticated="1"] .btn-icon-only:hover,
body.app[data-authenticated="1"] .btn-icon-only:focus,
body.app[data-authenticated="1"] .btn-icon-only:focus-visible,
body.app[data-authenticated="1"] .btn-icon-only:active,
body.app[data-authenticated="1"] .icon-btn:hover,
body.app[data-authenticated="1"] .icon-btn:focus,
body.app[data-authenticated="1"] .icon-btn:focus-visible,
body.app[data-authenticated="1"] .icon-btn:active,
body.app[data-authenticated="1"] .appbar-icon-btn:hover,
body.app[data-authenticated="1"] .appbar-icon-btn:focus,
body.app[data-authenticated="1"] .appbar-icon-btn:focus-visible,
body.app[data-authenticated="1"] .appbar-icon-btn:active,
body.app[data-authenticated="1"] .appbar-workout-timer-btn:hover,
body.app[data-authenticated="1"] .appbar-workout-timer-btn:focus,
body.app[data-authenticated="1"] .appbar-workout-timer-btn:focus-visible,
body.app[data-authenticated="1"] .appbar-workout-timer-btn:active,
body.app[data-authenticated="1"] .message-menu-trigger:hover,
body.app[data-authenticated="1"] .message-menu-trigger:focus,
body.app[data-authenticated="1"] .message-menu-trigger:focus-visible,
body.app[data-authenticated="1"] .message-menu-trigger:active,
body.app[data-authenticated="1"] .messages-sidebar-announcements:hover,
body.app[data-authenticated="1"] .messages-sidebar-announcements:focus,
body.app[data-authenticated="1"] .messages-sidebar-announcements:focus-visible,
body.app[data-authenticated="1"] .messages-sidebar-announcements:active,
body.app[data-authenticated="1"] .messages-sidebar-compose:hover,
body.app[data-authenticated="1"] .messages-sidebar-compose:focus,
body.app[data-authenticated="1"] .messages-sidebar-compose:focus-visible,
body.app[data-authenticated="1"] .messages-sidebar-compose:active,
body.app[data-authenticated="1"] .coach-automation-icon-btn:hover,
body.app[data-authenticated="1"] .coach-automation-icon-btn:focus,
body.app[data-authenticated="1"] .coach-automation-icon-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automation-icon-btn:active,
body.app[data-authenticated="1"] .coach-payments-icon-btn:hover,
body.app[data-authenticated="1"] .coach-payments-icon-btn:focus,
body.app[data-authenticated="1"] .coach-payments-icon-btn:focus-visible,
body.app[data-authenticated="1"] .coach-payments-icon-btn:active,
body.app[data-authenticated="1"] .feed-action-button:hover,
body.app[data-authenticated="1"] .feed-action-button:focus,
body.app[data-authenticated="1"] .feed-action-button:focus-visible,
body.app[data-authenticated="1"] .feed-action-button:active,
body.app[data-authenticated="1"] .feed-kudos-btn:hover,
body.app[data-authenticated="1"] .feed-kudos-btn:focus,
body.app[data-authenticated="1"] .feed-kudos-btn:focus-visible,
body.app[data-authenticated="1"] .feed-kudos-btn:active,
body.app[data-authenticated="1"] .feed-comment-btn:hover,
body.app[data-authenticated="1"] .feed-comment-btn:focus,
body.app[data-authenticated="1"] .feed-comment-btn:focus-visible,
body.app[data-authenticated="1"] .feed-comment-btn:active{
  border: 0 !important;
  border-width: 0 !important;
  border-color: transparent !important;
  background: var(--ui-icon-btn-hover-bg) !important;
  background-color: var(--ui-icon-btn-hover-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--ui-icon-btn-fg) !important;
}

/* Final authoritative macro calculator button theme */
body.app[data-authenticated="1"] .macropro-toggle,
body.app[data-authenticated="1"] .macropro-copy-btn,
body.app[data-authenticated="1"] #macropro-calculate,
body.public-site .macropro-toggle,
body.public-site .macropro-copy-btn,
body.public-site #macropro-calculate{
  --_macro-btn-bg: var(--ui-btn-bg, var(--ui-btn-default-bg));
  --_macro-btn-border: var(--ui-btn-border, var(--ui-btn-default-border));
  --_macro-btn-fg: var(--ui-btn-fg, var(--ui-btn-default-fg));
  --_macro-btn-hover-bg: var(--ui-btn-hover-bg, var(--ui-btn-default-hover-bg));
  --_macro-btn-hover-border: var(--ui-btn-hover-border, var(--ui-btn-default-hover-border));
  border: 1px solid var(--_macro-btn-border) !important;
  border-radius: var(--btn-radius) !important;
  background: var(--_macro-btn-bg) !important;
  background-color: var(--_macro-btn-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--_macro-btn-fg) !important;
}

body.app[data-authenticated="1"] .macropro-toggle:hover,
body.app[data-authenticated="1"] .macropro-toggle:focus,
body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
body.app[data-authenticated="1"] .macropro-toggle:active,
body.app[data-authenticated="1"] .macropro-copy-btn:hover,
body.app[data-authenticated="1"] .macropro-copy-btn:focus,
body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
body.app[data-authenticated="1"] .macropro-copy-btn:active,
body.app[data-authenticated="1"] #macropro-calculate:hover,
body.app[data-authenticated="1"] #macropro-calculate:focus,
body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
body.app[data-authenticated="1"] #macropro-calculate:active,
body.public-site .macropro-toggle:hover,
body.public-site .macropro-toggle:focus,
body.public-site .macropro-toggle:focus-visible,
body.public-site .macropro-toggle:active,
body.public-site .macropro-copy-btn:hover,
body.public-site .macropro-copy-btn:focus,
body.public-site .macropro-copy-btn:focus-visible,
body.public-site .macropro-copy-btn:active,
body.public-site #macropro-calculate:hover,
body.public-site #macropro-calculate:focus,
body.public-site #macropro-calculate:focus-visible,
body.public-site #macropro-calculate:active{
  border-color: var(--_macro-btn-hover-border) !important;
  background: var(--_macro-btn-hover-bg) !important;
  background-color: var(--_macro-btn-hover-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--_macro-btn-fg) !important;
}

body.app[data-authenticated="1"] .macropro-toggle.active,
body.public-site .macropro-toggle.active{
  border-color: var(--ui-btn-primary-border) !important;
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--ui-btn-primary-fg) !important;
}

body.app[data-authenticated="1"] .macropro-toggle .nav-icon-lucide,
body.app[data-authenticated="1"] .macropro-copy-btn .nav-icon-lucide,
body.app[data-authenticated="1"] #macropro-calculate .nav-icon-lucide,
body.public-site .macropro-toggle .nav-icon-lucide,
body.public-site .macropro-copy-btn .nav-icon-lucide,
body.public-site #macropro-calculate .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

body.app[data-authenticated="1"] .macropro-controls,
body.app[data-authenticated="1"] .macropro-results-actions,
body.public-site .macropro-controls,
body.public-site .macropro-results-actions{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-copy-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-export,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-export:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-export:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-export:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-export:active,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-copy,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-copy:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-copy:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-copy:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-copy:active{
  border-color: rgba(71,85,105,.52) !important;
  background: #1f2933 !important;
  background-color: #1f2933 !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  filter: none !important;
  text-shadow: none !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-toggle.active:active{
  border-color: var(--ui-btn-primary-border) !important;
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  filter: none !important;
  text-shadow: none !important;
  color: var(--ui-btn-primary-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls{
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle:active{
  border-color: rgba(255,255,255,.12) !important;
  background: #1f2933 !important;
  background-color: #1f2933 !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  filter: none !important;
  text-shadow: none !important;
  transform: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle.active,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle.active:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle.active:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle.active:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-controls .macropro-toggle.active:active{
  border-color: var(--ui-btn-primary-bg) !important;
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  filter: none !important;
  text-shadow: none !important;
  transform: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  color: var(--ui-btn-primary-fg) !important;
}

body.app[data-authenticated="1"] .macropro-toggle,
body.app[data-authenticated="1"] .macropro-toggle:hover,
body.app[data-authenticated="1"] .macropro-toggle:focus,
body.app[data-authenticated="1"] .macropro-toggle:focus-visible,
body.app[data-authenticated="1"] .macropro-toggle:active,
body.app[data-authenticated="1"] .macropro-copy-btn,
body.app[data-authenticated="1"] .macropro-copy-btn:hover,
body.app[data-authenticated="1"] .macropro-copy-btn:focus,
body.app[data-authenticated="1"] .macropro-copy-btn:focus-visible,
body.app[data-authenticated="1"] .macropro-copy-btn:active,
body.app[data-authenticated="1"] #macropro-calculate,
body.app[data-authenticated="1"] #macropro-calculate:hover,
body.app[data-authenticated="1"] #macropro-calculate:focus,
body.app[data-authenticated="1"] #macropro-calculate:focus-visible,
body.app[data-authenticated="1"] #macropro-calculate:active{
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

/* Final authoritative shared non-icon button system */
body.app[data-authenticated="1"] :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):not(.macropro-toggle):not(.messages-search-clear),
body.public-site :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close){
  --_ui-btn-bg: var(--ui-btn-bg, var(--ui-btn-default-bg));
  --_ui-btn-border: var(--ui-btn-border, var(--ui-btn-default-border));
  --_ui-btn-fg: var(--ui-btn-fg, var(--ui-btn-default-fg));
  --_ui-btn-hover-bg: var(--ui-btn-hover-bg, var(--ui-btn-default-hover-bg));
  --_ui-btn-hover-border: var(--ui-btn-hover-border, var(--ui-btn-default-hover-border));
  --_ui-btn-active-bg: var(--ui-btn-active-bg, var(--_ui-btn-hover-bg));
  --_ui-btn-active-border: var(--ui-btn-active-border, var(--_ui-btn-hover-border));
  border: var(--ui-btn-border-width) solid var(--_ui-btn-border) !important;
  border-radius: var(--ui-btn-radius) !important;
  background: var(--_ui-btn-bg) !important;
  background-color: var(--_ui-btn-bg) !important;
  background-image: var(--ui-btn-glossy-bg-image, none) !important;
  box-shadow: var(--ui-btn-glossy-shadow, none) !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--_ui-btn-fg) !important;
}

body.app[data-authenticated="1"] :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):not(.macropro-toggle):not(.messages-search-clear):hover,
body.app[data-authenticated="1"] :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):not(.macropro-toggle):not(.messages-search-clear):focus,
body.app[data-authenticated="1"] :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):not(.macropro-toggle):not(.messages-search-clear):focus-visible,
body.app[data-authenticated="1"] :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):not(.macropro-toggle):not(.messages-search-clear):active,
body.public-site :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):hover,
body.public-site :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):focus,
body.public-site :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):focus-visible,
body.public-site :where(button, input[type="submit"], input[type="button"], .btn, .button, a.button, a[role="button"], .pill-link, .secondary-button, .public-btn-primary, .public-btn-ghost, .plan-cta, .pricing-cta, .plan-cta-btn, a.secondary, button.secondary, .secondary[role="button"], .secondary):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.message-menu-trigger):not(.messages-sidebar-announcements):not(.messages-sidebar-compose):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-kudos-btn):not(.feed-comment-btn):not(.feed-expand):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.app-update-banner-dismiss):not(.messages-announcements-overlay-close):not(.custom-food-barcode-close):not(.coach-payment-automation-close-btn):not(.coach-automation-close-btn):not(.locker-share-close-btn):not(.coach-payment-share-close):not(.sheet-close):not(.week-workout-picker-close):not(.booking-viewer-fallback-close):active{
  border-color: var(--_ui-btn-hover-border) !important;
  background: var(--_ui-btn-hover-bg) !important;
  background-color: var(--_ui-btn-hover-bg) !important;
  background-image: var(--ui-btn-glossy-bg-image-hover, none) !important;
  box-shadow: var(--ui-btn-glossy-shadow-hover, none) !important;
  text-shadow: none !important;
  filter: none !important;
  color: var(--_ui-btn-fg) !important;
}

/* Glossy dark-mode treatment for plain/default and secondary buttons.
   Explicitly skips colored variants (primary/info/danger/success/warning)
   and nav-style chips (pill-link) so only actual action buttons pick
   this up, not colored CTAs or navigation links. */
html[data-theme="dark"] body.app[data-authenticated="1"] :where(button, .btn, .button, a.button, a[role="button"], input[type="submit"], input[type="button"]):not(.btn-primary):not(.btn-info):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.is-danger):not(.pill-link):not(.public-btn-primary):not(.public-btn-ghost):not(.plan-cta):not(.pricing-cta):not(.plan-cta-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn){
  --ui-btn-glossy-bg-image:
    var(--ui-btn-glossy-surface-image);
  --ui-btn-glossy-bg-image-hover:
    var(--ui-btn-glossy-surface-image-hover);
  --ui-btn-glossy-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.55),
    0 3px 10px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5);
  --ui-btn-glossy-shadow-hover:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5);
}

/* Same glossy treatment for other page-specific action buttons that use
   .pill-link as a base class alongside a distinguishing action class, so
   they're excluded from the rule above (which skips .pill-link broadly
   to leave nav/tab chips alone) and opted in individually here instead:
   History/Progress actions (check-in, view progress, compare photos, log
   goal, etc), Library actions (upload, week builder, add exercise),
   workout set actions (add set, remove set), the watch-demo video
   launcher, and the Progress page's sub-tabs and date-range filter.
   Photo-angle tabs are still NOT included. */
html[data-theme="dark"] body.app[data-authenticated="1"] :where(.progress-primary-btn, .progress-action-btn, .progress-photo-compare-date-btn, .history-page-action-btn, .history-checkin-btn, .library-icon-btn, .set-add-btn, .set-remove-btn, .video-launch, .progress-subtab-btn, .progress-range-filter button, .progress-photo-angle-tab, .day-complete-btn){
  --ui-btn-glossy-bg-image:
    var(--ui-btn-glossy-surface-image);
  --ui-btn-glossy-bg-image-hover:
    var(--ui-btn-glossy-surface-image-hover);
  --ui-btn-glossy-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.55),
    0 3px 10px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5);
  --ui-btn-glossy-shadow-hover:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5);
}

/* Quieter glossy variant for secondary buttons: same sheen/shadow language,
   lower-opacity base so more of the muted --ui-btn-secondary-bg shows
   through, keeping them visibly secondary next to the primary/default
   glossy buttons above. Real (non-:where) selectors here so this wins
   over the two rules above wherever .secondary is also present. */
html[data-theme="dark"] body.app[data-authenticated="1"] :is(button.secondary, a.secondary, .secondary-button, .secondary[role="button"]):not(.pill-link):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn),
html[data-theme="dark"] body.app[data-authenticated="1"] :is(.progress-primary-btn, .progress-action-btn, .progress-photo-compare-date-btn, .history-page-action-btn, .history-checkin-btn, .library-icon-btn, .set-add-btn, .set-remove-btn, .progress-subtab-btn, .progress-range-filter button, .progress-photo-angle-tab):is(.secondary, .secondary-button){
  --ui-btn-glossy-bg-image:
    var(--ui-btn-glossy-secondary-image);
  --ui-btn-glossy-bg-image-hover:
    var(--ui-btn-glossy-secondary-image-hover);
  --ui-btn-glossy-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 6px 8px -8px rgba(0,0,0,.4),
    0 2px 6px rgba(0,0,0,.35),
    0 0 0 1px rgba(0,0,0,.35);
  --ui-btn-glossy-shadow-hover:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 6px 8px -8px rgba(0,0,0,.45),
    0 1px 4px rgba(0,0,0,.35),
    0 0 0 1px rgba(0,0,0,.35);
}

body.app[data-authenticated="1"] .day-save-btn,
body.app[data-authenticated="1"] .day-complete-btn{
  --ui-btn-bg: var(--ui-btn-info-bg);
  --ui-btn-border: var(--ui-btn-info-border);
  --ui-btn-fg: var(--ui-btn-info-fg);
  --ui-btn-hover-bg: var(--ui-btn-info-hover-bg);
  --ui-btn-hover-border: var(--ui-btn-info-hover-border);
}

/* .messages-primary-cta ("New chat") has several older gray-gradient
   !important rules earlier in this file with equal-or-higher specificity
   than the glossy opt-in rule above, so it never picked up the glossy
   treatment. Doubled class selector deliberately boosts specificity
   past every one of those legacy rules rather than hunting each down. */
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta.messages-primary-cta{
  background-image: var(--ui-btn-glossy-surface-image) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.55),
    0 3px 10px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta.messages-primary-cta:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta.messages-primary-cta:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta.messages-primary-cta:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .messages-primary-cta.messages-primary-cta:active{
  background-image: var(--ui-btn-glossy-surface-image-hover) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
}

/* Coach text actions that predate the shared glossy button system. Keep
   icon-only controls, tabs, switches, danger actions, and colour swatches on
   their purpose-built treatments. */
html[data-theme="dark"] body.app[data-authenticated="1"] :is(
  .coach-automations-new-btn,
  .coach-automation-action-btn:not(.subtle-danger-btn),
  .coach-dashboard-action,
  .coach-directory-add,
  .coach-client-payment-action-btn,
  .coach-client-history-jump-submit,
  .coach-payments-save-btn,
  .coach-payment-automation-confirm-btn,
  .coach-library-page .pill-link:not(.back-link):not(.progress-subtab-btn),
  .coach-kanban-new-btn,
  .task-action-primary,
  #coach-directory-invite-toggle,
  #coach-directory-invite-copy,
  #coach-directory-invite-regenerate,
  #directory-payment-automation-send-btn,
  #coach-payment-share-link-add,
  #coach-payment-share-send-btn,
  #payment-automation-send-btn
),
html[data-theme="dark"] body.app[data-authenticated="1"].coach-client-directory-page a.secondary.pill-link,
html[data-theme="dark"] body.app[data-authenticated="1"].coach-client-manage-page .pill-link:not(.subtle-danger-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-gap);
  min-height: var(--ui-btn-min-height);
  padding: var(--ui-btn-padding-y) var(--ui-btn-padding-x);
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: var(--ui-btn-radius) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-image: var(--ui-btn-glossy-surface-image) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.55),
    0 3px 10px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
  color: var(--ui-btn-dark-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] :is(
  .coach-automations-new-btn,
  .coach-automation-action-btn:not(.subtle-danger-btn),
  .coach-dashboard-action,
  .coach-directory-add,
  .coach-client-payment-action-btn,
  .coach-client-history-jump-submit,
  .coach-payments-save-btn,
  .coach-payment-automation-confirm-btn,
  .coach-library-page .pill-link:not(.back-link):not(.progress-subtab-btn),
  .coach-kanban-new-btn,
  .task-action-primary,
  #coach-directory-invite-toggle,
  #coach-directory-invite-copy,
  #coach-directory-invite-regenerate,
  #directory-payment-automation-send-btn,
  #coach-payment-share-link-add,
  #coach-payment-share-send-btn,
  #payment-automation-send-btn
):is(:hover, :focus, :focus-visible, :active),
html[data-theme="dark"] body.app[data-authenticated="1"].coach-client-directory-page a.secondary.pill-link:is(:hover, :focus, :focus-visible, :active),
html[data-theme="dark"] body.app[data-authenticated="1"].coach-client-manage-page .pill-link:not(.subtle-danger-btn):is(:hover, :focus, :focus-visible, :active) {
  border-color: rgba(255,255,255,.18) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-image: var(--ui-btn-glossy-surface-image-hover) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
  color: var(--ui-btn-dark-fg) !important;
  transform: none !important;
}

body.app[data-authenticated="1"] .feed-breakdown-more,
body.app[data-authenticated="1"] .feed-breakdown-more:hover,
body.app[data-authenticated="1"] .feed-breakdown-more:focus,
body.app[data-authenticated="1"] .feed-breakdown-more:focus-visible,
body.app[data-authenticated="1"] .feed-breakdown-more:active{
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: .7rem 0 0 !important;
  padding: .45rem .9rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--brand-2) !important;
  font: inherit !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  touch-action: manipulation;
  cursor: pointer;
}

body.app[data-authenticated="1"] .feed-breakdown-more:hover,
body.app[data-authenticated="1"] .feed-breakdown-more:focus-visible{
  background: var(--soft) !important;
  border-color: color-mix(in srgb, var(--brand-2) 45%, var(--border)) !important;
  text-decoration: none !important;
}

/* Final authoritative authenticated card surface layer */
body.app[data-authenticated="1"] :where(
  .card,
  article,
  .daycard,
  .plan-day,
  .banner,
  .flash,
  .dashboard-card,
  .mobile-card,
  .coach-dashboard-panel,
  .coach-dashboard-grid .coach-dashboard-card,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-client-payments-panel,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-history-link,
  .coach-client-history-detail,
  .coach-client-history-checkin,
  .coach-client-subpanel
){
  background: var(--card) !important;
  background-color: var(--card) !important;
  background-image: none !important;
  border-color: var(--border) !important;
}

/* Final authoritative messages page surface layer */
body.app[data-authenticated="1"].messages-page .messages-app,
body.app[data-authenticated="1"].messages-page .messages-panel,
body.app[data-authenticated="1"].messages-page .messages-sidebar,
body.app[data-authenticated="1"].messages-page .messages-workspace,
body.app[data-authenticated="1"].messages-page .messages-workspace-card,
body.app[data-authenticated="1"].messages-page .messages-empty-state,
body.app[data-authenticated="1"].messages-page .messages-shortcuts-shell,
body.app[data-authenticated="1"].messages-page .messages-shortcut-card,
body.app[data-authenticated="1"].messages-page .messages-shortcut-menu,
body.app[data-authenticated="1"].messages-page .messages-list,
body.app[data-authenticated="1"].messages-page .message-list-item,
body.app[data-authenticated="1"].messages-page .messages-search-input-wrap,
body.app[data-authenticated="1"].messages-page .messages-shared-viewer-shell,
body.app[data-authenticated="1"].messages-page .messages-shared-viewer-card{
  background: var(--card) !important;
  background-color: var(--card) !important;
  background-image: none !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-sidebar,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-workspace,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-workspace-card,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-empty-state,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-shortcuts-shell,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-shortcut-card,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-shortcut-menu,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-list,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .message-list-item{
  background: var(--card) !important;
  background-color: var(--card) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-thread,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-field,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-input-shell{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-field,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-input-shell{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer{
  border-top-color: rgba(255,255,255,.14) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer textarea,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer textarea:focus{
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Final fix: ensure Messages search text never overlaps magnifier icon */
body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-search-input-wrap > .nav-icon-lucide{
  left: .9rem !important;
  width: 16px !important;
  height: 16px !important;
}
body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-search input{
  padding-left: 2.65rem !important;
  padding-right: 2.6rem !important;
}

html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-thread,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-field,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-input-shell{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-field,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-input-shell{
  background: var(--card) !important;
  background-color: var(--card) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer{
  border-top-color: var(--border) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer textarea,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-workspace-composer textarea:focus{
  background: var(--card) !important;
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

/* Final authoritative light-mode popup palette for messages: align with Settings card surfaces. */
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-attachment-menu,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .kebab-panel,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .sheet-panel,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-shared-panel-dialog,
html[data-theme="light"] body.app[data-authenticated="1"].messages-page .messages-shared-item-menu-panel{
  background: var(--card) !important;
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  box-shadow: 0 16px 30px rgba(22,25,22,.1) !important;
}

/* Final authoritative dark-mode popup palette for messages: match theme card surfaces. */
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .composer-attachment-menu,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-inbox-modern .kebab-panel,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .sheet-panel,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-shared-panel-dialog,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-shared-item-menu-panel{
  background: var(--card) !important;
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  box-shadow: 0 16px 30px rgba(6,8,6,.45) !important;
}

body.app[data-authenticated="1"].messages-page .messages-search input,
body.app[data-authenticated="1"].messages-page .messages-locker-search input,
body.app[data-authenticated="1"].messages-page .messages-shortcut-menu-item,
body.app[data-authenticated="1"].messages-page .messages-composer,
body.app[data-authenticated="1"].messages-page .messages-thread-empty-chip{
  background: color-mix(in srgb, var(--card) 88%, transparent) !important;
  background-color: color-mix(in srgb, var(--card) 88%, transparent) !important;
  background-image: none !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-head p{
  color: #94a3b8 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-card{
  border: 1px solid rgba(148,163,184,.24) !important;
  background: var(--card) !important;
  background-color: var(--card) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-results{
  border: 1px solid rgba(148,163,184,.24) !important;
  background: var(--card) !important;
  background-color: var(--card) !important;
  border-radius: 16px !important;
  padding: .95rem !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-card h2,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-card h3,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid label,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-slider-label,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-results-head h2{
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid input,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid select{
  border: 1px solid rgba(148,163,184,.3) !important;
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid input::placeholder{
  color: #8ea2bd !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid input:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-grid select:focus{
  border-color: rgba(56,189,248,.72) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,.2) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-tip{
  color: var(--muted) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-tip:hover{
  color: var(--ink) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-tip-popover{
  border: 1px solid var(--border) !important;
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-checkbox{
  color: #cbd5e1 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-slider-label small,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-stat-card span,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-stat-card small,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-legend,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-permeal-grid span,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-summary-grid span,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-summary-grid small,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-support-grid span,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-disclaimer,
html[data-theme="dark"] body.app[data-authenticated="1"] #macropro-feedback.muted{
  color: #94a3b8 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-legend strong,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-stat-card strong,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-support-grid strong,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-permeal-grid strong,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-summary-grid strong,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-disclaimer strong{
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-stat-card,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-panel,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-support-grid > div,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-permeal-grid > div,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-summary-grid > div,
html[data-theme="dark"] body.app[data-authenticated="1"] .macropro-accordion{
  border: 1px solid rgba(148,163,184,.22) !important;
  background: var(--soft) !important;
  background-color: var(--soft) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle{
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:active,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  outline-offset: 0 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:active{
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger),
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:not(.is-danger) .nav-icon-lucide{
  color: #ffffff !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus-visible{
  color: #ffffff !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:hover .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus-visible .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:hover .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus-visible .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row-stock{
  background: #3b3e3c !important;
  background-color: #3b3e3c !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  transform: translateY(0) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus-visible{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-download:active,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-edit:active,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:active{
  transform: translateY(1px) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
  min-height: 92px !important;
  padding: 1rem 1rem !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row-stock,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .exercise-row-card{
  background: #eef2ef !important;
  background-color: #eef2ef !important;
  background-image: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .exercise-row-card{
  background: #3b3e3c !important;
  background-color: #3b3e3c !important;
  background-image: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  outline-offset: 0 !important;
  transform: translateY(0) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:hover .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:focus-visible .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger:active .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action.is-danger .nav-icon-lucide{
  color: #ffffff !important;
  stroke: #ffffff !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .inline-form > button{
  display: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus-visible{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:active{
  transform: translateY(1px) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result.is-selected,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result.is-selected{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.18) !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  border-color: rgba(159,163,160,.22) !important;
  box-shadow: none !important;
  min-height: 92px !important;
  padding: 1rem 1rem !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result.is-selected,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result:hover,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result:focus-visible,
html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] button.plan-exercise-search-result.is-selected{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px rgba(151,211,55,.12) !important;
}

body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result-main{
  align-items: center !important;
  min-height: 56px !important;
}

body.app[data-authenticated="1"] .workout-builder-page [data-plan-exercise-results] .plan-exercise-search-result-icon{
  margin-block: .35rem !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .item-row{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body.app[data-authenticated="1"] .workout-builder-page .item-row{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  border-color: rgba(159,163,160,.22) !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .settings-section{
  background: var(--card) !important;
  background-color: var(--card) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .settings-section .settings-body,
body.app[data-authenticated="1"] .settings-section .coach-payment-settings-card,
body.app[data-authenticated="1"] .settings-section .booking-link-settings-card{
  background: var(--soft) !important;
  background-color: var(--soft) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"] .settings-section .settings-body{
  padding: 1rem !important;
  border-radius: 16px !important;
  margin-top: 1rem !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-section{
  border-color: rgba(159,163,160,.18) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section{
  border-color: rgba(104,153,1,.16) !important;
}

body.public-site .pricing-carousel-indicator{
  background: rgba(159,163,160,.42) !important;
  background-color: rgba(159,163,160,.42) !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: .75 !important;
  transform: scale(.92) !important;
}

body.public-site .pricing-carousel-indicator.is-active,
body.public-site .pricing-carousel-indicator[aria-selected="true"]{
  background: #567f00 !important;
  background-color: #567f00 !important;
  background-image: none !important;
  box-shadow:
    inset 0 0 0 1px #496d02 !important,
    0 0 0 3px rgba(86,127,0,.28) !important;
  opacity: 1 !important;
  transform: scale(1.18) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action::before,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action::after{
  display: none !important;
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit:active{
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #161917 !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-download .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-edit .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:hover,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus,
body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-row-edit-icon:hover,
body.app[data-authenticated="1"] .coach-library-page .library-row-edit-icon:focus,
body.app[data-authenticated="1"] .coach-library-page .library-row-edit-icon:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:hover,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:focus-visible{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-icon-action:active,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:active,
body.app[data-authenticated="1"] .coach-library-page .library-row-edit-icon:active,
body.app[data-authenticated="1"] .coach-library-page .library-collapse-btn:active,
body.app[data-authenticated="1"] .coach-library-page .exercise-filter-toggle:active{
  transform: translateY(1px) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action .nav-icon-lucide{
  transition: transform .16s ease, color .16s ease, stroke .16s ease !important;
  transform: translateY(0) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action .nav-icon-lucide{
  transition: transform .16s ease, color .16s ease, stroke .16s ease !important;
  transform: translateY(0) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:hover .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus-visible .nav-icon-lucide{
  transform: translateY(-1px) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:hover .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:focus-visible .nav-icon-lucide{
  transform: translateY(-1px) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:active .nav-icon-lucide{
  transform: translateY(1px) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action:active .nav-icon-lucide{
  transform: translateY(1px) !important;
}

/* Keep booking link on/off controls as true switches (exclude global button skin) */
body.app[data-authenticated="1"] .booking-link-toggle{
  width: 46px !important;
  height: 28px !important;
  min-width: 46px !important;
  min-height: 28px !important;
  padding: 2px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(159,163,160,.42) !important;
  background: rgba(82,85,82,.32) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(6,8,6,.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  transform: none !important;
  filter: none !important;
  transition: background-color .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1), box-shadow .2s cubic-bezier(.4,0,.2,1) !important;
}

body.app[data-authenticated="1"] .booking-link-toggle:hover{
  border-color: rgba(159,163,160,.62) !important;
}

body.app[data-authenticated="1"] .booking-link-toggle:focus,
body.app[data-authenticated="1"] .booking-link-toggle:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(141,195,55,.34), inset 0 1px 2px rgba(6,8,6,.3) !important;
}

body.app[data-authenticated="1"] .booking-link-toggle:active{
  transform: none !important;
}

body.app[data-authenticated="1"] .booking-link-toggle.is-active{
  background: #22c55e !important;
  border-color: #22c55e !important;
  box-shadow: inset 0 1px 2px rgba(6,8,6,.24) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-icon-btn[aria-label*="Delete"]{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #161916 !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-icon-btn[aria-label*="Delete"] .nav-icon-lucide{
  color: #161916 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-icon-btn[aria-label*="Delete"]{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #e5e9e5 !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .booking-link-icon-btn[aria-label*="Delete"] .nav-icon-lucide{
  color: #e5e9e5 !important;
}

body.app[data-authenticated="1"] .booking-link-toggle .booking-link-toggle-thumb{
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid rgba(159,163,160,.55) !important;
  box-shadow: 0 1px 2px rgba(6,8,6,.26) !important;
  transform: translateX(0) !important;
  transition: transform .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1) !important;
}

body.app[data-authenticated="1"] .booking-link-toggle.is-active .booking-link-toggle-thumb{
  transform: translateX(18px) !important;
  border-color: rgba(134,239,172,.8) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-toggle{
  background: rgba(159,163,160,.36) !important;
  border-color: rgba(112,116,113,.35) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .booking-link-toggle.is-active{
  background: #22c55e !important;
  border-color: #22c55e !important;
}

/* Final hard override: booking-link active toggle must stay green across all button skin states. */
body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle{
  --ui-btn-bg: rgba(82,85,82,.32) !important;
  --ui-btn-hover-bg: rgba(82,85,82,.32) !important;
  --ui-btn-active-bg: rgba(82,85,82,.32) !important;
  --ui-btn-border: rgba(159,163,160,.42) !important;
  --ui-btn-hover-border: rgba(159,163,160,.62) !important;
  --ui-btn-active-border: rgba(159,163,160,.62) !important;
}

body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle.is-active,
body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle.is-active:hover,
body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle.is-active:focus,
body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle.is-active:focus-visible,
body.app[data-authenticated="1"] .booking-links-section .booking-link-inline-actions .booking-link-toggle.is-active:active{
  --ui-btn-bg: #22c55e !important;
  --ui-btn-hover-bg: #22c55e !important;
  --ui-btn-active-bg: #22c55e !important;
  --ui-btn-border: #22c55e !important;
  --ui-btn-hover-border: #22c55e !important;
  --ui-btn-active-border: #22c55e !important;
  background: #22c55e !important;
  background-color: #22c55e !important;
  background-image: none !important;
  border-color: #22c55e !important;
}

/* Keep automation cards interactive when inactive and keep icon actions flat. */
body.app[data-authenticated="1"] .coach-automation-card.is-inactive{
  pointer-events: auto !important;
}

body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-success,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-danger,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-success:hover,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-danger:hover,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-success:focus,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-danger:focus,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-success:focus-visible,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-danger:focus-visible,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-success:active,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-icon-btn.is-danger:active{
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Final locker icon behavior: move only on hover/active, never glow/fill. */
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus-visible{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:active{
  transform: translateY(1px) !important;
}

/* Final locker icon polish: no highlight/fill state, movement only. */
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:hover,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] .coach-library-page .locker-action-btn::before,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Client management payments: icon-only actions with no highlight fills. */
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:hover,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:focus,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:focus-visible,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:active,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn.is-danger,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn.is-danger:hover,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn.is-danger:focus,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn.is-danger:focus-visible,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn.is-danger:active{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:hover,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:focus,
body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:focus-visible{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-client-payment-row-actions .coach-client-payment-row-btn:active{
  transform: translateY(1px) !important;
}

/* Tasks completion toggle: keep native circular toggle style (not global button skin). */
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-check,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-check:hover,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-check:focus,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-check:focus-visible,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-check:active{
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-width: 1.05rem !important;
  min-height: 1.05rem !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 2px solid rgba(159,163,160,.55) !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] .coach-tasks-card .coach-task-item.done .coach-task-check,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-item.done .coach-task-check:hover,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-item.done .coach-task-check:focus,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-item.done .coach-task-check:focus-visible,
body.app[data-authenticated="1"] .coach-tasks-card .coach-task-item.done .coach-task-check:active{
  background: #97d13c !important;
  background-color: #97d13c !important;
  border-color: #97d13c !important;
}

/* Keep coach library/locker icon actions transparent even when global tap class is applied. */
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-pressed,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-action-trigger.is-pressed,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn.is-pressed{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-pressed .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-action-trigger.is-pressed .nav-icon-lucide,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn.is-pressed .nav-icon-lucide{
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-pressed::before,
body.app[data-authenticated="1"] .coach-library-page .library-plan-actions .library-plan-icon-action.is-pressed::after,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn.is-pressed::before,
body.app[data-authenticated="1"] .coach-library-page .locker-action-btn.is-pressed::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep automation accent swatches color-filled (exclude global button skin). */
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:hover,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus-visible,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:active,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn.is-selected{
  background: var(--automation-accent) !important;
  background-color: var(--automation-accent) !important;
  background-image: none !important;
  color: transparent !important;
  border: 2px solid rgba(159,163,160,.52) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12) !important;
}

body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:hover,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus,
body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus-visible{
  border-color: rgba(255,255,255,.78) !important;
}

body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn.is-selected{
  border-color: rgba(255,255,255,.96) !important;
  box-shadow:
    0 0 0 4px rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(255,255,255,.2) !important;
}

/* Final authoritative theme-level override for automation accent chips. */
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:hover,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus-visible,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:active,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn.is-selected,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn:active,
html[data-theme="light"] body.app[data-authenticated="1"] .coach-automations-shell .coach-automation-accent-btn.is-selected{
  background: var(--automation-accent) !important;
  background-color: var(--automation-accent) !important;
  background-image: none !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* Final hard override: coach library/locker action icons must never render a hover/focus fill. */
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger:hover,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger:focus,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger:active,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger.is-pressed,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger:hover,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger:focus,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger:focus-visible,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger:active,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger.is-pressed{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] .coach-library-page .library-action-trigger::before,
body.app[data-authenticated="1"] .coach-library-page .library-action-trigger::after,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger::before,
body.app[data-authenticated="1"] .coach-library-page span[role="button"].library-action-trigger::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Absolute fallback: locker/library icon hitbox elements themselves never paint a square fill. */
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span:hover,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button:hover,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a:hover,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span:focus,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button:focus,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a:focus,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a:focus-visible,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span:active,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button:active,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a:active,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > .is-pressed{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span::before,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > span::after,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button::before,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > button::after,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a::before,
body.app[data-authenticated="1"] .coach-library-page .coach-library-file-actions.library-plan-actions > a::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* =============================================================
   LIGHT MODE - GLOBAL SUBTLE BUTTON PALETTE
   Replaces the legacy dark navy secondary button fill in light mode.
   Danger, icon-only, back, and input-style buttons are excluded.
   ============================================================= */
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back),
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link){
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--btn-subtle-bg) !important;
  color: var(--btn-subtle-fg) !important;
  font: 600 13px/1 "Inter", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, transform .08s ease !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  background-image: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back):hover,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back):focus,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link):hover,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link):focus,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link):focus-visible{
  background: var(--btn-subtle-bg-hover) !important;
  color: var(--btn-subtle-fg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  background-image: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):active,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back):active,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link):active{
  background: var(--btn-subtle-bg-active) !important;
  transform: translateY(1px) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back):focus-visible,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link):focus-visible{
  outline: 2px solid var(--btn-focus-ring) !important;
  outline-offset: 2px !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):disabled,
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"])[aria-disabled="true"],
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back)[aria-disabled="true"],
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link)[aria-disabled="true"]{
  background: var(--btn-subtle-bg) !important;
  color: var(--btn-subtle-fg-muted) !important;
  cursor: not-allowed !important;
}

/* Companion icon rule: icons inside light-mode subtle buttons inherit text color. */
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] button:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) svg,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link:not(.is-danger):not(.back-link):not(.admin-back) svg,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link) .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"]:not(.is-danger):not(.back-link) svg{
  width: 14px !important;
  height: 14px !important;
  color: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
}

.btn-subtle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--btn-subtle-bg);
  color: var(--btn-subtle-fg);
  font: 600 13px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, transform .08s ease;
}

.btn-subtle:hover{ background: var(--btn-subtle-bg-hover); }
.btn-subtle:active{
  background: var(--btn-subtle-bg-active);
  transform: translateY(1px);
}
.btn-subtle:focus-visible{
  outline: 2px solid var(--btn-focus-ring);
  outline-offset: 2px;
}
.btn-subtle:disabled,
.btn-subtle[aria-disabled="true"]{
  background: var(--btn-subtle-bg);
  color: var(--btn-subtle-fg-muted);
  cursor: not-allowed;
}
.btn-subtle.sm,
.btn-subtle.small{
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 8px;
}
.btn-subtle.lg{
  padding: 13px 20px;
  font-size: 14px;
  border-radius: 12px;
}
.btn-subtle svg{
  width: 14px;
  height: 14px;
  stroke-width: 2;
  flex-shrink: 0;
}

html[data-theme="light"] body.app[data-authenticated="1"] button.small:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link.small:not(.is-danger):not(.back-link):not(.admin-back),
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].small:not(.is-danger):not(.back-link),
html[data-theme="light"] body.app[data-authenticated="1"] button.sm:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link.sm:not(.is-danger):not(.back-link):not(.admin-back),
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].sm:not(.is-danger):not(.back-link){
  padding: 7px 11px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] button.lg:not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.feed-comment-inline-icon):not(.feed-comment-edit):not(.feed-comment-delete):not(.pb-row):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html[data-theme="light"] body.app[data-authenticated="1"] a.pill-link.lg:not(.is-danger):not(.back-link):not(.admin-back),
html[data-theme="light"] body.app[data-authenticated="1"] a[role="button"].lg:not(.is-danger):not(.back-link){
  padding: 13px 20px !important;
  font-size: 14px !important;
  border-radius: 12px !important;
}

/* ============================================================
   GLOBAL UI POLISH � Phase 1�5
   Applied via cascade; no template structure changes needed.
   ============================================================ */

/* --- Phase 1: Page head & card rhythm ---------------------- */
.page-head{
  margin-bottom: 1.25rem;
}
.page-head h1,
.page-head h2{
  margin-top: 0;
  margin-bottom: .25rem;
}
.page-head .muted{
  margin-top: 0;
}

.card,
article{
  padding: 1.25rem;
}

.card + .card,
article + article{
  margin-top: 1rem;
}

/* Keep cards fixed on hover/active even when they are clickable links/buttons. */
:is(.card, article, .daycard, .public-card, .public-price-card)[role="button"]:is(:hover, :active, :focus, :focus-visible),
a:is(.card, .daycard, .public-card, .public-price-card):is(:hover, :active, :focus, :focus-visible){
  transform: none !important;
  translate: none !important;
}

/* Stack utility � vertical flex column with standard gap */
.stack{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Phase 1: Input standardisation ----------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
select,
textarea{
  min-height: 2.75rem;
  padding: .625rem .85rem;
  font-size: .95rem;
  border-radius: var(--radius-sm, 12px);
}

/* --- Phase 5: Input dark mode background fix -------------- */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background: rgba(111,155,41,0.06);
  border-color: rgba(111,155,41,0.18);
  color: var(--color-text-primary, #f0f4f8);
  box-shadow: none;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
  background: rgba(111,155,41,0.1);
}

/* --- Phase 2: Mobile touch targets & page-actions --------- */
.header-nav-link{
  min-height: 44px;
}

@media (max-width: 640px){
  .page-actions{
    flex-wrap: wrap;
    gap: .5rem;
  }
  .page-actions > *:not(input):not(select){
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* --- Phase 3: Desktop sidebar active ? brand blue --------- */
body.app[data-desktop-sidebar="1"] .desktop-sidebar-nav > a.active{
  background: rgba(104,153,1,.2) !important;
  border-color: rgba(131,181,50,.4) !important;
  color: #ffffff !important;
}

/* --- Phase 4: Empty state base pattern -------------------- */
.empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.empty-state .empty-icon{
  opacity: .35;
  margin-bottom: .25rem;
}
.empty-state h3{
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.empty-state p{
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  max-width: 28ch;
}

/* --- Phase 5: Card dark mode surface ---------------------- */
html[data-theme="dark"] .card,
html[data-theme="dark"] article{
  background: var(--color-bg-secondary, #3b3e3c);
}

/* --- Phase 5: Desktop sidebar dark border ----------------- */
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar{
  border-right-color: rgba(111,155,41,0.1);
}

/* Cool grey dark theme surface ladder:
   base app background < card layer < raised inner layer */
html[data-theme="dark"] body.app[data-authenticated="1"]{
  --surface-base: #262926;
  --surface-card: #3b3e3c;
  --surface-raised: #484b48;
  --surface-border: rgba(206,210,207,.2);
  background: linear-gradient(180deg, var(--surface-base) 0%, #2f322f 100%) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .card,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section,
html[data-theme="dark"] body.app[data-authenticated="1"] .mobile-card{
  background: var(--surface-card) !important;
  background-color: var(--surface-card) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .settings-body,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .coach-payment-settings-card,
html[data-theme="dark"] body.app[data-authenticated="1"] .settings-section .booking-link-settings-card,
html[data-theme="dark"] body.app[data-authenticated="1"] .card .card,
html[data-theme="dark"] body.app[data-authenticated="1"] .card .mobile-card{
  background: var(--surface-raised) !important;
  background-color: var(--surface-raised) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}

/* Library/workout rows: remove legacy blue fills in dark mode and use cool greys. */
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-modern-search,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-search-input-wrap,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-search-input-wrap input{
  background: var(--surface-card) !important;
  background-color: var(--surface-card) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row-stock{
  background: var(--surface-raised) !important;
  background-color: var(--surface-raised) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-icon{
  background: color-mix(in srgb, var(--surface-card) 84%, #a1a5a2 16%) !important;
  color: #f5f7fa !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-section-count,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .coach-library-file-meta,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-library-page .library-plan-row .muted{
  color: #ced2cf !important;
}

/* Cross-role neutralization for remaining blue-tinted dark surfaces. */
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-exercise-search-dropdown,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-exercise-search-results,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .plan-exercise-search-result,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page button.plan-exercise-search-result,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .library-search-input-wrap,
html[data-theme="dark"] body.app[data-authenticated="1"] .workout-builder-page .library-search-input-wrap input,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-hero,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-panel,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-placeholder,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-stat-card,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-alert-card,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payment-item,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-payments-panel,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-link,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-detail,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-history-checkin,
html[data-theme="dark"] body.app[data-authenticated="1"] .coach-client-subpanel,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-panel,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-sidebar,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-workspace,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-workspace-card,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .messages-list,
html[data-theme="dark"] body.app[data-authenticated="1"].messages-page .message-list-item{
  background: var(--surface-card) !important;
  background-color: var(--surface-card) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}

/* Settings list icons in light mode: plain black icon, no chip background. */
html[data-theme="light"] body.app[data-authenticated="1"] .settings-summary-head > .settings-summary-icon,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-summary-icon{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #161916 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .settings-summary-head > .settings-summary-icon .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .settings-summary-icon .nav-icon-lucide{
  color: #161916 !important;
  stroke: currentColor !important;
}

/* Final desktop sidebar theme lock:
   both themes use a darker sidebar tone. */
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar{
  background: #212422 !important;
  border-right-color: rgba(206,210,207,.18) !important;
}

html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar{
  background: #212422 !important;
  border-right-color: rgba(206,210,207,.18) !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide{
  color: #ffffff !important;
  stroke: currentColor !important;
}

/* Mobile footer nav icons: preserve visibility in dark mode. */
html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link{
  color: #ced2cf !important;
}

html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link .header-nav-icon,
html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link .nav-icon-lucide{
  color: currentColor !important;
  stroke: currentColor !important;
}

html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link:hover{
  background: rgba(206,210,207,.1) !important;
}

html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link:active,
html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link.is-pressed,
html[data-theme="dark"] body.app #mobile-footer-nav .header-nav-link.active{
  color: #f5f7fa !important;
  background: rgba(206,210,207,.16) !important;
}

@media (max-width: 820px){
  html[data-theme="dark"] body.app #mobile-footer-nav{
    background: #262926 !important;
    background-color: #262926 !important;
    background-image: none !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top-color: rgba(206,210,207,.2) !important;
  }
}

/* ============================================================
   PB LIST � exercise-library-style rows
   ============================================================ */
.pb-list{
  display: grid;
  gap: .3rem;
}

.pb-row{
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  text-align: left;
  padding: .7rem .9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #eef2ef;
  color: var(--ink);
  cursor: default;
  transition: background .13s ease, border-color .13s ease;
  box-shadow: none;
  border-color: var(--border);
}

.pb-row:hover,
.pb-row:focus-within{
  background: color-mix(in srgb, var(--brand) 8%, #eef2ef);
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
  outline: none;
  box-shadow: none;
  color: var(--ink);
}

.pb-row-icon{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(234,179,8,.14);
  color: #d97706;
}

html[data-theme="dark"] .pb-row-icon{
  background: rgba(234,179,8,.12);
  color: #fbbf24;
}

.pb-row-icon .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
  color: inherit !important;
  stroke: currentColor !important;
}

.pb-row-body{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

.pb-row-name{
  font-size: .93rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-row-meta{
  font-size: .8rem;
}

.pb-row-chevron{
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted);
  opacity: .55;
  background: transparent !important;
  border: 0 !important;
  padding: .2rem !important;
  border-radius: 10px;
  min-height: auto !important;
  min-width: auto !important;
  transition: color .13s ease, opacity .13s ease;
}

.pb-row .history-pb-item-btn{
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border-radius: 10px !important;
  cursor: pointer !important;
}

.pb-row .history-pb-item-btn:hover,
.pb-row .history-pb-item-btn:focus,
.pb-row .history-pb-item-btn:focus-visible{
  border-color: transparent !important;
  background: transparent !important;
  color: var(--brand) !important;
  outline: none !important;
  box-shadow: none !important;
}

.pb-row:hover .pb-row-chevron,
.pb-row:focus-within .pb-row-chevron,
.pb-row-chevron:hover,
.pb-row-chevron:focus-visible{
  color: var(--brand);
  opacity: 1;
}

.pb-row-chevron .nav-icon-lucide{
  width: .95rem;
  height: .95rem;
  stroke-width: 2;
  color: inherit !important;
  stroke: currentColor !important;
}

/* Dark theme row */
html[data-theme="dark"] .pb-row{
  background: #3b3e3c;
  border-color: var(--border);
}

html[data-theme="dark"] .pb-row:hover,
html[data-theme="dark"] .pb-row:focus-within{
  background: color-mix(in srgb, #484b48 88%, #3b3e3c);
  border-color: color-mix(in srgb, #5c5f5c 46%, var(--border));
}

/* ============================================================
   PB CHART � improved: Y-axis labels, smooth curves
   ============================================================ */
.pb-axis-y-label{
  fill: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.history-pb-point--last{
  fill: #689901;
  stroke: #ffffff;
  stroke-width: 2.5;
}

html[data-theme="dark"] .history-pb-point--last{
  stroke: var(--color-bg-secondary, #1a1c1a);
}

/* ============================================================
   PB ROWS + SEARCH � keep consistent with library/doc cards
   ============================================================ */
html[data-theme="light"] body.app[data-authenticated="1"] .pb-row{
  background: #eef2ef !important;
  background-color: #eef2ef !important;
  background-image: none !important;
  border-color: var(--border) !important;
  color: var(--ink) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] .pb-row:hover,
html[data-theme="light"] body.app[data-authenticated="1"] .pb-row:focus-within{
  background: color-mix(in srgb, var(--brand) 8%, #eef2ef) !important;
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border)) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] .pb-row{
  background: #3b3e3c !important;
  background-color: #3b3e3c !important;
  background-image: none !important;
  border-color: var(--border) !important;
}

html[data-theme="light"] .history-pb-search-field .nav-icon-lucide{
  left: 1rem !important;
}

html[data-theme="light"] .history-pb-search-field input{
  padding-left: 3.15rem !important;
}

html[data-theme="dark"] .history-pb-search-field .nav-icon-lucide{
  left: 1rem !important;
}

html[data-theme="dark"] .history-pb-search-field input{
  padding-left: 3.15rem !important;
}

/* Final nutrition action icon lock: light mode subtle buttons use current text color. */
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions #edit-targets-btn :is(.nav-icon-lucide, svg, i),
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions #log-water-btn :is(.nav-icon-lucide, svg, i),
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions #log-food-btn :is(.nav-icon-lucide, svg, i),
html[data-theme="light"] body.app[data-authenticated="1"] .nutrition-actions #add-custom-food-btn :is(.nav-icon-lucide, svg, i){
  color: currentColor !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* Progress mobile tab alignment: prevent overflow and keep pills inside card. */
@media (max-width: 820px){
  body.app[data-authenticated="1"] .progress-shell{
    overflow-x: hidden !important;
  }
  body.app[data-authenticated="1"] .progress-shell .progress-subtabs{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: .4rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  /* Each tab is its own width and the row scrolls. These were previously
     flex: 1 1 100%, which stacked all six as full-width blocks. */
  body.app[data-authenticated="1"] .progress-shell .progress-subtabs > *{
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  body.app[data-authenticated="1"] .progress-shell .progress-subtab-btn{
    display: inline-flex !important;
    align-items: center !important;
    gap: .4rem !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    padding: .55rem .8rem !important;
    font-size: .9rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
  body.app[data-authenticated="1"] .progress-shell .progress-subtab-btn .nav-icon-lucide{
    width: 1rem !important;
    height: 1rem !important;
    flex: 0 0 auto !important;
  }
  /* The tab now sizes to its label, so the label no longer needs truncating. */
  body.app[data-authenticated="1"] .progress-shell .progress-subtab-btn span{
    min-width: 0 !important;
    display: block !important;
    text-align: center !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
  body.app[data-authenticated="1"] .progress-shell .history-pb-card,
  /* Not scoped to .progress-shell: the same list renders on the history page,
     where it kept the flex layout and the body would not shrink, so the row
     ran about 75px past the screen and clipped the trend button. */
  body.app[data-authenticated="1"] .pb-list{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  body.app[data-authenticated="1"] .pb-row{
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  body.app[data-authenticated="1"] .pb-row-body{
    min-width: 0 !important;
  }
  body.app[data-authenticated="1"] .pb-row-name,
  body.app[data-authenticated="1"] .pb-row-meta{
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Global tap responsiveness: remove legacy mobile click delay and show immediate touch handling */
a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
label[for],
[role="button"],
.pill-link,
.header-nav-link,
.plain-close-icon{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Groups light-mode contrast hardening */
html[data-theme="light"] .groups-list-card > summary,
body[data-theme="light"] .groups-list-card > summary{
  background: #f8fbff !important;
  color: #1f221f !important;
}

html[data-theme="light"] .groups-list-card > summary .groups-list-copy strong,
html[data-theme="light"] .groups-list-card > summary .groups-list-snippet,
html[data-theme="light"] .groups-list-card > summary .groups-list-meta,
html[data-theme="light"] .groups-list-card > summary .groups-list-caret,
body[data-theme="light"] .groups-list-card > summary .groups-list-copy strong,
body[data-theme="light"] .groups-list-card > summary .groups-list-snippet,
body[data-theme="light"] .groups-list-card > summary .groups-list-meta,
body[data-theme="light"] .groups-list-card > summary .groups-list-caret{
  color: #1f221f !important;
}

html[data-theme="light"] .groups-manage-body,
body[data-theme="light"] .groups-manage-body{
  background: linear-gradient(180deg, rgba(245,249,246,.97), rgba(255,255,255,.94)) !important;
}

/* Weight entry modal: stable controls and proportions at app breakpoints. */
.progress-weight-modal-card{
  --progress-modal-desktop-max:600px;
  width:min(600px, calc(100vw - 2rem));
  max-height:min(820px, calc(100dvh - 2rem));
}
.progress-weight-modal-card .modal-header{
  align-items:flex-start;
}
.progress-weight-modal-card .modal-header > div{
  min-width:0;
}
body.app[data-authenticated="1"] .progress-weight-modal-card button.plain-close-icon > .nav-icon-lucide[data-lucide="x"]{
  width:18px !important;
  height:18px !important;
  margin:0 !important;
  color:currentColor !important;
  stroke:currentColor !important;
}
.progress-weight-modal-card .progress-weight-form{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:end;
}
.progress-weight-modal-card .progress-weight-form .modal-actions{
  grid-column:1 / -1;
}
.progress-weight-modal-card .progress-weight-entry-main{
  width:100% !important;
  min-width:0 !important;
  justify-content:space-between !important;
  padding:.7rem .25rem !important;
  text-align:left !important;
}
.progress-weight-modal-card .progress-weight-entry-main span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.app[data-authenticated="1"] .progress-weight-modal-card .progress-weight-entry-row button.progress-entry-icon-action{
  width:40px !important;
  min-width:40px !important;
  height:40px !important;
  min-height:40px !important;
  border-radius:8px !important;
}

@media (max-width:760px){
  .progress-weight-modal-card{
    width:calc(100vw - 1rem);
    max-width:calc(100vw - 1rem);
    max-height:calc(100dvh - max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) - .5rem);
  }
  .progress-weight-modal-card .modal-header{
    padding:.9rem 1rem;
  }
  .progress-weight-modal-card .modal-body{
    padding:.85rem;
  }
  .progress-weight-modal-card .progress-weight-form{
    grid-template-columns:minmax(0, 1fr);
    gap:.8rem;
  }
  .progress-weight-modal-card .progress-weight-form .modal-actions{
    grid-column:1;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.65rem;
  }
  .progress-weight-modal-card .progress-weight-entry-main{
    gap:.65rem;
  }
}

html[data-theme="light"] .groups-member-option,
html[data-theme="light"] .groups-member-option .groups-member-name,
body[data-theme="light"] .groups-member-option,
body[data-theme="light"] .groups-member-option .groups-member-name{
  color: #1f221f !important;
}

/* New message mobile fit + search icon/text spacing hardening */
body.app[data-authenticated="1"].messages-page .messages-new-shell,
body.app[data-authenticated="1"].messages-page .messages-new-page,
body.app[data-authenticated="1"].messages-page .messages-new-panel,
body.app[data-authenticated="1"].messages-page .messages-new-panel-intro,
body.app[data-authenticated="1"].messages-page .messages-new-list,
body.app[data-authenticated="1"].messages-page .messages-new-item,
body.app[data-authenticated="1"].messages-page .messages-new-link{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.app[data-authenticated="1"].messages-page .messages-new-meta{
  min-width: 0;
  flex: 1 1 auto;
}

body.app[data-authenticated="1"].messages-page .messages-new-meta strong,
body.app[data-authenticated="1"].messages-page .messages-new-meta span{
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app[data-authenticated="1"].messages-page .messages-new-search-field .nav-icon-lucide{
  left: 1rem;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

body.app[data-authenticated="1"].messages-page .messages-new-search-field input{
  padding-left: 3rem !important;
}

@media (max-width: 640px){
  body.app[data-authenticated="1"].messages-page .messages-new-shell{
    overflow-x: hidden;
  }

  body.app[data-authenticated="1"].messages-page .messages-new-hero,
  body.app[data-authenticated="1"].messages-page .messages-new-panel,
  body.app[data-authenticated="1"].messages-page .messages-new-list,
  body.app[data-authenticated="1"].messages-page .messages-new-link{
    margin-inline: 0;
  }
}

/* Global card lift reset:
   disable raised/scale/offset standout behavior across all pages. */
:where(
  .card,
  .public-card,
  .public-price-card,
  .coach-dashboard-card,
  .coach-payments-metric-card,
  .coach-directory-stat,
  .macropro-stat-card,
  .coach-automation-card,
  .daycard,
  .history-summary-card,
  .history-workout-card
):where(:hover, :focus, :focus-visible, :active){
  transform: none !important;
  translate: none !important;
  margin-top: 0 !important;
  top: auto !important;
}

/* Public grid card parity:
   ensure no first-card visual standout from text wrapping/content depth. */
body.public-site :is(.public-grid2, .public-grid3, .public-grid4){
  align-items: stretch !important;
  grid-auto-rows: 1fr !important;
}

body.public-site :is(.public-grid2, .public-grid3, .public-grid4) > .public-card{
  margin-top: 0 !important;
  align-self: stretch !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto 1fr !important;
  row-gap: .55rem !important;
  border-width: 1px !important;
  box-shadow: none !important;
  transform: none !important;
  animation: none !important;
  transition: border-color .2s ease, background .2s ease !important;
}

body.public-site :is(.public-grid2, .public-grid3, .public-grid4) > .public-price-card{
  margin-top: 0 !important;
  align-self: stretch !important;
  height: 100% !important;
  transform: none !important;
  animation: none !important;
  transition: border-color .2s ease, background .2s ease !important;
}

body.public-site .public-price-card.featured{
  border-width: 2px !important;
}

body.public-site :is(.public-grid2, .public-grid3, .public-grid4) > :is(.public-card, .public-price-card) h3,
body.public-site :is(.public-grid2, .public-grid3, .public-grid4) > :is(.public-card, .public-price-card) p{
  margin-top: 0 !important;
}

/* Macro calculator stat card parity (public + app):
   no first-card emphasis, no sticky hover border deltas. */
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid{
  align-items: stretch !important;
  grid-auto-rows: 1fr !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid > .macropro-stat-card{
  margin-top: 0 !important;
  align-self: stretch !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: none !important;
  transform: none !important;
}

:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid > .macropro-stat-card:hover,
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid > .macropro-stat-card:focus,
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid > .macropro-stat-card:focus-visible,
:is(body.public-site, body.app[data-authenticated="1"]) .macropro-result-grid > .macropro-stat-card:active{
  border-color: rgba(148,163,184,.22) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Macro calculator light surface for authenticated light mode only. */
html[data-theme="light"] body.app .macropro-card{
  border-color: #cbd5e1 !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  background-color: #ffffff !important;
  background-image: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  box-shadow: 0 18px 34px rgba(15,23,42,.08) !important;
}

html[data-theme="light"] body.app .macropro-card h2,
html[data-theme="light"] body.app .macropro-card h3,
html[data-theme="light"] body.app .macropro-grid label,
html[data-theme="light"] body.app .macropro-slider-label,
html[data-theme="light"] body.app .macropro-accordion summary,
html[data-theme="light"] body.app .macropro-results-head h2{
  color: #0f172a !important;
}

/* Final light-mode subtle action lock:
   prevents older page-specific navy button rules from reappearing. */
html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
){
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--btn-subtle-bg) !important;
  background-color: var(--btn-subtle-bg) !important;
  background-image: none !important;
  color: var(--btn-subtle-fg) !important;
  font: 600 13px/1 "Inter", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):hover{
  background: var(--btn-subtle-bg-hover) !important;
  background-color: var(--btn-subtle-bg-hover) !important;
  color: var(--btn-subtle-fg) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):active{
  background: var(--btn-subtle-bg-active) !important;
  background-color: var(--btn-subtle-bg-active) !important;
  transform: translateY(1px) !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):focus-visible{
  outline: 2px solid var(--btn-focus-ring) !important;
  outline-offset: 2px !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):is(:disabled, [aria-disabled="true"]){
  background: var(--btn-subtle-bg) !important;
  background-color: var(--btn-subtle-bg) !important;
  color: var(--btn-subtle-fg-muted) !important;
  cursor: not-allowed !important;
}

html[data-theme="light"] body.app[data-authenticated="1"] :is(
  .pill-link:not(.admin-back):not(.back-link):not(.day-complete-btn):not(.day-save-btn):not(.is-danger),
  .secondary:not(.back-link):not(.day-complete-btn):not(.day-save-btn),
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
) :is(svg, .nav-icon-lucide){
  width: 14px !important;
  height: 14px !important;
  color: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
}

/* Absolute final light-mode secondary button lock.
   Uses body.app without data-authenticated so stale attributes cannot bypass it. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
){
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--btn-subtle-bg) !important;
  background-color: var(--btn-subtle-bg) !important;
  background-image: none !important;
  color: var(--btn-subtle-fg) !important;
  font: 600 13px/1 "Inter", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):hover{
  background: var(--btn-subtle-bg-hover) !important;
  background-color: var(--btn-subtle-bg-hover) !important;
  color: var(--btn-subtle-fg) !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):active{
  background: var(--btn-subtle-bg-active) !important;
  background-color: var(--btn-subtle-bg-active) !important;
  transform: translateY(1px) !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):focus-visible{
  outline: 2px solid var(--btn-focus-ring) !important;
  outline-offset: 2px !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
):is(:disabled, [aria-disabled="true"]){
  background: var(--btn-subtle-bg) !important;
  background-color: var(--btn-subtle-bg) !important;
  color: var(--btn-subtle-fg-muted) !important;
  cursor: not-allowed !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action
) :is(svg, .nav-icon-lucide){
  width: 14px !important;
  height: 14px !important;
  color: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
}

/* Hard stop: cards must never move on hover/focus/active. */
body.app[data-authenticated="1"] :is(.card, article, .daycard, .public-card, .public-price-card, .public-auth-card, .messages-shortcut-card, .coach-dashboard-card, .coach-directory-stat):is(:hover, :focus, :focus-visible, :active),
body.public-site :is(.card, article, .daycard, .public-card, .public-price-card, .public-auth-card):is(:hover, :focus, :focus-visible, :active){
  transform: none !important;
  translate: none !important;
}

/* Coach card hover movement disabled: final override */
body.app[data-authenticated="1"] :is(
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-automation-card,
  .coach-payments-metric-card,
  .coach-directory-stat,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  .card
):is(:hover, :focus, :focus-visible, :active){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
}

/* Coach cards: no hover movement, no motion transitions on interaction states. */
body.app[data-authenticated="1"] :is(
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-automation-card,
  .coach-payments-metric-card,
  .coach-directory-stat,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  a.card,
  .card
):is(:hover, :focus, :focus-visible, :active, .is-pressed){
  transform: none !important;
  translate: none !important;
  transition-property: background-color, border-color, color, box-shadow !important;
  animation: none !important;
}

/* Coach dashboard card hard lock: prevent any nested hover motion. */
.coach-dashboard-page .coach-dashboard-grid .coach-dashboard-card:is(:hover, :focus, :focus-visible, :active),
.coach-dashboard-page .coach-dashboard-grid .coach-dashboard-card:is(:hover, :focus, :focus-visible, :active) *{
  transform: none !important;
  translate: none !important;
  animation: none !important;
}

/* Coach-wide card movement lock (all coach pages). */
body.app[data-authenticated="1"][data-account-type="coach"] :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-panel,
  .coach-client-hero,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed),
body.app[data-authenticated="1"][data-account-type="coach"] :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-panel,
  .coach-client-hero,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed) *{
  transform: none !important;
  translate: none !important;
  animation: none !important;
}

/* Coach pages: cards are flat and layout-stable in every state. */
body.app[data-authenticated="1"][data-account-type="coach"] :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  box-shadow: none !important;
  transition-property: background-color, border-color, color !important;
}

body.app[data-authenticated="1"][data-account-type="coach"] .coach-dashboard-grid > .coach-dashboard-card:first-child{
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  box-shadow: none !important;
}

body.app[data-authenticated="1"][data-account-type="coach"] :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed),
body.app[data-authenticated="1"][data-account-type="coach"] :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed) *:not(.ring-center):not(.target-center){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
}

/* Coach accounts: no hover/press movement anywhere. */
body.app[data-authenticated="1"][data-account-type="coach"] *:is(:hover, :focus, :focus-visible, :active, .is-pressed){
  transform: none !important;
  translate: none !important;
  animation: none !important;
}

body.app[data-authenticated="1"][data-account-type="coach"] *{
  transition-property: background-color, border-color, color, box-shadow, opacity !important;
}

/* Coach account cards: fully static surfaces and text. */
body.app.is-coach-account :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
),
body.app.is-coach-account :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
) *:not(.ring-center):not(.target-center){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
  transition: none !important;
}

body.app.is-coach-account :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed),
body.app.is-coach-account :is(
  .card,
  article,
  .daycard,
  .coach-dashboard-card,
  .coach-client-hero,
  .coach-client-panel,
  .coach-client-placeholder,
  .coach-client-stat-card,
  .coach-client-alert-card,
  .coach-client-payment-item,
  .coach-client-payments-panel,
  .coach-client-subpanel,
  .coach-payments-metric-card,
  .coach-payments-table-card,
  .coach-payments-mobile-card,
  .coach-automation-card,
  .coach-library-page .library-plan-row,
  .coach-library-page .library-plan-row-stock,
  .coach-tasks-card,
  .messages-shortcut-card,
  [class*="coach-"][class*="card"],
  [class*="coach-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed) *:not(.ring-center):not(.target-center){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
  transition: none !important;
}

/* Automation switches: keep checked position stable without hover flicker. */
body.app.is-coach-account .coach-automations-shell :is(.booking-link-toggle, .booking-link-toggle *, .coach-automation-switch, .coach-automation-switch *){
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease !important;
  animation: none !important;
}

body.app.is-coach-account .coach-automations-shell .booking-link-toggle,
body.app.is-coach-account .coach-automations-shell .booking-link-toggle:is(:hover, :focus, :focus-visible, :active, .is-pressed){
  transform: none !important;
  translate: none !important;
}

body.app.is-coach-account .coach-automations-shell .booking-link-toggle .booking-link-toggle-thumb,
body.app.is-coach-account .coach-automations-shell .booking-link-toggle:is(:hover, :focus, :focus-visible, :active, .is-pressed) .booking-link-toggle-thumb{
  transform: translateX(0) !important;
  translate: none !important;
  transition: none !important;
}

body.app.is-coach-account .coach-automations-shell .booking-link-toggle.is-active .booking-link-toggle-thumb,
body.app.is-coach-account .coach-automations-shell .booking-link-toggle.is-active:is(:hover, :focus, :focus-visible, :active, .is-pressed) .booking-link-toggle-thumb{
  transform: translateX(18px) !important;
  translate: none !important;
}

body.app.is-coach-account .coach-automations-shell .coach-automation-switch-track::after{
  transform: translateX(0) !important;
  transition: none !important;
}

body.app.is-coach-account .coach-automations-shell .coach-automation-switch input:checked + .coach-automation-switch-track::after{
  transform: translateX(20px) !important;
}

/* Coach locker share modal: make recipient selection usable for long client lists. */
.locker-share-modal-card{
  width: min(720px, calc(100vw - 2rem));
  max-height: min(92dvh, 860px);
  display: flex;
  flex-direction: column;
}

.locker-share-modal-card .modal-body{
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.locker-share-client-list{
  min-height: min(22rem, 42dvh);
  max-height: clamp(22rem, 48dvh, 34rem) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: .45rem;
}

@media (max-width: 780px){
  .locker-share-modal-card{
    width: calc(100vw - .75rem);
    max-height: calc(96dvh - var(--appbar-height, 0px));
  }

  .locker-share-modal-card .modal-body{
    overflow-y: auto;
  }

  .locker-share-client-list{
    min-height: 16rem;
    max-height: 46dvh !important;
  }
}

@media (max-width: 520px){
  .locker-share-modal-card{
    width: calc(100vw - .5rem);
    max-height: calc(97dvh - var(--appbar-height, 0px));
  }

  .locker-share-client-list{
    min-height: 14rem;
    max-height: 44dvh !important;
  }
}

/* Coach library spacing: separate the main library cards and give rows more breathing room. */
.coach-library-page{
  display: grid;
  gap: 1.45rem;
}

.coach-library-page > .library-panel-modern,
.coach-library-page > .library-panel-modern[style]{
  margin-top: 0 !important;
}

.coach-library-page .library-panel-modern{
  padding: 1.25rem;
}

.coach-library-page .library-master-body{
  padding-top: 1.05rem;
  margin-top: 1.05rem;
}

.coach-library-page .library-modern-tools,
.coach-library-page .exercise-filter-tools{
  margin-bottom: 1rem;
}

.coach-library-page .library-modern-list,
.coach-library-page .locker-list,
.coach-library-page .exercise-list-modern{
  display: grid;
  gap: .75rem;
  padding-top: .95rem;
}

.coach-library-page .library-plan-section{
  gap: .7rem;
}

.coach-library-page .library-plan-section + .library-plan-section{
  margin-top: .9rem;
  padding-top: 1rem;
}

.coach-library-page .library-plan-row,
.coach-library-page .locker-file-row,
.coach-library-page .exercise-row-card{
  padding: .95rem 1.05rem;
}

@media (max-width: 760px){
  .coach-library-page{
    gap: 1.1rem;
  }

  .coach-library-page .library-panel-modern{
    padding: 1rem;
  }

  .coach-library-page .library-master-body{
    padding-top: .9rem;
    margin-top: .9rem;
  }

  .coach-library-page .library-modern-list,
  .coach-library-page .locker-list,
  .coach-library-page .exercise-list-modern{
    gap: .65rem;
  }

  .coach-library-page .library-plan-row,
  .coach-library-page .locker-file-row,
  .coach-library-page .exercise-row-card{
    padding: .85rem;
  }
}

/* Global search field alignment: keep search icons from overlapping input text in every theme/account. */
body.app :is(
  .coach-directory-search-input,
  .library-search-input-wrap,
  .locker-share-search-field,
  .messages-new-search-field,
  .contacts-search-wrap,
  .history-pb-search-field,
  .messages-inbox-modern .messages-search-input-wrap,
  .message-search-bar,
  .messages-archived-search
){
  position: relative !important;
}

body.app :is(
  .coach-directory-search-input,
  .library-search-input-wrap,
  .locker-share-search-field,
  .messages-new-search-field,
  .contacts-search-wrap,
  .history-pb-search-field,
  .messages-inbox-modern .messages-search-input-wrap,
  .message-search-bar,
  .messages-archived-search
) > .nav-icon-lucide,
body.app :is(
  .coach-directory-search-input,
  .library-search-input-wrap,
  .locker-share-search-field,
  .messages-new-search-field,
  .contacts-search-wrap,
  .history-pb-search-field,
  .messages-inbox-modern .messages-search-input-wrap,
  .message-search-bar,
  .messages-archived-search
) > i[data-lucide="search"]{
  position: absolute !important;
  left: 1rem !important;
  top: 50% !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

body.app :is(
  .coach-directory-search-input,
  .library-search-input-wrap,
  .locker-share-search-field,
  .messages-new-search-field,
  .contacts-search-wrap,
  .history-pb-search-field,
  .messages-inbox-modern .messages-search-input-wrap,
  .message-search-bar,
  .messages-archived-search
) input{
  min-width: 0 !important;
  padding-left: 3rem !important;
}

body.app :is(
  .messages-inbox-modern .messages-search-input-wrap,
  .message-search-bar
) input{
  padding-right: 2.75rem !important;
}

/* Admin/super-admin card movement lock: match coach static card behavior. */
body.app[data-authenticated="1"][data-account-type="admin"] :is(
  .card,
  article,
  .admin-shell .card,
  .admin-ops-card,
  .admin-dashboard-card,
  .admin-card-toggle,
  .dashboard-card,
  .dashboard-cards > *,
  [class*="admin-"][class*="card"],
  [class*="admin-"][class*="panel"]
),
body.app[data-authenticated="1"][data-account-type="admin"] :is(
  .card,
  article,
  .admin-shell .card,
  .admin-ops-card,
  .admin-dashboard-card,
  .admin-card-toggle,
  .dashboard-card,
  .dashboard-cards > *,
  [class*="admin-"][class*="card"],
  [class*="admin-"][class*="panel"]
) *:not(.ring-center):not(.target-center){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
  transition: none !important;
}

body.app[data-authenticated="1"][data-account-type="admin"] :is(
  .card,
  article,
  .admin-shell .card,
  .admin-ops-card,
  .admin-dashboard-card,
  .admin-card-toggle,
  .dashboard-card,
  .dashboard-cards > *,
  [class*="admin-"][class*="card"],
  [class*="admin-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed),
body.app[data-authenticated="1"][data-account-type="admin"] :is(
  .card,
  article,
  .admin-shell .card,
  .admin-ops-card,
  .admin-dashboard-card,
  .admin-card-toggle,
  .dashboard-card,
  .dashboard-cards > *,
  [class*="admin-"][class*="card"],
  [class*="admin-"][class*="panel"]
):is(:hover, :focus, :focus-visible, :active, .is-pressed) *:not(.ring-center):not(.target-center){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
  transition: none !important;
}

body.app[data-authenticated="1"][data-account-type="admin"] :is(.dashboard-cards, .admin-ops-grid, .grid2, .grid3) > :first-child,
body.app[data-authenticated="1"][data-account-type="admin"] :is(.dashboard-cards, .admin-ops-grid, .grid2, .grid3) > :first-child:is(:hover, :focus, :focus-visible, :active){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  box-shadow: none !important;
}

/* User/client card movement lock: match coach/admin static card behavior. */
body.app[data-authenticated="1"][data-account-type="user"] :is(
  .card,
  article,
  .daycard,
  .dashboard-card,
  .mobile-card,
  .metric-tile,
  .plan-day,
  .plan-day-summary,
  .progress-summary-card,
  .progress-photo-summary-card,
  .progress-photo-date-card,
  .progress-photo-date-summary,
  .progress-measurements-figure,
  .progress-measurements-current,
  .progress-measurements-form,
  .progress-measurement-trend,
  .history-summary-card,
  .history-pb-card,
  .library-panel,
  .library-panel-modern,
  .exercise-row-card,
  .message-card,
  .messages-shortcut-card
),
body.app[data-authenticated="1"][data-account-type="user"] :is(
  .card,
  article,
  .daycard,
  .dashboard-card,
  .mobile-card,
  .metric-tile,
  .plan-day,
  .plan-day-summary,
  .progress-summary-card,
  .progress-photo-summary-card,
  .progress-photo-date-card,
  .progress-photo-date-summary,
  .progress-measurements-figure,
  .progress-measurements-current,
  .progress-measurements-form,
  .progress-measurement-trend,
  .history-summary-card,
  .history-pb-card,
  .library-panel,
  .library-panel-modern,
  .exercise-row-card,
  .message-card,
  .messages-shortcut-card
):is(:hover, :focus, :focus-visible, :active, .is-pressed){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
  animation: none !important;
}

body.app[data-authenticated="1"][data-account-type="user"] :is(
  .card,
  article,
  .daycard,
  .dashboard-card,
  .mobile-card,
  .metric-tile,
  .plan-day,
  .plan-day-summary,
  .progress-summary-card,
  .progress-photo-summary-card,
  .progress-photo-date-card,
  .progress-photo-date-summary,
  .progress-measurements-figure,
  .progress-measurements-current,
  .progress-measurements-form,
  .progress-measurement-trend,
  .history-summary-card,
  .history-pb-card,
  .library-panel,
  .library-panel-modern,
  .exercise-row-card,
  .message-card,
  .messages-shortcut-card
){
  transition-property: background-color, border-color, color, box-shadow, opacity !important;
}

body.app[data-authenticated="1"][data-account-type="user"] :is(.dashboard-cards, .weeklist, .plan-grid, .progress-summary-grid, .progress-photo-summary-grid) > :first-child,
body.app[data-authenticated="1"][data-account-type="user"] :is(.dashboard-cards, .weeklist, .plan-grid, .progress-summary-grid, .progress-photo-summary-grid) > :first-child:is(:hover, :focus, :focus-visible, :active){
  transform: none !important;
  translate: none !important;
  top: auto !important;
  margin-top: 0 !important;
}
/* Mobile browser orientation guard: block landscape phone layouts. */
.mobile-orientation-guard{
  display: none;
}

@media (orientation: landscape) and (pointer: coarse) and (max-height: 560px){
  html,
  body{
    overflow: hidden !important;
    touch-action: none;
  }

  .mobile-orientation-guard{
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background: #161916;
    color: #f8fafc;
  }

  .mobile-orientation-guard-panel{
    width: min(420px, 88vw);
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
  }

  .mobile-orientation-guard-panel img{
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .mobile-orientation-guard-panel strong{
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: 800;
  }

  .mobile-orientation-guard-panel span{
    color: #d1d5d2;
    font-size: .95rem;
    line-height: 1.35;
  }
}

/* Public macro calculator: match the authenticated dark theme surface. */
body.public-site .macropro-shell{
  color: #e2e8f0;
}

body.public-site .macropro-head p,
body.public-site #macropro-feedback.muted{
  color: #94a3b8 !important;
}

body.public-site .macropro-card,
body.public-site .macropro-results{
  border-color: rgba(148,163,184,.24) !important;
  background: linear-gradient(175deg, rgba(15,23,42,.84), rgba(2,6,23,.94)) !important;
  background-color: rgba(15,23,42,.84) !important;
  box-shadow: 0 26px 56px rgba(2,6,23,.46) !important;
}

body.public-site .macropro-card h2,
body.public-site .macropro-card h3,
body.public-site .macropro-panel h3,
body.public-site .macropro-grid label,
body.public-site .macropro-slider-label,
body.public-site .macropro-accordion summary,
body.public-site .macropro-results-head h2{
  color: #e2e8f0 !important;
}

body.public-site .macropro-results-head h2,
body.public-site .macropro-stat-card strong{
  color: #f8fafc !important;
}

body.public-site .macropro-grid input,
body.public-site .macropro-grid select{
  border-color: rgba(148,163,184,.3) !important;
  background: rgba(15,23,42,.65) !important;
  background-color: rgba(15,23,42,.65) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

body.public-site .macropro-grid input::placeholder{
  color: #8ea2bd !important;
}

body.public-site .macropro-grid input:focus,
body.public-site .macropro-grid select:focus{
  border-color: rgba(56,189,248,.72) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,.2) !important;
}

body.public-site .macropro-stat-card,
body.public-site .macropro-panel,
body.public-site .macropro-support-grid > div,
body.public-site .macropro-permeal-grid > div,
body.public-site .macropro-summary-grid > div,
body.public-site .macropro-accordion{
  border-color: rgba(148,163,184,.22) !important;
  background: rgba(15,23,42,.62) !important;
  color: #e2e8f0 !important;
}

body.public-site .macropro-stat-card span,
body.public-site .macropro-stat-card small,
body.public-site .macropro-legend,
body.public-site .macropro-permeal-grid span,
body.public-site .macropro-summary-grid span,
body.public-site .macropro-summary-grid small,
body.public-site .macropro-support-grid span,
body.public-site .macropro-disclaimer{
  color: #94a3b8 !important;
}

body.public-site .macropro-legend strong,
body.public-site .macropro-support-grid strong,
body.public-site .macropro-permeal-grid strong,
body.public-site .macropro-summary-grid strong,
body.public-site .macropro-disclaimer strong{
  color: #e2e8f0 !important;
}

body.public-site .macropro-accordion-body{
  color: #cbd5e1 !important;
}

body.public-site .macropro-guide-copy,
body.public-site .macropro-guide-visual,
body.public-site .macropro-guide-card{
  border-color: rgba(148,163,184,.22) !important;
  background: linear-gradient(180deg, rgba(15,23,42,.76), rgba(2,6,23,.9)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

body.public-site .macropro-guide-copy h4,
body.public-site .macropro-guide-card h5,
body.public-site .macropro-guide-visual-copy strong{
  color: #f8fafc !important;
}

body.public-site .macropro-guide-summary,
body.public-site .macropro-guide-card p,
body.public-site .macropro-guide-visual-copy span{
  color: #94a3b8 !important;
}

body.public-site .macropro-guide-chips span{
  border-color: rgba(56,189,248,.22) !important;
  background: rgba(8,47,73,.42) !important;
  color: #dbeafe !important;
}

body.public-site .macropro-toggle,
body.public-site .macropro-copy-btn,
body.public-site #macropro-calculate{
  border: 1px solid var(--ui-btn-dark-border) !important;
  background: var(--ui-btn-dark-bg) !important;
  background-color: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  box-shadow: none !important;
}

body.public-site .macropro-toggle:hover,
body.public-site .macropro-toggle:focus,
body.public-site .macropro-toggle:focus-visible,
body.public-site .macropro-toggle:active,
body.public-site .macropro-copy-btn:hover,
body.public-site .macropro-copy-btn:focus,
body.public-site .macropro-copy-btn:focus-visible,
body.public-site .macropro-copy-btn:active,
body.public-site #macropro-calculate:hover,
body.public-site #macropro-calculate:focus,
body.public-site #macropro-calculate:focus-visible,
body.public-site #macropro-calculate:active{
  border-color: var(--ui-btn-dark-hover-border) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
  background-color: var(--ui-btn-dark-hover-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
  transform: none !important;
}

body.public-site .macropro-toggle.active{
  border-color: var(--ui-btn-primary-border) !important;
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
}

.admin-badge{
  background: rgba(123,172,44,.72);
}
/* Nutrition actions: light-mode header icons must stay dark. */
html[data-theme="light"] body.app[data-authenticated="1"] .page-actions.nutrition-actions :is(#edit-targets-btn, #log-water-btn, #log-food-btn, #add-custom-food-btn) :is(.nav-icon-lucide, svg, i){
  color: #161917 !important;
  stroke: #161917 !important;
  fill: none !important;
}

/* Keep the desktop sidebar minimise control consistent across themes. */
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle{
  background: transparent !important;
  border-color: rgba(159,163,160,.24) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:hover,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:focus,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:focus-visible,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:hover,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:focus,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle:focus-visible{
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(206,210,207,.36) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] .desktop-sidebar-toggle .nav-icon-lucide{
  color: #ffffff !important;
  stroke: currentColor !important;
}

/* Light mode may be represented by the absence of data-theme="dark". */
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle{
  background: transparent !important;
  border-color: rgba(159,163,160,.24) !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible{
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(206,210,207,.36) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide{
  color: #ffffff !important;
  stroke: currentColor !important;
}

/* Sidebar minimise button: keep light mode visually identical to dark mode. */
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle{
  background: #262926 !important;
  background-color: #262926 !important;
  border-color: rgba(92,129,32,.72) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible{
  background: #2f3230 !important;
  background-color: #2f3230 !important;
  border-color: rgba(142,146,143,.82) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="dark"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide{
  color: #ffffff !important;
  stroke: currentColor !important;
}

/* Final light-mode sidebar minimise button reset. */
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle{
  background: #ebefeb !important;
  background-color: #ebefeb !important;
  border-color: rgba(22,25,22,.18) !important;
  color: #161917 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:hover,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle:focus-visible{
  background: #e3e7e4 !important;
  background-color: #e3e7e4 !important;
  border-color: rgba(22,25,22,.24) !important;
  color: #161917 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html[data-theme="light"] body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .desktop-sidebar-toggle-label,
html:not([data-theme="dark"]) body.app[data-desktop-sidebar="1"] button.desktop-sidebar-toggle .nav-icon-lucide{
  color: #161917 !important;
  stroke: currentColor !important;
}


/* Final light-mode grey button outline lock: grey/subtle buttons get black borders. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action,
  .nutrition-actions #edit-targets-btn,
  .nutrition-actions #log-water-btn,
  .nutrition-actions #log-food-btn,
  .nutrition-actions #add-custom-food-btn
){
  border: .75px solid #161916 !important;
  border-color: #161916 !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .pill-link:not(.admin-back):not(.back-link):not(.is-danger):not(.btn-info):not(.btn-primary):not(.day-complete-btn):not(.day-save-btn),
  .secondary-button,
  .history-page-action-btn,
  .history-checkin-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .history-month-btn,
  .messages-primary-cta,
  .messages-inbox-modern .messages-fab-newchat,
  .messages-inbox-modern .messages-empty-actions .pill-link,
  .contacts-primary-btn,
  .contacts-message-btn,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action,
  .nutrition-actions #edit-targets-btn,
  .nutrition-actions #log-water-btn,
  .nutrition-actions #log-food-btn,
  .nutrition-actions #add-custom-food-btn
):is(:hover, :focus, :focus-visible, :active){
  border-width: .75px !important;
  border-color: #161916 !important;
}


/* Absolute final dashboard Start/Continue outline lock in light mode. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  #continue-workout-cta,
  #desk-continue-cta,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop
){
  border: .75px solid #161916 !important;
  border-color: #161916 !important;
  box-shadow: none !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app :is(
  #continue-workout-cta,
  #desk-continue-cta,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop
):is(:hover, :focus, :focus-visible, :active){
  border: .75px solid #161916 !important;
  border-color: #161916 !important;
  box-shadow: none !important;
}


/* Absolute final light-mode grey button outline lock. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  a[role="button"].secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .page-actions .secondary:not(.back-link):not(.admin-back):not(.is-danger),
  .pill-link.secondary:not(.back-link):not(.admin-back):not(.is-danger),
  .secondary-button:not(.back-link):not(.admin-back):not(.is-danger),
  .btn-light,
  .history-page-action-btn,
  .history-checkin-btn,
  .history-month-btn,
  .progress-subtab-btn,
  .progress-action-btn,
  .progress-photo-angle-tab,
  .progress-photo-compare-date-btn,
  .macropro-toggle,
  .macropro-copy-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .contacts-primary-btn,
  .contacts-message-btn,
  .messages-primary-cta,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action,
  .page-actions.nutrition-actions > a,
  .page-actions.nutrition-actions > button,
  .page-actions.nutrition-actions > .pill-link,
  .nutrition-targets .targets-actions > button,
  .coach-library-page .exercise-filter-toggle,
  .coach-library-page .library-add-btn
):not(.btn-primary):not(.btn-info):not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.pb-row) {
  border: .75px solid #0f172a !important;
  border-color: #0f172a !important;
  box-shadow: none !important;
}

/* Dated, one-off workout entry point and labels. */
.off-plan-workout-card{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:.65rem;
  margin:0 0 1rem;
  padding:.65rem .75rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card);
  box-shadow:var(--shadow);
}

/* Two entry points share the card's action column. They wrap on a narrow
   screen rather than squeezing the copy beside them. */
.off-plan-workout-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:.4rem;
}
.off-plan-workout-alt{
  white-space:nowrap;
}
/* Two buttons need more room than one did. Rather than let them squeeze the
   title into a three-word column, they take a row of their own below the copy
   once the card is narrow, and split the width evenly. */
@media (max-width: 640px){
  .off-plan-workout-card:has(.off-plan-workout-actions){
    grid-template-columns:auto minmax(0, 1fr);
  }
  .off-plan-workout-actions{
    grid-column:1 / -1;
    justify-content:stretch;
  }
  .off-plan-workout-actions > *{
    flex:1 1 0;
    min-width:0;
  }
  .off-plan-workout-actions .off-plan-workout-cta,
  .off-plan-workout-actions .off-plan-workout-alt{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
  }
}

.off-plan-workout-icon{
  display:grid;
  width:1.9rem;
  height:1.9rem;
  place-items:center;
  border-radius:8px;
  background:var(--soft);
  color:var(--ink);
}

.off-plan-workout-icon .nav-icon-lucide{
  width:15px;
  height:15px;
}

.off-plan-workout-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:.1rem;
}

.off-plan-workout-copy strong{
  color:var(--text);
  font-size:.85rem;
  line-height:1.2;
}

.off-plan-workout-copy span{
  color:var(--muted);
  font-size:.76rem;
  line-height:1.3;
}

.off-plan-workout-card form{
  margin:0;
}

.off-plan-workout-cta,
button.off-plan-workout-cta{
  min-height:2.1rem;
  padding:.4rem .8rem;
  font-size:.82rem;
  white-space:nowrap;
}

.off-plan-workout-cta.is-loading{
  opacity:.7;
  pointer-events:none;
}

.off-plan-session-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:.18rem .45rem;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--soft);
  color:var(--muted);
  font-size:.68rem;
  font-weight:700;
  line-height:1;
}

.off-plan-edit-link{
  color:var(--muted);
  font-size:.8rem;
  font-weight:600;
}

.off-plan-title-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:.45rem;
  width:min(100%, 32rem);
  margin:0;
}

.off-plan-workout-title{
  flex:1 1 20rem;
  width:100%;
}

.off-plan-title-input{
  width:100%;
  min-width:0;
  min-height:2.7rem;
  padding:.52rem .7rem;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--input-bg, var(--card));
  color:var(--ink);
  font-size:1rem;
  font-weight:700;
  line-height:1.2;
}

.off-plan-title-input:focus{
  border-color:var(--brand);
  outline:2px solid color-mix(in srgb, var(--brand) 20%, transparent);
  outline-offset:1px;
}

.off-plan-title-status{
  min-width:3.25rem;
  font-size:.72rem;
  font-weight:600;
  text-align:right;
}

.off-plan-title-status.is-error{
  color:var(--danger);
}

.off-plan-add-exercise-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:.5rem;
  align-items:start;
  margin-top:1rem;
}

.off-plan-add-exercise-form > .off-plan-add-exercise-btn{
  width:auto !important;
  min-width:4.75rem;
  margin-top:0;
}

.off-plan-add-exercise-form input[type="text"]{
  flex:1 1 auto;
  min-width:0;
}

.off-plan-autocomplete{
  flex:1 1 auto;
  min-width:0;
}

.off-plan-autocomplete input[type="text"]{
  width:100%;
}

/* Deliberately in normal flow, not position:absolute - .workout-stack and
   .exercise-list use content-visibility:auto, which implies contain:paint
   and clips any absolutely-positioned overflow. An in-flow block just
   pushes the rest of the form down instead of being clipped. */
.off-plan-autocomplete-results[hidden]{
  display:none !important;
}

.off-plan-autocomplete-results{
  margin-top:.35rem;
  max-height:16rem;
  overflow-y:auto;
  display:grid;
  gap:.25rem;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.off-plan-autocomplete-results .plan-exercise-search-result{
  display:flex;
  align-items:center;
  gap:.6rem;
  width:100%;
  min-height:0;
  padding:.5rem .6rem;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.off-plan-autocomplete-results .plan-exercise-search-result:hover,
.off-plan-autocomplete-results .plan-exercise-search-result:focus-visible{
  background:var(--soft);
}

.off-plan-autocomplete-results .plan-exercise-search-result-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:8px;
  background:var(--soft);
  color:var(--ink);
  flex:0 0 auto;
}

.off-plan-autocomplete-results .plan-exercise-search-result-name{
  font-size:.85rem;
  font-weight:600;
  display:block;
  white-space:normal;
  overflow-wrap:anywhere;
}

.off-plan-autocomplete-results .plan-exercise-search-result-main{
  display:grid;
  grid-template-columns:1.8rem minmax(0, 1fr);
  align-items:center;
  gap:.6rem;
  width:100%;
  min-width:0;
}
.off-plan-autocomplete-results .plan-exercise-search-result-copy{
  display:grid;
  gap:.35rem;
  min-width:0;
}
.off-plan-autocomplete-results .plan-exercise-search-result-title-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.35rem;
  min-width:0;
}

/* Mirrors .alt-swap-btn hardening - the global dark-theme button rule
   forces background/border on any button not marked .icon-btn, which made
   these edit controls render at different sizes. */
button.off-plan-icon-btn.off-plan-icon-btn,
.off-plan-icon-btn{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:0 0 2rem !important;
  flex-shrink:0 !important;
  width:2rem !important;
  min-width:2rem !important;
  max-width:2rem !important;
  height:2rem !important;
  min-height:2rem !important;
  max-height:2rem !important;
  padding:0 !important;
  border:none !important;
  outline:none !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:6px;
  color:var(--muted);
  cursor:pointer;
  transition:color .15s, background .15s;
}

button.off-plan-icon-btn.off-plan-icon-btn[hidden],
.off-plan-icon-btn[hidden]{
  display:none !important;
}

button.alt-swap-btn.off-plan-cycle-btn{
  flex:0 0 2rem !important;
  width:2rem !important;
  min-width:2rem !important;
  max-width:2rem !important;
  height:2rem !important;
  min-height:2rem !important;
  max-height:2rem !important;
  border-radius:6px !important;
}

button.alt-swap-btn.off-plan-cycle-btn .nav-icon-lucide{
  width:1rem !important;
  height:1rem !important;
}

.off-plan-icon-btn:hover,
.off-plan-icon-btn:focus-visible{
  background:var(--soft) !important;
  color:var(--ink);
}

.off-plan-icon-btn:focus-visible{
  outline:2px solid var(--color-accent) !important;
  outline-offset:1px;
}

button.off-plan-icon-btn.off-plan-icon-btn .nav-icon-lucide,
.off-plan-icon-btn .nav-icon-lucide{
  width:1rem !important;
  height:1rem !important;
}

/* Completed off-plan rows should match planned workouts. Keep the detailed
   set table available only while the user has deliberately opened edit mode. */
#day-exercises .exercise-row.is-complete:not(.is-off-plan-editing) > :is(
  .exercise-template-notes,
  .exercise-media
){
  display:none !important;
}

.off-plan-delete-form{
  margin:0;
  flex:0 0 auto;
}

.off-plan-delete-form .off-plan-icon-btn{
  color:var(--color-danger);
}

.off-plan-delete-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.off-plan-save-control{
  display:inline-flex;
  flex:0 0 auto;
}

.off-plan-save-control[hidden]{
  display:none !important;
}

/* Inline rename - sits in the exercise title bar in place of the title.
   display:flex would defeat the hidden attribute, so restore it explicitly */
.off-plan-rename-form[hidden],
.off-plan-alt-add-form[hidden],
.exercise-row-title-bar form[hidden]{
  display:none !important;
}

.off-plan-rename-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  flex:1 1 auto;
  min-width:0;
  align-items:start;
  gap:.4rem;
  margin:0;
}

.off-plan-rename-form input[type="text"]{
  width:100%;
  min-width:0;
  font-weight:600;
}

.off-plan-alt-add-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:start;
  gap:.4rem;
  flex:1 1 auto;
  min-width:0;
  margin:0;
}

.off-plan-alt-add-form .off-plan-autocomplete,
.off-plan-alt-add-form input[type="text"]{
  width:100%;
  min-width:0;
}

.off-plan-alt-add-form input[type="text"]{
  font-weight:600;
}

.off-plan-alt-add-form .off-plan-loading-icon{
  display:none;
}

.off-plan-alt-add-form .off-plan-icon-btn.is-loading .off-plan-submit-icon{
  display:none;
}

.off-plan-alt-add-form .off-plan-icon-btn.is-loading .off-plan-loading-icon{
  display:block;
  animation:offPlanLoadingPulse .8s ease-in-out infinite alternate;
}

@keyframes offPlanLoadingPulse{
  from{ opacity:.45; transform:scale(.9); }
  to{ opacity:1; transform:scale(1); }
}

.exercise-row.is-off-plan-editing .exercise-row-title-bar{
  align-items:flex-start;
}

.exercise-row.is-off-plan-editing :is(
  .off-plan-save-control,
  [data-off-plan-rename-toggle],
  [data-off-plan-alt-add-toggle],
  .off-plan-delete-form
){
  align-self:flex-start;
  margin-top:.1rem;
}

/* Full-page posts (add/rename/remove) - dim the control while navigating */
.off-plan-icon-btn[aria-busy="true"],
.off-plan-add-exercise-form button.is-loading{
  opacity:.55;
  pointer-events:none;
}

@media (max-width: 620px){
  .off-plan-title-form{
    grid-template-columns:1fr;
    gap:.25rem;
    width:100%;
  }

  .off-plan-title-status{
    min-width:0;
    min-height:.9rem;
    text-align:left;
  }

  .off-plan-workout-card{
    grid-template-columns:auto minmax(0, 1fr);
    gap:.5rem .65rem;
    padding:.6rem .7rem;
  }

  .off-plan-workout-card form,
  .off-plan-workout-card > .off-plan-workout-cta{
    grid-column:1 / -1;
  }

  .off-plan-workout-cta,
  button.off-plan-workout-cta{
    width:100%;
  }
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  button.secondary:not(.is-danger):not(.btn-danger):not(.day-complete-btn):not(.day-save-btn),
  a.secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  a[role="button"].secondary:not(.back-link):not(.admin-back):not(.is-danger):not(.day-complete-btn):not(.day-save-btn),
  .page-actions .secondary:not(.back-link):not(.admin-back):not(.is-danger),
  .pill-link.secondary:not(.back-link):not(.admin-back):not(.is-danger),
  .secondary-button:not(.back-link):not(.admin-back):not(.is-danger),
  .btn-light,
  .history-page-action-btn,
  .history-checkin-btn,
  .history-month-btn,
  .progress-subtab-btn,
  .progress-action-btn,
  .progress-photo-angle-tab,
  .progress-photo-compare-date-btn,
  .macropro-toggle,
  .macropro-copy-btn,
  .plan-day-edit-btn,
  .plan-actions-toggle,
  .plan-week-add,
  .plan-week-remove,
  .contacts-primary-btn,
  .contacts-message-btn,
  .messages-primary-cta,
  .settings-save-btn,
  .settings-upgrade-lock-btn,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop,
  .week-page-head .page-actions .week-page-action,
  .page-actions.nutrition-actions > a,
  .page-actions.nutrition-actions > button,
  .page-actions.nutrition-actions > .pill-link,
  .nutrition-targets .targets-actions > button,
  .coach-library-page .exercise-filter-toggle,
  .coach-library-page .library-add-btn
):not(.btn-primary):not(.btn-info):not(.is-danger):not(.btn-danger):not(.auto-danger-btn):not(.subtle-danger-btn):not(.subtle-danger-icon-btn):not(.settings-delete-account-btn):not(.settings-disconnect-btn):not(.btn-icon-only):not(.icon-btn):not(.appbar-icon-btn):not(.appbar-back):not(.message-menu-trigger):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.coach-automation-icon-btn):not(.coach-payments-icon-btn):not(.feed-action-button):not(.pb-row):is(:hover, :focus, :focus-visible, :active) {
  border: .75px solid #0f172a !important;
  border-color: #0f172a !important;
  box-shadow: none !important;
}


/* Training library row action icons stay borderless, including download/edit. */
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .coach-library-file-actions.library-plan-actions > :is(span, button, a),
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .coach-library-file-actions.library-plan-actions > :is(span, button, a):is(:hover, :focus, :focus-visible, :active),
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .library-plan-icon-action,
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .library-plan-icon-action:is(:hover, :focus, :focus-visible, :active),
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .library-action-trigger,
body.app[data-authenticated="1"] .coach-library-page .coach-library-plan:not(.locker-file-row) .library-action-trigger:is(:hover, :focus, :focus-visible, :active){
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Coach locker asset actions: transparent hitbox with icon movement only. */
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .locker-action-btn,
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .locker-action-btn:is(:hover, :focus, :focus-visible, :active),
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .library-action-trigger,
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .library-action-trigger:is(:hover, :focus, :focus-visible, :active){
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  outline: 0 !important;
}

body.app[data-authenticated="1"] .coach-library-page .locker-file-row .locker-action-btn:is(:hover, :focus, :focus-visible),
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .library-action-trigger:is(:hover, :focus, :focus-visible){
  transform: translateY(-1px) !important;
}

body.app[data-authenticated="1"] .coach-library-page .locker-file-row .locker-action-btn:active,
body.app[data-authenticated="1"] .coach-library-page .locker-file-row .library-action-trigger:active{
  transform: translateY(1px) !important;
}


/* Absolute final coach locker icon hover reset: no square fill in light or dark mode. */
:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger),
:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger):is(:hover, :focus, :focus-visible, :active, .is-pressed){
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger)::before,
:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger)::after{
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger):is(:hover, :focus, :focus-visible) {
  transform: translateY(-1px) !important;
}

:is(html[data-theme="light"], html[data-theme="dark"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .coach-library-page .locker-file-row :is(.locker-action-btn, .library-action-trigger):active {
  transform: translateY(1px) !important;
}


/* Public pages: white canvas with the existing smoke/plasma atmosphere preserved. */
html[data-theme="light"] body.public-site{
  overflow-x: hidden; /* prevents 100vw section bands from triggering horizontal scroll */
  background:
    radial-gradient(1050px 620px at 8% -8%, rgba(123,172,44,.10), transparent 60%),
    radial-gradient(900px 540px at 96% 8%, rgba(16,185,129,.08), transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 52%, #f8fbff 100%) !important;
  background-color: #ffffff !important;
  color: #1e211e !important;
}

html[data-theme="light"] body.public-site .public-ambient{
  opacity: 1 !important;
}

html[data-theme="light"] body.public-site .public-plasma-canvas{
  opacity: .22 !important;
  filter: saturate(.86) blur(.25px) !important;
}

html[data-theme="light"] body.public-site .public-plasma-layer.is-fallback{
  background:
    radial-gradient(52% 42% at 18% 16%, rgba(141,195,55,.12) 0%, rgba(141,195,55,0) 72%),
    radial-gradient(40% 34% at 78% 20%, rgba(148,206,56,.10) 0%, rgba(148,206,56,0) 76%),
    radial-gradient(48% 38% at 50% 64%, rgba(123,172,44,.06) 0%, rgba(123,172,44,0) 76%) !important;
}

html[data-theme="light"] body.public-site .public-ambient-orb-a{
  background: radial-gradient(circle, rgba(123,172,44,.18) 0%, rgba(123,172,44,0) 72%) !important;
}

html[data-theme="light"] body.public-site .public-ambient-orb-b{
  background: radial-gradient(circle, rgba(148,206,56,.14) 0%, rgba(148,206,56,0) 70%) !important;
}

html[data-theme="light"] body.public-site .public-header{
  background: rgba(8,8,10,.96) !important;
  border-bottom-color: rgba(255,255,255,.10) !important;
}

html[data-theme="light"] body.public-site h1,
html[data-theme="light"] body.public-site h2,
html[data-theme="light"] body.public-site h3,
html[data-theme="light"] body.public-site h4{
  color: #1e211e;
}

html[data-theme="light"] body.public-site .public-nav-center a,
html[data-theme="light"] body.public-site .public-nav-right a{
  color: #b4b8b5;
}

html[data-theme="light"] body.public-site .public-nav-center a:hover,
html[data-theme="light"] body.public-site .public-nav-right a:hover{
  color: #ffffff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  box-shadow: none;
}

html[data-theme="light"] body.public-site .public-nav-center a.is-active,
html[data-theme="light"] body.public-site .public-nav-right a.is-active{
  color: #ffffff;
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}


/* Public white theme: make smoke and grey grid visible over the white canvas. */
html[data-theme="light"] body.public-site .public-ambient{
  opacity: 1 !important;
  mix-blend-mode: multiply;
}

html[data-theme="light"] body.public-site .public-plasma-layer{
  opacity: 1 !important;
}

html[data-theme="light"] body.public-site .public-plasma-canvas{
  opacity: .62 !important;
  filter: saturate(1.05) blur(.2px) contrast(1.08) !important;
}

html[data-theme="light"] body.public-site .public-plasma-layer.is-fallback{
  background:
    radial-gradient(52% 42% at 18% 16%, rgba(141,195,55,.22) 0%, rgba(141,195,55,0) 72%),
    radial-gradient(40% 34% at 78% 20%, rgba(148,206,56,.18) 0%, rgba(148,206,56,0) 76%),
    radial-gradient(48% 38% at 50% 64%, rgba(82,85,82,.12) 0%, rgba(82,85,82,0) 76%) !important;
}

html[data-theme="light"] body.public-site .public-ambient-orb{
  opacity: .62 !important;
  filter: blur(36px) !important;
}

html[data-theme="light"] body.public-site .public-ambient-orb-a{
  background: radial-gradient(circle, rgba(123,172,44,.26) 0%, rgba(123,172,44,0) 72%) !important;
}

html[data-theme="light"] body.public-site .public-ambient-orb-b{
  background: radial-gradient(circle, rgba(148,206,56,.20) 0%, rgba(148,206,56,0) 70%) !important;
}

html[data-theme="light"] body.public-site .public-ambient-grid{
  opacity: 1 !important;
  background-image:
    linear-gradient(rgba(112,116,113,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,116,113,.18) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.42) 62%, transparent 94%) !important;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.42) 62%, transparent 94%) !important;
}


/* Public light auth forms: labels must read black on the white canvas. */
html[data-theme="light"] body.public-site .public-auth-card label{
  color: #000000 !important;
}

html[data-theme="light"] body.public-site .public-auth-card input[type="email"],
html[data-theme="light"] body.public-site .public-auth-card input[type="password"],
html[data-theme="light"] body.public-site .public-auth-card input[type="text"]{
  color: #000000 !important;
}


/* ════════════════════════════════════════════════════════════════
   Public home v2 (ph2) — editorial hero, scroll story, app showcase
   ════════════════════════════════════════════════════════════════ */

.ph2-defs{
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── Hero: brand lockup + animated logo ring ─────────────────── */
.ph2-hero-brand{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ph2-hero-brand .public-eyebrow::after{
  display: none;
}

.ph2-hero-brand .public-eyebrow::before{
  width: 1.25rem;
  margin-right: .5rem;
}

.ph2-hero-ring-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.ph2-hero-ring-wrap img{
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(141,195,55,.35));
}

.ph2-hero-ring{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-box: fill-box;
  transform-origin: center;
  animation: ph2-ring-spin 7s linear infinite;
}

.ph2-hero-ring circle{
  fill: none;
  stroke: url(#ph2-grad-b);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 26 74;
  opacity: .85;
}

@keyframes ph2-ring-spin{
  to{ transform: rotate(360deg); }
}

/* ── Hero: headline word reveal + scroll drift ───────────────── */
.ph2-hline{
  will-change: transform, opacity;
  transform-origin: left center;
}

.ph2-hw{
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .09em;
  margin-bottom: -.09em;
}

.ph2-hw > span{
  display: inline-block;
  transform: translateY(112%);
  animation: ph2-word-rise .72s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(var(--hw-i, 0) * 95ms + 140ms);
}

@keyframes ph2-word-rise{
  to{ transform: translateY(0); }
}

/* ── Energy marquee ──────────────────────────────────────────── */
.ph2-marquee{
  position: relative;
  overflow: hidden;
  padding: 1.6rem 0 .9rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ph2-marquee-track{
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: ph2-marquee 30s linear infinite;
}

.ph2-marquee-track span{
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -.03em;
  line-height: 1.1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(86,127,0,.28);
  white-space: nowrap;
}

.ph2-marquee-track i{
  font-style: normal;
  font-size: .8rem;
  background: linear-gradient(120deg, #8dc337, #94ce38);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes ph2-marquee{
  to{ transform: translateX(-50%); }
}

/* ── Scroll story ────────────────────────────────────────────── */
.ph2-story{
  --ph2-accent: #8dc337;
  position: relative;
}

.ph2-story::before{
  content: "";
  position: absolute;
  top: 12%;
  left: -8%;
  width: 46%;
  height: 38%;
  border-radius: 50%;
  background-color: var(--ph2-accent);
  filter: blur(130px);
  opacity: .14;
  pointer-events: none;
  transition: background-color .9s ease;
}

.ph2-story[data-active-scene="lift"]{  --ph2-accent: #8dc337; }
.ph2-story[data-active-scene="yoga"]{  --ph2-accent: #94ce38; }
.ph2-story[data-active-scene="run"]{   --ph2-accent: #659306; }
.ph2-story[data-active-scene="fuel"]{  --ph2-accent: #34d399; }
.ph2-story[data-active-scene="coach"]{ --ph2-accent: #5f8c01; }

.ph2-story-head{
  text-align: center;
}

.ph2-story-layout{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  margin-top: 2.4rem;
}

.ph2-story-visual{
  position: sticky;
  top: 96px;
  align-self: start;
  height: min(calc(100vh - 140px), 600px);
}

.ph2-scene{
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px) scale(.985);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
  border-radius: 26px;
  overflow: hidden;
}

.ph2-scene.is-active{
  opacity: 1;
  transform: none;
}

/* Cool desaturated treatment for home marketing photos: near-greyscale
   with a navy-cyan hue matching the brand accents. Reused across scene,
   panel, and CTA images. */
:root{
  --ph2-img-warm: grayscale(1) sepia(.42) saturate(2.1) hue-rotate(165deg) brightness(.9) contrast(1.05);
}

.ph2-scene-photo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 30px 70px -30px rgba(22,25,22,.45);
}

/* Slow cinematic drift on the active scene */
.ph2-scene.is-active .ph2-scene-photo{
  animation: ph2-scene-drift 16s ease-out forwards;
}

@keyframes ph2-scene-drift{
  from{ transform: scale(1); }
  to{ transform: scale(1.055); }
}

@media (prefers-reduced-motion: reduce){
  .ph2-scene.is-active .ph2-scene-photo{ animation: none; }
}

.ph2-scene-shot{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  padding: 1.4rem;
  background:
    radial-gradient(80% 90% at 30% 10%, rgba(52,211,153,.16), transparent 70%),
    linear-gradient(160deg, #161916, #272a27);
  box-shadow: 0 30px 70px -30px rgba(22,25,22,.45);
  overflow: hidden;
}

.ph2-scene-shot img{
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(6,8,6,.5);
}

.ph2-scene-art{
  position: absolute;
  left: -1.2rem;
  bottom: -1.2rem;
  width: 52%;
  height: auto;
  padding: .8rem;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(159,163,160,.25);
  box-shadow: 0 18px 44px -18px rgba(22,25,22,.35);
}

/* Scene art strokes + fills */
.ph2-line{
  fill: none;
  stroke: url(#ph2-grad-a);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph2-line-thin{ stroke-width: 8; }

.ph2-line-faint{
  stroke: rgba(112,116,113,.35);
  stroke-width: 6;
}

.ph2-line-mat{
  stroke: url(#ph2-grad-b);
  stroke-width: 9;
  opacity: .8;
}

.ph2-fill-a{ fill: url(#ph2-grad-a); }
.ph2-fill-b{ fill: url(#ph2-grad-b); }

.ph2-fill-soft{
  fill: url(#ph2-grad-a);
  opacity: .35;
}

.ph2-arc{
  fill: none;
  stroke: rgba(101,147,6,.55);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 4 14;
}

.ph2-ring{
  fill: none;
  stroke: rgba(148,206,56,.5);
  stroke-width: 4;
  stroke-dasharray: 5 12;
  transform-box: fill-box;
  transform-origin: center;
}

.ph2-speed{
  fill: none;
  stroke: rgba(139,92,246,.6);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 22 16;
}

.ph2-leaf{
  fill: #94ce38;
  opacity: .85;
}

.ph2-macro{
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}

.ph2-macro-1{ stroke: #8dc337; stroke-dasharray: 30 70; stroke-dashoffset: 0; }
.ph2-macro-2{ stroke: #94ce38; stroke-dasharray: 24 76; stroke-dashoffset: -34; }
.ph2-macro-3{ stroke: #659306; stroke-dasharray: 26 74; stroke-dashoffset: -62; }

.ph2-bubble{
  fill: none;
  stroke: url(#ph2-grad-b);
  stroke-width: 6;
}

.ph2-dot{ fill: #5f8c01; }

.ph2-tablet{
  fill: rgba(101,147,6,.15);
  stroke: #659306;
  stroke-width: 6;
}

/* Scene art motion */
.ph2-anim-bob{
  transform-box: fill-box;
  transform-origin: center;
  animation: ph2-bob 3.2s ease-in-out infinite;
}

@keyframes ph2-bob{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-7px); }
}

.ph2-anim-arc{ animation: ph2-fade-pulse 3.2s ease-in-out infinite; }
.ph2-anim-arc-2{ animation-delay: .4s; }

@keyframes ph2-fade-pulse{
  0%, 100%{ opacity: .25; }
  50%{ opacity: .9; }
}

.ph2-anim-breathe{
  animation: ph2-breathe 4.5s ease-in-out infinite;
}

@keyframes ph2-breathe{
  0%, 100%{ transform: scale(1); opacity: .45; }
  50%{ transform: scale(1.1); opacity: .85; }
}

.ph2-anim-speed{ animation: ph2-speed-dash 1.1s linear infinite; }
.ph2-anim-speed-2{ animation-duration: 1.4s; }
.ph2-anim-speed-3{ animation-duration: .9s; }

@keyframes ph2-speed-dash{
  to{ stroke-dashoffset: -38; }
}

.ph2-anim-spin{ animation: ph2-slow-spin 26s linear infinite; }

@keyframes ph2-slow-spin{
  to{ transform: rotate(360deg); }
}

.ph2-anim-float{
  transform-box: fill-box;
  transform-origin: center;
  animation: ph2-bob 3.8s ease-in-out infinite;
}

.ph2-anim-dot{ animation: ph2-fade-pulse 1.6s ease-in-out infinite; }
.ph2-anim-dot-2{ animation-delay: .25s; }
.ph2-anim-dot-3{ animation-delay: .5s; }

/* Story panels */
.ph2-story-panels{
  display: grid;
  gap: 1rem;
}

.ph2-panel{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .8rem;
  min-height: 54vh;
  padding: 1.4rem 0;
  opacity: .38;
  transition: opacity .45s ease;
}

.ph2-panel.is-active{
  opacity: 1;
}

.ph2-panel h3{
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -.02em;
  color: #161916;
}

.ph2-panel p{
  margin: 0;
  max-width: 44ch;
  color: #525552;
  font-size: 1.08rem;
  line-height: 1.7;
}

.ph2-ticks{
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.ph2-ticks li{
  position: relative;
  padding-left: 2rem;
  color: #3e413e;
  font-size: 1rem;
  font-weight: 500;
}

.ph2-ticks li::before{
  content: "\2713";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--color-on-brand);
  background: var(--color-brand);
}

.ph2-panel-media{
  display: none;
}

/* ── App showcase ────────────────────────────────────────────── */
.ph2-app{
  text-align: center;
}

.ph2-browser{
  background: #fff;
  border: 1px solid rgba(159,163,160,.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(22,25,22,.3);
}

.ph2-browser img{
  display: block;
  width: 100%;
  height: auto;
}

.ph2-browser-bar{
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem .9rem;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(159,163,160,.25);
}

.ph2-browser-bar i{
  width: .65rem;
  height: .65rem;
  border-radius: 999px;
  background: rgba(112,116,113,.35);
}

.ph2-browser-bar i:nth-child(1){ background: #fda4af; }
.ph2-browser-bar i:nth-child(2){ background: #fcd34d; }
.ph2-browser-bar i:nth-child(3){ background: #6ee7b7; }

.ph2-browser-bar span{
  flex: 1;
  max-width: 280px;
  margin: 0 auto;
  padding: .15rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(159,163,160,.25);
  color: #707471;
  font-size: .78rem;
}

.ph2-browser-main{
  max-width: 1020px;
  margin: 2.2rem auto 0;
}

.ph2-shots{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin-top: 1.8rem;
}

.ph2-shot{
  margin: 0;
}

.ph2-shot figcaption{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .6rem;
  margin-top: .8rem;
}

.ph2-shot figcaption strong{
  color: #161916;
  font-size: 1.02rem;
}

.ph2-shot figcaption span{
  color: #707471;
  font-size: .92rem;
}

/* ── Photo CTA banner ────────────────────────────────────────── */
.ph2-cta{
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  margin: 2.5rem 0 2rem;
  padding: 4.5rem 1.5rem;
  color: #fff;
  isolation: isolate;
}

.ph2-cta-photo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: var(--ph2-img-warm) brightness(.38);
}

/* CTA art that is already graded to the brand palette: no filter, keep
   the generated colour; anchor the crop so the athlete stays in frame. */
.ph2-cta-photo.ph2-cta-photo-toned{
  filter: none;
  object-position: 72% center;
}

.ph2-cta-inner{
  position: relative;
}

.ph2-cta h2{
  color: #fff;
}

.ph2-cta .public-sub{
  color: rgba(255,255,255,.82);
}

.ph2-cta .public-eyebrow{
  color: #a0dd3e;
}

/* ── Scroll reveal ───────────────────────────────────────────── */
/* Stagger only the fade — items in the same row rise together so grid
   rows and their titles never sit at different heights mid-reveal. */
[data-reveal]{
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .65s cubic-bezier(.22, 1, .36, 1) calc(var(--reveal-i, 0) * 80ms),
    transform .65s cubic-bezier(.22, 1, .36, 1);
}

[data-reveal].is-inview{
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 980px){
  .ph2-story-layout{
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .ph2-story-visual{
    display: none;
  }

  .ph2-story-panels{
    gap: 2.6rem;
  }

  .ph2-panel{
    min-height: 0;
    padding: 0;
    opacity: 1;
  }

  .ph2-panel-media{
    display: block;
    position: relative;
    width: 100%;
    margin-bottom: .4rem;
  }

  .ph2-panel-media > img{
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 48px -22px rgba(22,25,22,.4);
  }

  .ph2-panel-media-shot > img{
    object-fit: cover;
    object-position: top left;
    background: #161916;
  }

  .ph2-panel-art{
    position: absolute;
    right: .7rem;
    bottom: -1rem;
    width: 38%;
    max-width: 170px;
    height: auto;
    padding: .5rem;
    border-radius: 16px;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(159,163,160,.25);
    box-shadow: 0 14px 32px -14px rgba(22,25,22,.35);
  }
}

@media (max-width: 720px){
  .ph2-hero-brand{
    justify-content: flex-start;
  }

  .ph2-hero-ring-wrap{
    width: 52px;
    height: 52px;
  }

  .ph2-hero-ring-wrap img,
  .ph2-runner{
    width: 46px;
    height: 46px;
  }

  .ph2-marquee{
    padding: 1.1rem 0 .5rem;
  }

  .ph2-shots{
    display: flex;
    gap: 1rem;
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    padding: 0 1.4rem .6rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .ph2-shots .ph2-shot{
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  .ph2-cta{
    border-radius: 22px;
    padding: 3.2rem 1.2rem;
  }
}

/* Light-theme harmonisation for hero brand eyebrow rule */
html[data-theme="light"] .ph2-marquee-track span{
  -webkit-text-stroke-color: rgba(86,127,0,.3);
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce){
  .ph2-hero-ring,
  .ph2-marquee-track,
  .ph2-anim-bob,
  .ph2-anim-arc,
  .ph2-anim-arc-2,
  .ph2-anim-breathe,
  .ph2-anim-speed,
  .ph2-anim-speed-2,
  .ph2-anim-speed-3,
  .ph2-anim-spin,
  .ph2-anim-float,
  .ph2-anim-dot,
  .ph2-anim-dot-2,
  .ph2-anim-dot-3{
    animation: none !important;
  }

  .ph2-scene{
    transition: opacity .3s ease;
  }

  .ph2-panel{
    transition: none;
  }
}

/* ── ph2 headline sizing fixes ───────────────────────────────── */
.public-hero h1.ph2-headline{
  max-width: none;
  font-size: clamp(2.05rem, 4.35vw, 3.95rem);
  line-height: 1.06;
}

.ph2-hline{
  display: block;
  white-space: nowrap;
}

.ph2-hero-brand .public-eyebrow{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph2-marquee-track span{
  -webkit-text-stroke-width: 1.6px;
}

html[data-theme="light"] .ph2-marquee-track span{
  -webkit-text-stroke-color: rgba(86,127,0,.38);
}

@media (max-width: 720px){
  .public-hero h1.ph2-headline{
    font-size: clamp(1.55rem, 8.6vw, 2.4rem);
  }
}

/* ── ph2 CTA banner: keep copy white over the photo (light theme) ── */
html[data-theme="light"] body.public-site .ph2-cta h2{
  color: #ffffff !important;
}

html[data-theme="light"] body.public-site .ph2-cta .public-sub{
  color: rgba(255,255,255,.86) !important;
}

html[data-theme="light"] body.public-site .ph2-cta .public-eyebrow{
  color: #a0dd3e !important;
}

html[data-theme="light"] body.public-site .ph2-cta .public-eyebrow::before,
html[data-theme="light"] body.public-site .ph2-cta .public-eyebrow::after{
  background: linear-gradient(90deg, rgba(160,221,62,.7), rgba(134,239,172,.6)) !important;
}

.ph2-cta .public-gradient-text{
  --gradient-colors: #b9fd52, #a0dd3e, #a7e73e, #86efac, #b9fd52;
}

/* ================================================================
   Public pages v2: background mesh, accents, features + pricing
   ================================================================ */

/* Richer light background: sky / violet / teal aurora mesh */
html[data-theme="light"] body.public-site{
  background:
    radial-gradient(950px 520px at 12% -8%, rgba(141,195,55,.17), transparent 60%),
    radial-gradient(820px 480px at 88% -4%, rgba(101,147,6,.13), transparent 62%),
    radial-gradient(720px 460px at 50% 14%, rgba(148,206,56,.11), transparent 64%),
    radial-gradient(900px 600px at 50% 100%, rgba(141,195,55,.08), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 48%, #f5f9f6 100%) !important;
  background-color: #ffffff !important;
}

/* Brand hairline across the top of the sticky header */
.public-header::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8dc337, #659306 38%, #94ce38 72%, #8dc337);
  background-size: 220% 100%;
  animation: public-gradient-shift 9s ease-in-out infinite;
  pointer-events: none;
}

/* Page hero (features / pricing) */
.ph2-page-hero{
  padding-top: 2.6rem;
}

.ph2-page-headline{
  max-width: 22ch;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem) !important;
  letter-spacing: -.03em;
  line-height: 1.08;
}

/* Photo band (features) */
.ph2-photo-band{
  max-width: 1180px;
  margin: 1.6rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.ph2-photo-tile{
  position: relative;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 24px 54px -26px rgba(22,25,22,.42);
}

.ph2-photo-tile > img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.ph2-photo-tile:hover > img{
  transform: scale(1.045);
}

.ph2-photo-tile::after{
  content: "";
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(180deg, transparent, rgba(6,8,6,.62));
  pointer-events: none;
}

.ph2-photo-tile figcaption{
  position: absolute;
  left: 1.1rem;
  bottom: .95rem;
  z-index: 1;
  color: #fff;
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.01em;
}

.ph2-photo-tile-art{
  position: absolute;
  top: .8rem;
  right: .8rem;
  width: 38%;
  height: auto;
  padding: .45rem;
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(159,163,160,.25);
  box-shadow: 0 12px 28px -12px rgba(22,25,22,.35);
}

/* Pricing card accents */
.ph2-price-card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8dc337, #94ce38);
  opacity: .65;
  pointer-events: none;
}

.ph2-price-card.featured::before{
  height: 4px;
  background: linear-gradient(90deg, #659306, #8dc337, #94ce38);
  opacity: 1;
}

body.public-site .ph2-price-card:hover{
  border-color: rgba(141,195,55,.55);
}

.ph2-price-card.featured .public-price{
  background: linear-gradient(120deg, #7bac2c, #659306);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ph2-price-card.featured .public-price small{
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #707471;
  -webkit-text-fill-color: #707471;
}

/* Responsive: photo band */
@media (max-width: 980px){
  .ph2-photo-band{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1.4rem;
  }
}

@media (max-width: 720px){
  .ph2-photo-band{
    padding: 0 1.4rem .2rem;
  }

  .ph2-photo-band .ph2-photo-tile{
    aspect-ratio: 16 / 11;
  }

  .ph2-page-headline{
    font-size: clamp(1.7rem, 7.6vw, 2.3rem) !important;
  }
}

@media (prefers-reduced-motion: reduce){
  .public-header::before{
    animation: none;
  }

  .ph2-photo-tile > img{
    transition: none;
  }
}

/* ================================================================
   ph2-dark: editorial dark theme for public home / features / pricing
   (body.ph2-dark set per page; overrides the light public theme)
   ================================================================ */

html[data-theme="light"] body.public-site.ph2-dark{
  background: #242725 !important;
  background-color: #242725 !important;
  color: #e9ede9 !important;
}

/* Flatten the public dark pages to the same plain surface as the app dashboard
   (html[data-theme="dark"] body.app, #1b263b): drop the grid + plasma atmosphere. */
html[data-theme="light"] body.public-site.ph2-dark .public-ambient,
html[data-theme="light"] body.public-site.ph2-dark .public-ambient-grid,
html[data-theme="light"] body.public-site.ph2-dark .public-plasma-canvas,
html[data-theme="light"] body.public-site.ph2-dark .public-plasma-layer{
  display: none !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-ambient-grid{
  background-image:
    linear-gradient(rgba(159,163,160,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,163,160,.07) 1px, transparent 1px) !important;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 86%) !important;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 86%) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-header{
  background: rgba(8,10,8,.78) !important;
  border-bottom: 1px solid rgba(159,163,160,.14) !important;
  box-shadow: 0 12px 40px rgba(6,8,6,.3) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-brand span{
  color: #a6e541 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-nav-center a,
html[data-theme="light"] body.public-site.ph2-dark .public-nav-right a{
  color: #b4b7b4 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-nav-center a:hover,
html[data-theme="light"] body.public-site.ph2-dark .public-nav-right a:hover,
html[data-theme="light"] body.public-site.ph2-dark .public-nav-center a.is-active,
html[data-theme="light"] body.public-site.ph2-dark .public-nav-right a.is-active{
  color: #f8fbff !important;
  background: rgba(22,25,22,.6) !important;
}

html[data-theme="light"] body.public-site.ph2-dark h1,
html[data-theme="light"] body.public-site.ph2-dark h2,
html[data-theme="light"] body.public-site.ph2-dark h3{
  color: #f1f4f1;
}

html[data-theme="light"] body.public-site.ph2-dark .public-sub{
  color: #a2a6a3 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-hero p{
  color: #b4b7b4 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-eyebrow{
  color: #a6e541 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-proof-strip span{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(159,163,160,.16) !important;
  color: #d6dad7 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-card{
  background: rgba(20,23,21,.66) !important;
  border-color: rgba(159,163,160,.16) !important;
  color: #e2e6e2 !important;
  box-shadow: 0 18px 44px rgba(6,8,6,.35) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-card h3{ color: #f3f7f3 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-card p{ color: #b4b7b4 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-card ul li{ color: #c4c7c4 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-card a{ color: #a0dd3e !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-card strong{ color: #f3f7f3 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-card span{ color: #a2a6a3; }

html[data-theme="light"] body.public-site.ph2-dark .public-price-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)),
    rgba(14,17,14,.8) !important;
  border-color: rgba(159,163,160,.16) !important;
  color: #e2e6e2 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-price-card h3{ color: #ffffff !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price-card p{ color: #b4b7b4 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price-card ul li{ color: #c4c7c4 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price{ color: #ffffff !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price small{ color: #a2a6a3 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price-kicker{ color: #a6e541 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-price-note{ color: #9b9f9c !important; }

html[data-theme="light"] body.public-site.ph2-dark .public-price-card.featured{
  border-color: rgba(160,221,62,.55) !important;
  box-shadow: 0 18px 50px rgba(141,195,55,.16) !important;
  background:
    linear-gradient(180deg, rgba(141,195,55,.08), rgba(101,147,6,.05)),
    rgba(14,17,14,.85) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-section-alt{
  background: transparent !important;
}

/* Homepage audience split: quiet role comparison without generic card chrome. */
body.public-site.ph2-dark .public-audience-section{
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  text-align: left;
}

body.public-site.ph2-dark .public-audience-section > :is(.public-eyebrow, h2){
  text-align: left;
}

body.public-site.ph2-dark .public-audience-section > h2{
  max-width: 14ch;
  margin-right: 0;
  margin-left: 0;
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  letter-spacing: -.02em;
  line-height: 1.02;
  text-transform: uppercase;
}

body.public-site.ph2-dark .public-audience-section > .public-sub{
  max-width: 45rem;
  min-height: 0;
  margin-left: 0;
  text-align: left;
}

body.public-site.ph2-dark .public-audience-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 62rem;
  margin: 3.25rem 0 0;
  border-top: 1px solid rgba(159,163,160,.2);
  border-bottom: 1px solid rgba(159,163,160,.2);
}

body.public-site.ph2-dark .public-audience-role{
  min-width: 0;
  margin: 0 !important;
  padding: 2.5rem 3rem 2.65rem;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

body.public-site.ph2-dark .public-audience-role + .public-audience-role{
  border-left: 1px solid rgba(159,163,160,.2);
}

body.public-site.ph2-dark .public-audience-icon{
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  margin-bottom: 1.65rem;
  color: #c4c7c4;
  stroke-width: 1.7;
}

body.public-site.ph2-dark .public-audience-label{
  margin: 0 0 .6rem;
  color: #a6e541;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

body.public-site.ph2-dark .public-audience-role h3{
  margin: 0;
  color: #f1f4f1;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.18;
}

body.public-site.ph2-dark .public-audience-copy{
  max-width: 31rem;
  margin: 1rem 0 1.5rem;
  color: #acafac;
  line-height: 1.65;
}

body.public-site.ph2-dark .public-audience-role ul{
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  color: #cdd1ce;
  list-style: none;
}

body.public-site.ph2-dark .public-audience-role li{
  position: relative;
  padding-left: 1.25rem;
}

body.public-site.ph2-dark .public-audience-role li::before{
  content: "";
  position: absolute;
  top: .72em;
  left: 0;
  width: .35rem;
  height: 1px;
  background: #a0dd3e;
}

body.public-site.ph2-dark .public-audience-role > a{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2rem;
  color: #f1f4f1;
  font-weight: 700;
  text-decoration: none;
}

body.public-site.ph2-dark .public-audience-role > a svg{
  width: 1rem;
  height: 1rem;
  transition: transform .2s ease;
}

body.public-site.ph2-dark .public-audience-role > a:hover svg,
body.public-site.ph2-dark .public-audience-role > a:focus-visible svg{
  transform: translateX(3px);
}

@media (max-width: 720px){
  body.public-site.ph2-dark .public-audience-section{
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  body.public-site.ph2-dark .public-audience-section > h2{
    font-size: clamp(2.2rem, 11vw, 3.25rem);
  }

  body.public-site.ph2-dark .public-audience-grid{
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
  }

  body.public-site.ph2-dark .public-audience-role{
    padding: 2rem .25rem 2.25rem;
  }

  body.public-site.ph2-dark .public-audience-role + .public-audience-role{
    border-top: 1px solid rgba(159,163,160,.2);
    border-left: 0;
  }
}

html[data-theme="light"] body.public-site.ph2-dark .public-stat-grid strong{ color: #ffffff !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-stat-grid span{ color: #a2a6a3 !important; }

/* Footer stays on the dark editorial surface even under the light theme,
   so public pages read as one continuous system. */
html[data-theme="light"] body.public-site.ph2-dark .public-footer{
  margin-top: 0;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  background: rgba(10,12,10,.55);
  border-top: 1px solid rgba(159,163,160,.18);
}
html[data-theme="light"] body.public-site.ph2-dark .public-footer h4{ color: #f1f4f1 !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-footer a{ color: #9c9f9c !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-footer a:hover{ color: #f8fbff !important; }
html[data-theme="light"] body.public-site.ph2-dark .public-copy{ color: #707471 !important; }

html[data-theme="light"] body.public-site.ph2-dark .ph2-panel h3{ color: #f3f7f3; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-panel p{ color: #b4b7b4; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-ticks li{ color: #cdd1ce; }

html[data-theme="light"] body.public-site.ph2-dark .ph2-marquee-track span{
  -webkit-text-stroke-color: rgba(199,203,199,.34) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .ph2-story::before{ opacity: .22; }

html[data-theme="light"] body.public-site.ph2-dark .ph2-shot figcaption strong{ color: #f3f7f3; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-shot figcaption span{ color: #a2a6a3; }

/* ── Editorial mega headings (steel gradient, uppercase) ───────── */
.ph2-mega{
  font-family: var(--font-public-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.02;
  font-size: clamp(2.2rem, 6vw, 4.6rem) !important;
  background: none;
  -webkit-text-fill-color: #f1f4f1;
  color: #f1f4f1 !important;
}

body.ph2-dark .public-hero h1.ph2-headline{
  text-transform: uppercase;
  font-size: clamp(1.85rem, 3.9vw, 3.55rem);
  letter-spacing: -.015em;
}

/* ── Story panels: centred copy with side padding ──────────────── */
.ph2-panel{
  align-items: center;
  text-align: center;
  padding: 1.4rem 2.4rem;
}

.ph2-panel .public-chip{
  margin-inline: auto;
}

.ph2-ticks{
  text-align: left;
}

/* ── Pill buttons (gradient primary + ghost secondary) ─────────── */
body.ph2-dark .btn{
  border-radius: 999px !important;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 600;
}

body.ph2-dark .btn-info{
  background: var(--color-brand) !important;
  color: var(--color-on-brand) !important;
  border: 0 !important;
  box-shadow:
    inset 0 0 16px rgba(255,255,255,.18),
    0 12px 32px -12px rgba(86,127,0,.55) !important;
  outline: 1.5px solid rgba(237,241,237,.45);
  outline-offset: 3px;
}

body.ph2-dark .btn-info:hover{
  filter: brightness(1.1);
}

body.ph2-dark .btn-dark{
  background: transparent !important;
  border: 2px solid rgba(221,225,222,.65) !important;
  color: #e2e6e2 !important;
  box-shadow: none !important;
}

body.ph2-dark .btn-dark:hover{
  background: rgba(221,225,222,.12) !important;
}

.ph2-ghost-btn{
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: .55rem 1.4rem;
  border-radius: 999px;
  border: 2px solid rgba(221,225,222,.65);
  color: #e2e6e2;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
  text-decoration: none;
  transition: background .2s ease;
}

.ph2-ghost-btn:hover{
  background: rgba(221,225,222,.12);
}

/* ── Scroll-driven image marquee ───────────────────────────────── */
.ph2-smq{
  display: grid;
  gap: .9rem;
  overflow: hidden;
  padding: 2.8rem 0 1.2rem;
}

.ph2-smq-row{
  display: flex;
  gap: .9rem;
  width: max-content;
  transform: translateX(-33.333%);
  will-change: transform;
}

.ph2-smq-row img{
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 380px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(159,163,160,.18);
}

/* ── Sticky stacking product cards ─────────────────────────────── */
.ph2-stack{
  margin-top: 2.2rem;
}

.ph2-stack-wrap{
  height: 80vh;
}

.ph2-stack-wrap:last-child{
  height: auto;
  padding-bottom: .5rem;
}

.ph2-stack-card{
  position: sticky;
  top: calc(86px + var(--si, 0) * 22px);
  max-width: 1020px;
  margin: 0 auto;
  background: rgba(16,19,17,.92);
  border: 1.5px solid rgba(199,203,199,.28);
  border-radius: 30px;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 30px 80px -30px rgba(6,8,6,.65);
  transform-origin: top center;
  will-change: transform;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ph2-stack-head{
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: .3rem .5rem 1rem;
  text-align: left;
}

.ph2-stack-num{
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: .9;
  background: linear-gradient(180deg, #838683, #e6eae7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ph2-stack-title h3{
  margin: 0;
  color: #f3f7f3;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
}

.ph2-stack-title p{
  margin: .15rem 0 0;
  color: #a2a6a3;
  font-size: .95rem;
}

/* ── White contrast band (rounded, full-bleed) ─────────────────── */
.ph2-light-band{
  position: relative;
  z-index: 1;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 3.5rem;
  padding: 4.2rem max(1.4rem, calc(50vw - 590px)) 5.5rem;
  background: linear-gradient(180deg, #ffffff, #f0f4f1) !important;
  border-radius: 56px 56px 0 0;
}

.ph2-light-band + .ph2-cta{
  margin-top: -64px;
  z-index: 2;
}

/* Light-band heading: this band renders dark on the public site, so keep the
   heading on the base white gradient (avoids dark-on-dark). */
body:not(.ph2-dark) .ph2-light-band .ph2-mega{
  background: linear-gradient(180deg, #474a47 0%, #111412 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-sub{ color: #525552 !important; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-eyebrow{ color: #53761d !important; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band h3{ color: #161916; }

html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-card{
  background: #ffffff !important;
  border-color: rgba(159,163,160,.3) !important;
  color: #262927 !important;
  box-shadow: 0 16px 40px -20px rgba(22,25,22,.16) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-card h3{ color: #161916 !important; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-card p{ color: #525552 !important; }
html[data-theme="light"] body.public-site.ph2-dark .ph2-light-band .public-card ul li{ color: #3e413e !important; }

/* ── Numbered editorial list (features) ────────────────────────── */
.ph2-numlist{
  max-width: 980px;
  margin: 2rem auto 0;
  text-align: left;
}

.ph2-numlist article{
  display: flex;
  align-items: flex-start;
  gap: 2.2rem;
  padding: 2.4rem .4rem;
  border-top: 1px solid rgba(159,163,160,.18);
}

.ph2-numlist article:last-child{
  border-bottom: 1px solid rgba(159,163,160,.18);
}

.ph2-numlist .ph2-num{
  flex: 0 0 auto;
  min-width: 2.2ch;
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: .9;
  background: linear-gradient(180deg, #838683, #e6eae7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ph2-numlist h3{
  margin: 0 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  color: #f1f4f1;
}

.ph2-numlist p{
  margin: 0;
  max-width: 58ch;
  color: #a2a6a3;
  line-height: 1.7;
  font-size: clamp(.95rem, 1.5vw, 1.12rem);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 980px){
  .ph2-stack-wrap{
    height: auto;
    margin-bottom: 1.2rem;
  }

  .ph2-stack-card{
    position: static;
    transform: none !important;
    filter: none !important;
  }
}

@media (max-width: 720px){
  body.ph2-dark .public-hero h1.ph2-headline{
    font-size: clamp(1.3rem, 7.4vw, 2.05rem);
  }

  .ph2-mega{
    font-size: clamp(1.7rem, 8vw, 2.5rem) !important;
  }

  .ph2-panel{
    padding: .4rem 1.1rem;
  }

  .ph2-smq{
    padding: 1.8rem 0 .8rem;
  }

  .ph2-smq-row img{
    width: clamp(180px, 52vw, 260px);
  }

  .ph2-stack-head{
    flex-wrap: wrap;
    gap: .7rem;
  }

  .ph2-ghost-btn{
    display: none;
  }

  .ph2-light-band{
    border-radius: 34px 34px 0 0;
    padding-top: 3rem;
    padding-bottom: 4rem;
  }

  .ph2-light-band + .ph2-cta{
    margin-top: -48px;
  }

  .ph2-numlist article{
    gap: 1.1rem;
    padding: 1.7rem .2rem;
  }
}

@media (prefers-reduced-motion: reduce){
  .ph2-smq-row{
    transform: translateX(-33.333%) !important;
  }

  .ph2-stack-card{
    transform: none !important;
    filter: none !important;
  }
}

/* ── Neutralise the global light `article` card on ph2 components ── */
html:not([data-theme="dark"]) body.ph2-dark .ph2-panel{
  background: rgba(20,23,21,.55) !important;
  border: 1px solid rgba(159,163,160,.16) !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 44px rgba(6,8,6,.3) !important;
  padding: 2.4rem 2.6rem !important;
}

html:not([data-theme="dark"]) body.ph2-dark .ph2-stack-card{
  background: rgba(16,19,17,.94) !important;
  border: 1.5px solid rgba(199,203,199,.28) !important;
  border-radius: 30px !important;
  box-shadow: 0 30px 80px -30px rgba(6,8,6,.65) !important;
  padding: 1.1rem 1.2rem 1.3rem !important;
}

html:not([data-theme="dark"]) .ph2-numlist article{
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-top: 1px solid rgba(159,163,160,.18) !important;
  border-radius: 0 !important;
  margin-top: 0 !important;
  padding: 2.4rem .4rem !important;
}

html:not([data-theme="dark"]) .ph2-numlist article:last-child{
  border-bottom: 1px solid rgba(159,163,160,.18) !important;
}

.ph2-panel + .ph2-panel,
.ph2-stack-wrap + .ph2-stack-wrap{
  margin-top: 0 !important;
}

/* Authenticated (non-dark-band) variants stay readable in the app shell */
html[data-theme="light"] body:not(.ph2-dark) .ph2-numlist h3{ color: #161916; }
html[data-theme="light"] body:not(.ph2-dark) .ph2-numlist p{ color: #525552; }
html[data-theme="light"] body:not(.ph2-dark) .ph2-mega{
  background: linear-gradient(180deg, #474a47 0%, #111412 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (max-width: 720px){
  html:not([data-theme="dark"]) body.ph2-dark .ph2-panel{
    padding: 1.5rem 1.2rem 1.7rem !important;
  }

  html:not([data-theme="dark"]) .ph2-numlist article{
    padding: 1.7rem .2rem !important;
  }
}

.ph2-cta .ph2-mega{
  background: linear-gradient(180deg, #d1d5d1 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Pill buttons: out-rank the light-theme public button overrides */
html[data-theme="light"] body.public-site.ph2-dark .btn{
  border-radius: 999px !important;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 600;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info{
  background: var(--color-brand) !important;
  color: var(--color-on-brand) !important;
  border: 0 !important;
  box-shadow:
    inset 0 0 16px rgba(255,255,255,.18),
    0 12px 32px -12px rgba(110,160,3,.55) !important;
  outline: 1.5px solid rgba(237,241,237,.45);
  outline-offset: 3px;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info:hover{
  filter: brightness(1.1);
}

html[data-theme="light"] body.public-site.ph2-dark .btn-dark{
  background: transparent !important;
  border: 2px solid rgba(221,225,222,.65) !important;
  color: #e2e6e2 !important;
  box-shadow: none !important;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-dark:hover{
  background: rgba(221,225,222,.12) !important;
}

/* Pill buttons via the ui-btn variable system (wins over !important props) */
html[data-theme="light"] body.public-site.ph2-dark .btn{
  --ui-btn-radius: 999px;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info{
  --ui-btn-bg: #6ea003;
  --ui-btn-border: transparent;
  --ui-btn-fg: #ffffff;
  --ui-btn-hover-bg: #618e04;
  --ui-btn-hover-border: transparent;
  --ui-btn-active-bg: var(--ui-btn-hover-bg);
  --ui-btn-active-border: transparent;
  --ui-btn-shadow: inset 0 0 16px rgba(255,255,255,.18), 0 12px 32px -12px rgba(110,160,3,.55);
}

html[data-theme="light"] body.public-site.ph2-dark .btn-dark{
  --ui-btn-bg: transparent;
  --ui-btn-border: rgba(221,225,222,.6);
  --ui-btn-fg: #e2e6e2;
  --ui-btn-hover-bg: rgba(221,225,222,.12);
  --ui-btn-hover-border: rgba(221,225,222,.85);
  --ui-btn-active-bg: rgba(221,225,222,.16);
  --ui-btn-active-border: rgba(221,225,222,.85);
  --ui-btn-shadow: none;
}

/* Primary pill: gradient via ::before (the shared button system forces
   background-image:none on the element itself, but not on pseudos) */
html[data-theme="light"] body.public-site.ph2-dark .btn-info{
  --ui-btn-bg: #6ea003;
  --ui-btn-hover-bg: #6ea003;
  --ui-btn-active-bg: #6ea003;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #6ea003;
  box-shadow: inset 0 0 16px rgba(255,255,255,.18);
  transition: filter .2s ease;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info:hover::before{
  filter: brightness(1.12);
}

/* ── App screen deck (auto-advance carousel with manual control) ── */
.ph2-deck{
  max-width: 1020px;
  margin: 3.2rem auto 0;
}

.ph2-deck-stage{
  position: relative;
  height: clamp(420px, 44vw, 600px);
}

.ph2-deck-card{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  padding: 1rem 1.1rem 1.2rem;
  transition:
    transform .6s cubic-bezier(.22, 1, .36, 1),
    opacity .45s ease,
    filter .45s ease;
  will-change: transform, opacity;
}

html:not([data-theme="dark"]) body.ph2-dark .ph2-deck-card{
  background: linear-gradient(180deg, rgba(26,29,27,.97), rgba(13,16,14,.97)) !important;
  border: 1.5px solid rgba(199,203,199,.26) !important;
  border-radius: 26px !important;
  box-shadow: 0 36px 90px -34px rgba(6,8,6,.78) !important;
  padding: 1rem 1.1rem 1.2rem !important;
  margin: 0 !important;
}

.ph2-deck-card[data-pos="0"]{ transform: none; opacity: 1; z-index: 5; }
.ph2-deck-card[data-pos="1"]{ transform: translateY(-22px) scale(.955); opacity: .55; z-index: 4; pointer-events: none; filter: brightness(.7); }
.ph2-deck-card[data-pos="2"]{ transform: translateY(-42px) scale(.912); opacity: .26; z-index: 3; pointer-events: none; filter: brightness(.55); }
.ph2-deck-card[data-pos="back"]{ transform: translateY(-54px) scale(.88); opacity: 0; z-index: 1; pointer-events: none; }

.ph2-deck-head{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .2rem .4rem .9rem;
  text-align: left;
}

.ph2-deck-num{
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: .9;
  background: linear-gradient(180deg, #838683, #e6eae7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ph2-deck-title h3{
  margin: 0;
  color: #f3f7f3;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: clamp(1rem, 1.9vw, 1.4rem);
}

.ph2-deck-title p{
  margin: .12rem 0 0;
  color: #a2a6a3;
  font-size: .92rem;
}

.ph2-deck-count{
  margin-left: auto;
  color: #707471;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .12em;
}

.ph2-deck-browser{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ph2-deck-browser img{
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top left;
}

.ph2-deck-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.ph2-deck-arrow{
  --ui-btn-bg: rgba(20,23,21,.65);
  --ui-btn-border: rgba(221,225,222,.4);
  --ui-btn-fg: #e2e6e2;
  --ui-btn-radius: 999px;
  --ui-btn-hover-bg: rgba(141,195,55,.18);
  --ui-btn-hover-border: rgba(160,221,62,.7);
  width: 46px;
  height: 46px;
  min-height: 0 !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ph2-deck-arrow svg{
  width: 21px;
  height: 21px;
}

.ph2-deck-dots{
  display: flex;
  align-items: center;
  gap: .55rem;
}

.ph2-deck-dot{
  --ui-btn-bg: rgba(159,163,160,.35);
  --ui-btn-border: transparent;
  --ui-btn-hover-bg: rgba(159,163,160,.6);
  --ui-btn-hover-border: transparent;
  --ui-btn-radius: 999px;
  width: 9px;
  height: 9px;
  min-height: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: width .25s ease;
}

.ph2-deck-dot.is-active{
  --ui-btn-bg: #8dc337;
  --ui-btn-hover-bg: #8dc337;
  width: 24px;
}

/* ── Kill the light grey alt-section band on dark pages ─────────── */
html[data-theme="light"] body.public-site.ph2-dark .public-section-alt::before{
  display: none !important;
}

/* ── Dark auth (sign-up) page ────────────────────────────────────── */
html[data-theme="light"] body.public-site.ph2-dark .public-auth-shell h1{
  color: #f1f4f1;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-shell > p,
html[data-theme="light"] body.public-site.ph2-dark .public-auth-help{
  color: #a2a6a3 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-help a{
  color: #a0dd3e;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-trust-note{
  color: #a6e541;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-card{
  background: linear-gradient(170deg, rgba(22,25,22,.78), rgba(6,8,6,.9)) !important;
  border-color: rgba(159,163,160,.2) !important;
  box-shadow: 0 30px 80px rgba(6,8,6,.45) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-card label,
html[data-theme="light"] body.public-site.ph2-dark .public-auth-card legend{
  color: #f1f5f9 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-card input[type="email"],
html[data-theme="light"] body.public-site.ph2-dark .public-auth-card input[type="password"],
html[data-theme="light"] body.public-site.ph2-dark .public-auth-card input[type="text"]{
  background: rgba(12,15,13,.72) !important;
  border-color: rgba(159,163,160,.28) !important;
  color: #f1f4f1 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-auth-card input::placeholder{
  color: #707471 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-terms-row span{
  color: #c4c7c4;
}

html[data-theme="light"] body.public-site.ph2-dark .public-terms-row a{
  color: #a0dd3e;
}

/* ── Deck responsive ─────────────────────────────────────────────── */
@media (max-width: 720px){
  .ph2-deck-stage{
    height: clamp(300px, 88vw, 380px);
  }

  .ph2-deck-card{
    border-radius: 20px;
    padding: .8rem .8rem .9rem;
  }

  html:not([data-theme="dark"]) body.ph2-dark .ph2-deck-card{
    border-radius: 20px !important;
    padding: .8rem .8rem .9rem !important;
  }

  .ph2-deck-count{
    display: none;
  }

  .ph2-deck-card[data-pos="1"]{ transform: translateY(-14px) scale(.96); }
  .ph2-deck-card[data-pos="2"]{ transform: translateY(-26px) scale(.92); }
  .ph2-deck-card[data-pos="back"]{ transform: translateY(-34px) scale(.9); }
}

@media (prefers-reduced-motion: reduce){
  .ph2-deck-card{
    transition: opacity .3s ease;
  }
}

/* ── Deck v2: directional fly animations + ambient polish ───────── */
.ph2-deck-stage::before{
  content: "";
  position: absolute;
  inset: 8% -4% -6%;
  border-radius: 50%;
  background:
    radial-gradient(55% 60% at 30% 60%, rgba(141,195,55,.18), transparent 70%),
    radial-gradient(50% 55% at 72% 45%, rgba(101,147,6,.14), transparent 72%);
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
  animation: ph2-glow-drift 11s ease-in-out infinite alternate;
}

@keyframes ph2-glow-drift{
  from{ transform: translateX(-2.5%) scale(1); opacity: .85; }
  to{ transform: translateX(2.5%) scale(1.06); opacity: 1; }
}

.ph2-deck-card.is-leaving{
  animation: ph2-deck-out .68s cubic-bezier(.45, 0, .55, 1) both;
  z-index: 6;
}

@keyframes ph2-deck-out{
  0%{ transform: none; opacity: 1; filter: none; }
  55%{ transform: translate(-44%, 9%) rotate(-8deg) scale(.97); opacity: 0; }
  56%{ transform: translateY(-54px) scale(.88); opacity: 0; }
  100%{ transform: translateY(-54px) scale(.88); opacity: 0; }
}

.ph2-deck-card.is-entering{
  animation: ph2-deck-in .68s cubic-bezier(.22, 1, .36, 1) both;
  z-index: 6;
}

@keyframes ph2-deck-in{
  0%{ transform: translate(-44%, 9%) rotate(-8deg) scale(.97); opacity: 0; }
  35%{ opacity: 1; }
  72%{ transform: translate(1.2%, -.6%) rotate(.8deg); }
  100%{ transform: none; opacity: 1; }
}

/* Gentle idle float on the front screenshot */
.ph2-deck-card[data-pos="0"] .ph2-deck-browser{
  animation: ph2-idle-float 6.5s ease-in-out infinite;
}

@keyframes ph2-idle-float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-5px); }
}

/* Accent hairline on the active card */
.ph2-deck-card::after{
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(160,221,62,.85), rgba(101,147,6,.6), transparent);
  opacity: 0;
  transition: opacity .5s ease;
}

.ph2-deck-card[data-pos="0"]::after{
  opacity: 1;
}

.ph2-deck-arrow{
  transition: transform .2s ease;
}

.ph2-deck-arrow:hover{
  transform: translateY(-2px);
}

.ph2-deck-arrow:active{
  transform: translateY(0) scale(.96);
}

/* ── Page polish: slow ken-burns on CTA photo, floating scene art ── */
.ph2-cta-photo{
  animation: ph2-kenburns 22s ease-in-out infinite alternate;
}

@keyframes ph2-kenburns{
  from{ transform: scale(1); }
  to{ transform: scale(1.09) translateY(-1.5%); }
}

.ph2-scene-art{
  animation: ph2-idle-float 7.5s ease-in-out infinite;
}

.ph2-photo-tile-art{
  animation: ph2-idle-float 8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce){
  .ph2-deck-stage::before,
  .ph2-deck-card.is-leaving,
  .ph2-deck-card.is-entering,
  .ph2-deck-card[data-pos="0"] .ph2-deck-browser,
  .ph2-cta-photo,
  .ph2-scene-art,
  .ph2-photo-tile-art{
    animation: none !important;
  }
}

/* ── Running-track scroll backdrop (injected on ph2-dark pages) ── */
.ph2-track{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, rgba(0,0,0,.35) 38%, rgba(0,0,0,.85) 78%, rgba(0,0,0,.95) 100%);
  mask-image: linear-gradient(180deg, transparent 4%, rgba(0,0,0,.35) 38%, rgba(0,0,0,.85) 78%, rgba(0,0,0,.95) 100%);
}

/* parallax layer (translated by JS as the page scrolls) */
.ph2-track-move{
  position: absolute;
  inset: 0;
  will-change: transform;
}

.ph2-track-plane{
  position: absolute;
  left: -45%;
  right: -45%;
  top: 22%;
  height: 230%;
  transform-origin: 50% 0;
  transform: perspective(1100px) rotateX(60deg);
  background:
    /* receding lane lines only — no horizontal/cross markings */
    repeating-linear-gradient(90deg,
      rgba(229,233,229,.075) 0 2px,
      transparent 2px 230px),
    /* soft clay tint */
    linear-gradient(180deg, rgba(196,84,64,.05), rgba(196,84,64,.026) 60%, rgba(196,84,64,.046));
}

@media (max-width: 720px){
  .ph2-track-plane{
    background:
      repeating-linear-gradient(90deg,
        rgba(229,233,229,.06) 0 2px,
        transparent 2px 140px),
      linear-gradient(180deg, rgba(196,84,64,.045), rgba(196,84,64,.024) 60%, rgba(196,84,64,.042));
  }
}

/* ── Remove the criss-cross grid on dark pages (track replaces it) ── */
html[data-theme="light"] body.public-site.ph2-dark .public-ambient-grid{
  display: none !important;
}

/* ── Dark legal / contact pages ─────────────────────────────────── */
html[data-theme="light"] body.public-site.ph2-dark .public-legal-card{
  background: linear-gradient(170deg, rgba(22,25,22,.78), rgba(6,8,6,.92)) !important;
  border-color: rgba(159,163,160,.22) !important;
  box-shadow: 0 26px 66px rgba(6,8,6,.45) !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-legal-content,
html[data-theme="light"] body.public-site.ph2-dark .public-legal-content p,
html[data-theme="light"] body.public-site.ph2-dark .public-legal-content li{
  color: #acafac !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-legal-content h2,
html[data-theme="light"] body.public-site.ph2-dark .public-legal-content h3,
html[data-theme="light"] body.public-site.ph2-dark .public-legal-content strong{
  color: #f1f4f1 !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-legal-content a{
  color: #a0dd3e !important;
}

html[data-theme="light"] body.public-site.ph2-dark .public-legal-hero h1,
html[data-theme="light"] body.public-site.ph2-dark .public-legal-head h1{
  color: #f1f4f1;
}

/* ── Scene/feature art now uses Lucide icon chips (pro look) ────── */
.ph2-scene-art,
.ph2-panel-art,
.ph2-photo-tile-art{
  width: auto !important;
  height: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ph2-scene-art{
  left: auto;
  right: 1.1rem;
  bottom: 1.1rem;
  padding: .85rem;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
}

.ph2-scene-art i,
.ph2-panel-art i,
.ph2-photo-tile-art i{
  display: inline-flex;
}

.ph2-scene-art svg{
  width: 38px;
  height: 38px;
  stroke: url(#ph2-grad-b) #7bac2c;
  stroke-width: 2;
  color: #7bac2c;
}

.ph2-panel-art{
  right: .9rem;
  bottom: -.9rem;
  width: auto;
  max-width: none;
  padding: .7rem;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}

.ph2-panel-art svg{
  width: 30px;
  height: 30px;
  color: #7bac2c;
  stroke-width: 2;
}

.ph2-photo-tile-art{
  width: auto;
  padding: .6rem;
  border-radius: 13px;
}

.ph2-photo-tile-art svg{
  width: 26px;
  height: 26px;
  color: #7bac2c;
  stroke-width: 2.1;
}

/* gradient stroke for the larger scene icon */
.ph2-icon-defs{ position: absolute; width: 0; height: 0; }

/* ── Home intro count-up preloader ──────────────────────────────── */
.ph2-preload{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #242725;
  background-color: #242725;
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.65, 0, .35, 1);
  will-change: opacity, transform;
}

.ph2-preload.is-done{
  opacity: 0;
  transform: translateY(-3%);
  pointer-events: none;
}

/* keep page from scrolling/flashing while loading */
html.ph2-preloading,
html.ph2-preloading body{
  overflow: hidden !important;
}

html.ph2-preloading body > :not(#ph2-preload){
  visibility: hidden !important;
}

.ph2-preload-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 0 1.4rem;
  width: min(680px, 92vw);
  text-align: center;
}

.ph2-preload-label{
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: .82rem;
  color: #a6e541;
  opacity: 0;
  animation: ph2-preload-in .6s ease .1s forwards;
}

.ph2-preload-num{
  --ph2-preload-accent: #659306;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
  padding: .12em .08em .06em;
  font-family: var(--font-public-heading);
  font-weight: 700;
  letter-spacing: -.04em;
  font-size: clamp(5.5rem, 26vw, 17rem);
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--ph2-preload-accent) !important;
  color: var(--ph2-preload-accent) !important;
  font-variant-numeric: tabular-nums;
}

.ph2-preload-num i{
  font-style: normal;
  font-size: .34em;
  line-height: 1.25;
  margin-top: .3em;
  margin-left: .12em;
  display: inline-block;
  letter-spacing: normal;
  padding-right: .12em;
  background: none;
  color: var(--ph2-preload-accent) !important;
  -webkit-text-fill-color: var(--ph2-preload-accent) !important;
}

.ph2-preload-bar{
  position: relative;
  width: min(420px, 76vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(159,163,160,.18);
  overflow: hidden;
}

.ph2-preload-bar span{
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: #659306 !important;
  box-shadow: 0 0 16px rgba(101,147,6,.55);
  transition: width .12s linear;
}

.ph2-preload-tag{
  font-size: .86rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #707471;
  opacity: 0;
  animation: ph2-preload-in .6s ease .25s forwards;
}

@keyframes ph2-preload-in{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce){
  .ph2-preload{ transition: opacity .3s ease; }
  .ph2-preload-label,
  .ph2-preload-tag{ animation: none; opacity: 1; }
}

/* ── Hero: animated SVG running figure (runs on load, then rests) ── */
.ph2-hero-ring{
  display: none !important;
}

.ph2-runner{
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  overflow: visible;
}

.ph2-runner-ring{
  fill: none;
  stroke: url(#ph2-grad-b);
  stroke-width: 4.5;
  opacity: .9;
}

.ph2-runner-head{
  fill: url(#ph2-grad-a);
  stroke: none;
}

.ph2-runner-fig path{
  fill: none;
  stroke: url(#ph2-grad-a);
  stroke-width: 5.5;
}

.ph2-runner-arm,
.ph2-runner-leg{
  transform-box: view-box;
}

.ph2-runner-arm-front,
.ph2-runner-arm-back{ transform-origin: 52px 45px; }
.ph2-runner-leg-front,
.ph2-runner-leg-back{ transform-origin: 46px 61px; }

/* run cycle only while .is-running; finite so it settles to neutral */
.ph2-runner.is-running .ph2-runner-leg-front{ animation: ph2-stride-a .42s ease-in-out 7 both; }
.ph2-runner.is-running .ph2-runner-leg-back{ animation: ph2-stride-b .42s ease-in-out 7 both; }
.ph2-runner.is-running .ph2-runner-arm-front{ animation: ph2-stride-b .42s ease-in-out 7 both; }
.ph2-runner.is-running .ph2-runner-arm-back{ animation: ph2-stride-a .42s ease-in-out 7 both; }
.ph2-runner.is-running .ph2-runner-fig{ animation: ph2-runner-bob .42s ease-in-out 7 both; }

@keyframes ph2-stride-a{
  0%{ transform: rotate(0deg); }
  25%{ transform: rotate(20deg); }
  50%{ transform: rotate(0deg); }
  75%{ transform: rotate(-20deg); }
  100%{ transform: rotate(0deg); }
}

@keyframes ph2-stride-b{
  0%{ transform: rotate(0deg); }
  25%{ transform: rotate(-20deg); }
  50%{ transform: rotate(0deg); }
  75%{ transform: rotate(20deg); }
  100%{ transform: rotate(0deg); }
}

@keyframes ph2-runner-bob{
  0%, 50%, 100%{ transform: translateY(0); }
  25%, 75%{ transform: translateY(-1.5px); }
}

@media (prefers-reduced-motion: reduce){
  .ph2-runner.is-running .ph2-runner-leg-front,
  .ph2-runner.is-running .ph2-runner-leg-back,
  .ph2-runner.is-running .ph2-runner-arm-front,
  .ph2-runner.is-running .ph2-runner-arm-back,
  .ph2-runner.is-running .ph2-runner-fig{ animation: none !important; }
}

/* ── Loader-style RepTotal wordmark: hero phone mockup + in-app brand ── */
.phn-brand-name{
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: #658e24;
}

.logo-text,
.desktop-sidebar-logo-title{
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: #a6e541;
}
/* The mobile header's wordmark follows the theme: white on dark, black on
   light (the desktop sidebar keeps its teal). */
html[data-theme="dark"] .appbar .logo-text{ color: #fff; }
html[data-theme="light"] .appbar .logo-text{ color: #000; }

/* ── Transparent logo: no tile, rounding, or glow in any header ──── */
.public-brand img,
.phn-logo,
.logo-mark,
.desktop-sidebar-logo-mark{
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  object-fit: contain !important;
}

/* ── App polish: graceful light/dark transitions + subtle scrollbars ── */
@media (prefers-reduced-motion: no-preference){
  body.app[data-authenticated="1"],
  body.app[data-authenticated="1"] .card,
  body.app[data-authenticated="1"] .daycard,
  body.app[data-authenticated="1"] .desktop-sidebar,
  body.app[data-authenticated="1"] .appbar,
  body.app[data-authenticated="1"] .modal-card{
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
  }
}

body.app[data-authenticated="1"]{
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
body.app[data-authenticated="1"]::-webkit-scrollbar,
body.app[data-authenticated="1"] .desktop-sidebar::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
body.app[data-authenticated="1"]::-webkit-scrollbar-thumb,
body.app[data-authenticated="1"] .desktop-sidebar::-webkit-scrollbar-thumb{
  background: var(--color-border);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
body.app[data-authenticated="1"]::-webkit-scrollbar-thumb:hover,
body.app[data-authenticated="1"] .desktop-sidebar::-webkit-scrollbar-thumb:hover{
  background: var(--color-text-muted);
  background-clip: padding-box;
}
body.app[data-authenticated="1"]::-webkit-scrollbar-track,
body.app[data-authenticated="1"] .desktop-sidebar::-webkit-scrollbar-track{
  background: transparent;
}

/* Title word-rise is a public-marketing flourish: keep it static in the app */
body.app[data-authenticated="1"] .ph2-hw{ overflow: visible; }
body.app[data-authenticated="1"] .ph2-hw > span{ transform: none; animation: none; }

/* Feed comment Edit / Delete / Post: bare icons, no background, that move
   slightly on hover/press. */
.feed-comment-actions button.icon-btn,
.feed-comment-submit.icon-btn,
.feed-comment-actions button.icon-btn:hover,
.feed-comment-actions button.icon-btn:focus,
.feed-comment-actions button.icon-btn:focus-visible,
.feed-comment-actions button.icon-btn:active,
.feed-comment-submit.icon-btn:hover,
.feed-comment-submit.icon-btn:focus,
.feed-comment-submit.icon-btn:focus-visible,
.feed-comment-submit.icon-btn:active{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.feed-comment-actions button.icon-btn,
.feed-comment-submit.icon-btn{
  padding: .25rem !important;
  width: auto !important;
  min-height: 0 !important;
  color: var(--muted, #9fa3a0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}

.feed-comment-actions button.icon-btn:hover,
.feed-comment-actions button.icon-btn:focus-visible,
.feed-comment-submit.icon-btn:hover,
.feed-comment-submit.icon-btn:focus-visible{
  color: var(--color-text-primary, #e5e9e5);
  transform: translateY(-1.5px);
}

.feed-comment-delete.icon-btn:hover,
.feed-comment-delete.icon-btn:focus-visible{
  color: #ef4444;
}

.feed-comment-actions button.icon-btn:active,
.feed-comment-submit.icon-btn:active{
  transform: scale(.86);
}

.feed-comment-actions button.icon-btn svg,
.feed-comment-submit.icon-btn svg{
  width: 18px;
  height: 18px;
}

body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:hover,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:hover,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:focus,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:focus,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:focus-visible,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:focus-visible,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:active,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:active{
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  transition: color .15s ease, transform .15s ease !important;
}

body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:hover,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:hover,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:focus-visible,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:focus-visible{
  transform: translateY(-1.5px) !important;
}

body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-edit.feed-action-button.icon-btn:active,
body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-delete.feed-action-button.icon-btn:active{
  transform: scale(.86) !important;
}

/* Final feed-comment icon controls: keep inline edit/delete icons unframed. */
.feed-comment-actions button.feed-comment-inline-icon,
.feed-comment-actions button.feed-comment-inline-icon:hover,
.feed-comment-actions button.feed-comment-inline-icon:focus,
.feed-comment-actions button.feed-comment-inline-icon:focus-visible,
.feed-comment-actions button.feed-comment-inline-icon:active,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:hover,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:focus,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:focus-visible,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:active{
  -webkit-appearance: none !important;
  appearance: none !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: .18rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  transition: color .15s ease, transform .15s ease !important;
}

.feed-comment-actions button.feed-comment-inline-icon:hover,
.feed-comment-actions button.feed-comment-inline-icon:focus-visible,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:hover,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:focus-visible{
  transform: translateY(-1.5px) !important;
}

.feed-comment-actions button.feed-comment-inline-icon:active,
body.app[data-authenticated="1"] .feed-comment-actions button.feed-comment-inline-icon:active{
  transform: scale(.86) !important;
}

.feed-contact-shortcut,
.feed-contact-shortcut:hover,
.feed-contact-shortcut:focus,
.feed-contact-shortcut:focus-visible,
.feed-contact-shortcut:active,
body.app[data-authenticated="1"] .feed-contact-shortcut,
body.app[data-authenticated="1"] .feed-contact-shortcut:hover,
body.app[data-authenticated="1"] .feed-contact-shortcut:focus,
body.app[data-authenticated="1"] .feed-contact-shortcut:focus-visible,
body.app[data-authenticated="1"] .feed-contact-shortcut:active{
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  cursor: pointer !important;
  transition: color .15s ease, transform .15s ease !important;
}

.feed-contact-shortcut:hover,
.feed-contact-shortcut:focus-visible,
body.app[data-authenticated="1"] .feed-contact-shortcut:hover,
body.app[data-authenticated="1"] .feed-contact-shortcut:focus-visible{
  transform: translateY(-1.5px) !important;
}

.feed-contact-shortcut:active,
body.app[data-authenticated="1"] .feed-contact-shortcut:active{
  transform: scale(.86) !important;
}

/* Logged-in pricing uses app backgrounds, not the public marketing backdrop. */
body.app[data-authenticated="1"].pricing-app-page{
  background:
    radial-gradient(circle at top right, rgba(123,172,44,.08), transparent 32rem),
    var(--bg, #f8fafc) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"].pricing-app-page{
  background:
    radial-gradient(circle at top right, rgba(160,221,62,.08), transparent 34rem),
    linear-gradient(180deg, #161916 0%, #161917 100%) !important;
}

body.app[data-authenticated="1"].pricing-app-page .shell{
  background: transparent !important;
}

body.app[data-authenticated="1"].pricing-app-page .public-section{
  background: transparent !important;
}

/* ─── Plan builder item icon buttons ──────────────────────────────────────────
   The global dark-mode button rule (line ~22124) applies border+box-shadow
   with !important at specificity 0,6,2 to all buttons without .icon-btn.
   The rules below have matching specificity 0,6,2 but appear LATER in this
   file, so they win on source order for equal-specificity !important conflicts.
   ─────────────────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .workout-builder-page .item-row .item-actions-inline button.plan-item-icon-btn.item-alt-icon,
html[data-theme="dark"] .workout-builder-page .item-row .item-actions-inline button.plan-item-icon-btn[data-item-del-btn]{
  -webkit-appearance: none !important;
  appearance: none !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  max-width: 2rem !important;
  max-height: 2rem !important;
  padding: .2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 2rem !important;
}

/* Final plan actions icon-button lock. This must stay after the global
   authenticated button palette because that palette styles plain buttons. */
body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close{
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  flex: 0 0 2.75rem !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  padding: 0 !important;
  border: 1px solid rgba(111,155,41,.18) !important;
  border-radius: 10px !important;
  gap: 0 !important;
  line-height: 1 !important;
}

body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close .nav-icon-lucide,
html[data-theme="light"] body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close .nav-icon-lucide,
html[data-theme="dark"] body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close .nav-icon-lucide{
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  flex: 0 0 16px !important;
}

/* Final feed breakdown visibility lock. Keep this after mobile/authenticated
   button and card overrides so collapsed rows cannot be displayed by layout
   rules such as .feed-breakdown-row { display: grid; }. */
body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row.feed-breakdown-row-hidden,
body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row[hidden],
body.app[data-authenticated="1"] .feed-breakdown [data-breakdown-extra="1"][hidden],
html[data-theme="light"] body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row.feed-breakdown-row-hidden,
html[data-theme="light"] body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row[hidden],
html[data-theme="light"] body.app[data-authenticated="1"] .feed-breakdown [data-breakdown-extra="1"][hidden],
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row.feed-breakdown-row-hidden,
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-breakdown .feed-breakdown-row[hidden],
html[data-theme="dark"] body.app[data-authenticated="1"] .feed-breakdown [data-breakdown-extra="1"][hidden]{
  display: none !important;
}

/* Interactive charts and workout completion controls provide their own
   pressed/focus feedback, so suppress the native blue mobile tap rectangle. */
body.app[data-authenticated="1"] .day-complete-btn,
body.app[data-authenticated="1"] .history-page-action-btn,
body.app[data-authenticated="1"] .progress-chart,
body.app[data-authenticated="1"] .progress-chart-point,
body.app[data-authenticated="1"] .history-pb-trend-chart-shell,
body.app[data-authenticated="1"] #history-pb-trend-chart,
body.app[data-authenticated="1"] .history-pb-hit{
  -webkit-tap-highlight-color: transparent;
}

body.app[data-authenticated="1"] .day-complete-btn:focus,
body.app[data-authenticated="1"] .day-complete-btn:focus-visible,
body.app[data-authenticated="1"] .day-complete-btn:active,
body.app[data-authenticated="1"] .history-page-action-btn:focus,
body.app[data-authenticated="1"] .history-page-action-btn:focus-visible,
body.app[data-authenticated="1"] .history-page-action-btn:active,
body.app[data-authenticated="1"] .progress-chart-point:focus,
body.app[data-authenticated="1"] .progress-chart-point:focus-visible,
body.app[data-authenticated="1"] .progress-chart-point:active,
body.app[data-authenticated="1"] #history-pb-trend-chart:focus,
body.app[data-authenticated="1"] #history-pb-trend-chart:focus-visible,
body.app[data-authenticated="1"] #history-pb-trend-chart:active,
body.app[data-authenticated="1"] .history-pb-hit:focus,
body.app[data-authenticated="1"] .history-pb-hit:focus-visible,
body.app[data-authenticated="1"] .history-pb-hit:active{
  outline: none !important;
  outline-offset: 0 !important;
}

/* Categorised stock training plans */
.coach-library-page .library-stock-plans{
  min-width: 0;
}

.coach-library-page .library-stock-category-grid{
  display: grid;
  gap: .65rem;
  min-width: 0;
}

.coach-library-page .library-stock-category{
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated);
}

.coach-library-page .library-stock-category[hidden],
.coach-library-page .library-stock-family[hidden]{
  display: none !important;
}

.coach-library-page .library-stock-category-summary{
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) 1.2rem;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding: .8rem .9rem;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.coach-library-page .library-stock-category-summary::-webkit-details-marker{
  display: none;
}

.coach-library-page .library-stock-category-summary:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.coach-library-page .library-stock-category-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 6px;
  background: var(--color-bg-secondary);
  color: var(--accent);
}

.coach-library-page .library-stock-category-icon svg{
  width: 1.15rem;
  height: 1.15rem;
}

.coach-library-page .library-stock-category-title{
  display: grid;
  gap: .08rem;
  min-width: 0;
}

.coach-library-page .library-stock-category-title strong,
.coach-library-page .library-stock-category-title small{
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.coach-library-page .library-stock-category-title strong{
  color: var(--color-text-primary);
  font-size: .95rem;
}

.coach-library-page .library-stock-category-title small{
  color: var(--color-text-muted);
  font-size: .72rem;
}

.coach-library-page .library-stock-category-chevron{
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-text-muted);
  transition: transform .18s ease;
}

.coach-library-page .library-stock-category[open] .library-stock-category-chevron{
  transform: rotate(180deg);
}

.coach-library-page .library-stock-category-body{
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: .2rem .9rem 1rem;
  border-top: 1px solid var(--color-border);
}

.coach-library-page .library-stock-family{
  display: grid;
  gap: .55rem;
  min-width: 0;
  padding-top: .85rem;
}

.coach-library-page .library-stock-family + .library-stock-family{
  border-top: 1px solid var(--color-border);
}

.coach-library-page .library-stock-family-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
}

.coach-library-page .library-stock-family-head strong{
  min-width: 0;
  color: var(--color-text-primary);
  font-size: .84rem;
  overflow-wrap: anywhere;
}

.coach-library-page .library-stock-family-head span{
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: .7rem;
}

.coach-library-page .library-stock-week-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  min-width: 0;
}

.coach-library-page .library-stock-week-grid .library-plan-row{
  min-width: 0;
  padding: .72rem .8rem;
}

@media (max-width: 700px){
  .coach-library-page .library-stock-week-grid{
    grid-template-columns: minmax(0, 1fr);
  }

  .coach-library-page .library-stock-category-summary{
    padding: .72rem .75rem;
  }

  .coach-library-page .library-stock-category-body{
    padding: .15rem .75rem .85rem;
  }
}

/* Read-only training library sandbox */
.coach-library-page .library-plan-icon-action.is-preview{
  color: var(--accent) !important;
}

.training-plan-preview-page{
  /* The logo's purple, not the app's teal, for this page's details. */
  --accent: #659306;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  letter-spacing: 0;
}
html[data-theme="light"] .training-plan-preview-page{ --accent: #557e02; }

.plan-preview-page-head{
  align-items: flex-end;
}

.plan-preview-kicker{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .35rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-preview-kicker .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

.plan-preview-page-head h2{
  margin-bottom: .15rem;
}

.plan-preview-readonly-pill{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: .45rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: .82rem;
  font-weight: 700;
}

.plan-preview-readonly-pill .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: var(--accent);
}

.plan-preview-status-band{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.plan-preview-status-copy{
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.plan-preview-status-copy > div{
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.plan-preview-status-copy strong,
.plan-preview-status-copy span:last-child{
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.plan-preview-status-copy span:last-child{
  color: var(--color-text-secondary);
  font-size: .86rem;
}

.plan-preview-status-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated);
  color: var(--accent);
}

.plan-preview-status-icon svg{
  width: 1.2rem;
  height: 1.2rem;
}

.plan-preview-summary{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.plan-preview-summary > span{
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
  min-height: 2.1rem;
  padding: .35rem .6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: .78rem;
}

.plan-preview-summary strong{
  color: var(--color-text-primary);
  font-size: .95rem;
}

.plan-preview-shell{
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.plan-preview-navigation{
  position: sticky;
  top: 1rem;
  min-width: 0;
}

.plan-preview-nav-label{
  margin: 0 0 .45rem;
  color: var(--color-text-muted);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-preview-nav-label:not(:first-child){
  margin-top: 1rem;
}

.plan-preview-week-tabs{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-elevated);
}

.plan-preview-week-tab,
.plan-preview-day-tab{
  box-shadow: none !important;
  transform: none !important;
}

.plan-preview-week-tab{
  min-width: 0;
  min-height: 2.35rem;
  padding: .35rem;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--color-text-secondary) !important;
  font-weight: 700;
}

.plan-preview-week-tab.is-active{
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
  box-shadow: var(--shadow-soft) !important;
}

.plan-preview-day-tabs{
  display: grid;
  gap: .4rem;
}

.plan-preview-day-tab{
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 .65rem;
  width: 100%;
  min-height: 3.85rem;
  padding: .6rem .7rem;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--color-text-secondary) !important;
  text-align: left;
}

.plan-preview-day-tab > span{
  grid-row: 1 / 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 6px;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 800;
}

.plan-preview-day-tab strong{
  align-self: end;
  color: inherit;
  font-size: .9rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.plan-preview-day-tab small{
  align-self: start;
  color: var(--color-text-muted);
  font-size: .72rem;
  white-space: normal;
}

@media (min-width: 801px){
  .plan-preview-day-tab{
    align-items: center;
    justify-content: stretch;
    justify-items: start;
  }

  .plan-preview-day-tab > span{
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .plan-preview-day-tab strong,
  .plan-preview-day-tab small{
    grid-column: 2;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .plan-preview-day-tab strong{
    grid-row: 1;
  }

  .plan-preview-day-tab small{
    grid-row: 2;
  }
}

.plan-preview-day-tab:hover,
.plan-preview-day-tab:focus-visible{
  border-color: var(--color-border) !important;
  background: var(--color-bg-elevated) !important;
}

.plan-preview-day-tab.is-active{
  border-color: var(--color-border) !important;
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
  box-shadow: var(--shadow-soft) !important;
}

.plan-preview-day-tab.is-active > span{
  background: var(--accent);
  color: var(--color-bg-secondary);
}

.plan-preview-content{
  min-width: 0;
}

.plan-preview-day-panel[hidden],
.plan-preview-day-tabs[hidden]{
  display: none !important;
}

.plan-preview-day-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.plan-preview-day-head > div:first-child{
  display: grid;
  gap: .12rem;
}

.plan-preview-day-head > div:first-child > span{
  color: var(--accent);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-preview-day-head h3{
  margin: 0;
  font-size: 1.45rem;
}

.plan-preview-step-actions{
  display: inline-flex;
  gap: .35rem;
}

.plan-preview-step:disabled{
  opacity: .35;
  cursor: default;
}

.plan-preview-workout-list{
  display: grid;
  gap: 1rem;
}

.plan-preview-workout{
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-soft);
}

.plan-preview-workout-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.plan-preview-workout-head > div{
  min-width: 0;
}

.plan-preview-workout-number{
  display: block;
  margin-bottom: .15rem;
  color: var(--color-text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-preview-workout-head h4{
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.plan-preview-category{
  flex: 0 0 auto;
  padding: .25rem .5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 700;
}

.plan-preview-block + .plan-preview-block{
  border-top: 1px solid var(--color-border);
}

.plan-preview-block-head{
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1.1rem .55rem;
}

.plan-preview-block-head > span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 6px;
  background: var(--color-bg-elevated);
  color: var(--accent);
}

.plan-preview-block-head svg{
  width: 1rem;
  height: 1rem;
}

.plan-preview-block-head > div{
  min-width: 0;
}

.plan-preview-block-head h5{
  margin: 0;
  font-size: .92rem;
}

.plan-preview-block-head small{
  display: block;
  color: var(--color-text-muted);
  font-size: .7rem;
}

.plan-preview-exercise-list{
  display: grid;
  gap: .75rem;
  padding: 0 1.1rem .7rem;
}

.plan-preview-exercise{
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.plan-preview-exercise,
.plan-preview-exercise + .plan-preview-exercise{
  margin: 0;
}

.plan-preview-exercise-index{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: .72rem;
  font-weight: 800;
}

.plan-preview-exercise-body{
  min-width: 0;
}

.plan-preview-exercise-body > strong{
  display: block;
  overflow-wrap: anywhere;
  font-size: .95rem;
}

.plan-preview-prescription{
  display: flex;
  align-items: stretch;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

.plan-preview-prescription > span{
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
  min-height: 1.8rem;
  padding: .25rem .45rem;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-bg-elevated);
}

.plan-preview-prescription small{
  color: var(--color-text-muted);
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-preview-prescription strong{
  color: var(--color-text-primary);
  font-size: .76rem;
}

.plan-preview-exercise-body p{
  max-width: 82ch;
  margin: .55rem 0 0;
  color: var(--color-text-secondary);
  font-size: .82rem;
  line-height: 1.55;
}

.plan-preview-exercise-notes{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.plan-preview-empty{
  margin: 0;
  padding: 1rem 1.1rem;
}

.plan-preview-empty-state{
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 3rem 1rem;
  color: var(--color-text-secondary);
}

.plan-preview-empty-state .nav-icon-lucide{
  width: 2rem;
  height: 2rem;
}

@media (max-width: 800px){
  .training-plan-preview-page,
  .plan-preview-page-head,
  .plan-preview-status-band,
  .plan-preview-shell,
  .plan-preview-navigation,
  .plan-preview-content{
    min-width: 0;
    max-width: 100%;
  }

  .plan-preview-page-head{
    align-items: flex-start;
  }

  .plan-preview-page-head > div:first-child,
  .plan-preview-page-head h2{
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .plan-preview-page-head .page-actions{
    width: 100%;
    justify-content: space-between;
  }

  .plan-preview-status-band{
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-preview-summary{
    width: 100%;
    justify-content: flex-start;
  }

  .plan-preview-shell{
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .plan-preview-navigation{
    position: static;
  }

  .plan-preview-day-tabs{
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding: .1rem .1rem .55rem;
    scroll-padding-inline: .1rem;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .plan-preview-day-tab{
    flex: 0 0 8rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: .15rem;
    min-height: 4.35rem;
    padding: .65rem .75rem;
    white-space: normal;
  }

  .plan-preview-day-tab > span{
    display: none;
  }

  .plan-preview-day-tab strong,
  .plan-preview-day-tab small{
    min-width: 0;
    line-height: 1.25;
  }

  .plan-preview-day-head h3{
    font-size: 1.25rem;
  }
}

@media (max-width: 520px){
  .training-plan-preview-page{
    padding-inline: 0;
  }

  .plan-preview-page-head{
    gap: .75rem;
  }

  .plan-preview-status-copy{
    align-items: flex-start;
    gap: .65rem;
    width: 100%;
  }

  .plan-preview-summary{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
  }

  .plan-preview-summary > span{
    display: grid;
    align-content: center;
    gap: .1rem;
    min-width: 0;
    min-height: 4rem;
    padding: .55rem .35rem;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .plan-preview-summary strong{
    font-size: 1rem;
  }

  /* Short day names (Mon, Tue...) four to a row, so none wrap or run off. */
  .plan-preview-day-tabs{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    overflow: visible;
    padding: 0;
  }

  .plan-preview-day-tab{
    width: 100%;
    min-width: 0;
    min-height: 3.6rem;
    padding: .5rem .3rem;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    gap: .1rem;
    align-content: center;
    text-align: center;
    justify-items: center;
  }

  .plan-preview-day-tab > span,
  .plan-preview-day-tab.is-active > span{
    grid-row: auto;
    display: block;
    width: auto;
    height: auto;
    background: none;
    color: inherit;
    font-size: .92rem;
    font-weight: 700;
  }

  .plan-preview-day-tab.is-active{
    border-color: var(--accent) !important;
  }

  /* The app's button rules lay buttons out in a row; stack the day over
     its count instead. */
  html:not(#_):not(#__) body.app .plan-preview-day-tab{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html:not(#_):not(#__) body.app .plan-preview-day-tab.is-active{
    box-shadow: inset 0 0 0 1.5px var(--accent) !important;
  }

  .plan-preview-day-tab.is-active > span{
    color: var(--accent);
  }

  .plan-preview-day-tab strong{
    display: none;
  }

  .plan-preview-day-tab small{
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    font-size: .68rem;
  }

  .plan-preview-workout-head{
    align-items: flex-start;
    flex-direction: column;
    gap: .7rem;
    padding: 1rem;
  }

  .plan-preview-category{
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .plan-preview-block-head{
    padding: .9rem 1rem .65rem;
  }

  .plan-preview-exercise-list{
    gap: .75rem;
    padding: 0 1rem 1rem;
  }

  .plan-preview-exercise{
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: .7rem;
    padding: .85rem;
  }

  .plan-preview-exercise-index{
    width: 1.75rem;
    height: 1.75rem;
  }

  .plan-preview-prescription{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
  }

  .plan-preview-prescription > span{
    display: grid;
    align-content: start;
    align-items: start;
    gap: .15rem;
    min-width: 0;
    min-height: 3.25rem;
    justify-content: stretch;
    padding: .45rem .5rem;
  }

  .plan-preview-prescription strong{
    min-width: 0;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .plan-preview-exercise-body > strong{
    line-height: 1.3;
  }

  .plan-preview-exercise-body p{
    max-width: 100%;
    line-height: 1.5;
  }
}
/* Public articles --------------------------------------------------------- */
body.public-articles-page{
  --articles-bg: #0f110f;
  --articles-surface: #181a18;
  --articles-surface-strong: #202220;
  --articles-line: rgba(159,163,160,.24);
  --articles-muted: #b2b6b3;
  --articles-text: #f5f8fc;
  --articles-cyan: #91c938;
  --articles-teal: #94ce38;
  --articles-violet: #659306;
  background: var(--articles-bg) !important;
  color: var(--articles-text) !important;
}

body.public-articles-page .public-main{
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  overflow: clip;
}

body.public-articles-page .public-ambient{
  opacity: .24;
}

.articles-kicker{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--articles-cyan);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.articles-kicker::before{
  width: 1.8rem;
  height: 2px;
  background: var(--articles-teal);
  content: "";
}

.articles-kicker svg{
  width: 1rem;
  height: 1rem;
}

.article-hero .articles-kicker::before,
.articles-cta .articles-kicker::before{
  display: none;
}

.articles-hero,
.article-hero{
  position: relative;
  display: grid;
  min-height: 42rem;
  isolation: isolate;
  overflow: hidden;
  background: #111311;
}

.articles-hero-image,
.article-hero-image{
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.articles-hero-shade,
.article-hero-shade{
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,14,12,.98) 0%, rgba(12,14,12,.9) 34%, rgba(12,14,12,.42) 62%, rgba(12,14,12,.14) 100%);
}

.articles-hero-content,
.article-hero-content{
  width: min(100%, 78rem);
  margin: auto;
  padding: 6.5rem 2rem 5rem;
}

.articles-hero-content{
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.articles-hero h1,
.article-hero h1,
.articles-collection-intro h1{
  max-width: 48rem;
  margin: 1.25rem 0 1rem;
  color: #fff;
  font-family: var(--font-public-heading);
  font-size: 4.5rem;
  line-height: .98;
  letter-spacing: 0;
  text-wrap: balance;
}

.articles-hero-content > p,
.article-hero-content > p,
.articles-collection-intro > p{
  max-width: 40rem;
  margin: 0;
  color: #d1d5d2;
  font-size: 1.14rem;
  line-height: 1.7;
}

.articles-feature-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, 35rem);
  margin-top: 2.4rem;
  padding: 1.05rem 0;
  border-top: 1px solid rgba(255, 255, 255, .3);
  border-bottom: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

.articles-feature-link:hover{
  border-color: var(--articles-cyan);
  color: var(--articles-cyan);
}

.articles-feature-link span{
  display: grid;
  gap: .3rem;
}

.articles-feature-link small{
  color: var(--articles-teal);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.articles-feature-link strong{
  font-size: 1.05rem;
  line-height: 1.35;
}

.articles-feature-link svg{
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
}

.articles-collection-intro{
  width: min(100%, 78rem);
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.articles-collection-intro h1{
  font-size: 4rem;
}

.articles-filter{
  position: relative;
  z-index: 2;
  display: flex;
  gap: .4rem;
  width: min(calc(100% - 4rem), 78rem);
  margin: -1.5rem auto 0;
  padding: .45rem;
  border: 1px solid var(--articles-line);
  border-radius: 8px;
  background: rgba(22,24,22,.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px);
}

.articles-collection-intro + .articles-filter{
  margin-top: 0;
}

.articles-filter a{
  min-width: 7rem;
  padding: .78rem 1rem;
  border-radius: 5px;
  color: #b7bab7;
  font-size: .88rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.articles-filter a:hover,
.articles-filter a.is-active{
  background: #2e312f;
  color: #fff;
}

.articles-filter a.is-active{
  box-shadow: inset 0 -2px 0 var(--articles-cyan);
}

.articles-collection{
  width: min(100%, 78rem);
  margin: 0 auto;
  padding: 6.5rem 2rem 1rem;
}

.articles-collection + .articles-collection{
  padding-top: 7.5rem;
}

.articles-collection-head{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 31rem);
  align-items: end;
  gap: 3rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--articles-line);
}

.articles-collection-head > div{
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.articles-section-index{
  color: var(--articles-teal);
  font: 800 .78rem/1 Inter, sans-serif;
}

.articles-collection h2,
.articles-cta h2,
.article-related h2{
  margin: 0;
  color: #fff;
  font-family: var(--font-public-heading);
  font-size: 2.65rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.articles-collection-head p{
  margin: 0;
  color: var(--articles-muted);
  font-size: .96rem;
  line-height: 1.65;
}

.articles-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.article-card{
  display: grid;
  grid-template-rows: 15rem 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--articles-line);
  border-radius: 8px;
  background: var(--articles-surface);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.article-card:hover{
  transform: translateY(-3px);
  border-color: rgba(145,201,56,.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}

.article-card-featured{
  grid-column: 1 / -1;
  grid-template-columns: minmax(20rem, 1.05fr) minmax(20rem, .95fr);
  grid-template-rows: minmax(22rem, auto);
}

.article-card-media{
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #1a1d1b;
}

.article-card-media img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.article-card:hover .article-card-media img{
  transform: scale(1.025);
}

.article-card-body{
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  padding: 1.55rem;
}

.article-card-featured .article-card-body{
  justify-content: center;
  padding: 2.5rem;
}

.article-card-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  color: var(--articles-muted);
  font-size: .74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.article-card-meta span{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.article-card-meta span:first-child{
  color: var(--articles-teal);
}

.article-card-meta svg{
  width: .95rem;
  height: .95rem;
}

.article-card h3{
  margin: 1rem 0 .65rem;
  font-family: var(--font-public-heading);
  font-size: 1.55rem;
  line-height: 1.14;
  letter-spacing: 0;
}

.article-card-featured h3{
  font-size: 2.2rem;
}

.article-card h3 a{
  color: #fff;
  text-decoration: none;
}

.article-card h3 a:hover{
  color: var(--articles-cyan);
}

.article-card-body > p{
  margin: 0 0 1.4rem;
  color: var(--articles-muted);
  font-size: .94rem;
  line-height: 1.65;
}

.article-card-read{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  color: #f1f5f2;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.article-card-read:hover{
  color: var(--articles-cyan);
}

.article-card-read svg{
  width: 1rem;
  height: 1rem;
  transition: transform .2s ease;
}

.article-card-read:hover svg{
  transform: translateX(3px);
}

.articles-cta{
  width: min(calc(100% - 4rem), 74rem);
  margin: 7rem auto;
  padding: 3.5rem;
  border-top: 1px solid var(--articles-line);
  border-bottom: 1px solid var(--articles-line);
  background: linear-gradient(90deg, rgba(86,127,0,.12), rgba(128,178,46,.08));
  text-align: center;
}

.articles-cta h2{
  margin-top: 1rem;
}

.articles-cta p{
  max-width: 36rem;
  margin: 1rem auto 1.75rem;
  color: var(--articles-muted);
  line-height: 1.6;
}

.articles-cta > div{
  display: flex;
  justify-content: center;
  gap: .75rem;
}

/* Article reading view */
.article-hero{
  min-height: 39rem;
}

.article-hero-content{
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 4.5rem;
}

.article-breadcrumbs{
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 2rem;
  color: #c2c6c2;
  font-size: .8rem;
}

.article-breadcrumbs a{
  color: inherit;
  text-decoration: none;
}

.article-breadcrumbs a:hover{
  color: var(--articles-cyan);
}

.article-breadcrumbs svg{
  width: .9rem;
  height: .9rem;
}

.article-hero h1{
  max-width: 52rem;
  font-size: 4.25rem;
}

.article-byline{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
  color: #cbcfcb;
  font-size: .78rem;
  font-weight: 700;
}

.article-byline span + span::before{
  margin-right: 1rem;
  color: var(--articles-teal);
  content: "/";
}

.article-layout{
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 48rem);
  justify-content: center;
  gap: 5rem;
  width: min(100%, 78rem);
  margin: 0 auto;
  padding: 5.5rem 2rem 2rem;
}

.article-toc{
  position: sticky;
  top: 7.25rem;
  align-self: start;
  display: grid;
  gap: .18rem;
  padding-left: 1rem;
  border-left: 1px solid var(--articles-line);
}

.article-toc strong{
  margin-bottom: .7rem;
  color: #fff;
  font-size: .75rem;
  text-transform: uppercase;
}

.article-toc a{
  padding: .35rem .5rem;
  border-radius: 4px;
  color: #9da19e;
  font-size: .78rem;
  line-height: 1.35;
  text-decoration: none;
}

.article-toc a:hover{
  background: rgba(145,201,56,.08);
  color: var(--articles-cyan);
}

.article-copy{
  min-width: 0;
}

.article-copy p,
.article-copy li{
  color: #ced2cf;
  font-size: 1.03rem;
  line-height: 1.82;
}

.article-copy p{
  margin: 0 0 1.25rem;
}

.article-intro p:first-child{
  color: #f4f7fb;
  font-size: 1.28rem;
  line-height: 1.7;
}

.article-tool-link{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:16px;
  margin:24px 0 32px;
  padding:20px 24px;
  border:1px solid var(--articles-line);
  border-radius:var(--radius-sm);
  background:var(--articles-surface);
}

.article-tool-link > svg{
  width:24px;
  height:24px;
  color:var(--articles-teal);
}

.article-tool-link strong{
  display:block;
  color:var(--articles-text);
  font-size:1rem;
}

.article-tool-link p{
  margin:4px 0 0;
  color:var(--articles-muted);
  font-size:.92rem;
  line-height:1.55;
}

.article-tool-link .btn{
  white-space:nowrap;
}

.article-glance{
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 2rem;
  margin: 3.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--articles-line);
  border-bottom: 1px solid var(--articles-line);
}

.article-glance-title{
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  color: var(--articles-teal);
}

.article-glance-title svg{
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .12rem;
}

.article-glance h2,
.article-section h2,
.article-plan h2,
.article-closing h2,
.article-sources h2{
  margin: 0;
  color: #fff;
  font-family: var(--font-public-heading);
  font-size: 2.25rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-glance h2{
  font: 800 .82rem/1.4 Inter, sans-serif;
  text-transform: uppercase;
}

.article-glance ul,
.article-section ul{
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-glance li,
.article-section li{
  position: relative;
  padding-left: 1.35rem;
}

.article-glance li::before,
.article-section li::before{
  position: absolute;
  top: .77rem;
  left: 0;
  width: .38rem;
  height: .38rem;
  border-radius: 50%;
  background: var(--articles-teal);
  content: "";
}

.article-section{
  scroll-margin-top: 7rem;
  padding: 4rem 0 1rem;
}

.article-section-number{
  display: block;
  margin-bottom: .75rem;
  color: var(--articles-teal);
  font-size: .75rem;
  font-weight: 800;
}

.article-section h2{
  margin-bottom: 1.35rem;
}

.article-section ul{
  margin: 1.4rem 0;
}

.article-coach-note{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem;
  border-left: 3px solid var(--articles-cyan);
  border-radius: 0 6px 6px 0;
  background: rgba(86,127,0,.1);
}

.article-coach-note > svg{
  width: 1.25rem;
  height: 1.25rem;
  color: var(--articles-cyan);
}

.article-coach-note strong,
.article-week-note strong{
  color: #fff;
  font-size: .78rem;
  text-transform: uppercase;
}

.article-coach-note p,
.article-week-note p{
  margin: .3rem 0 0;
  font-size: .94rem;
  line-height: 1.65;
}

.article-plan{
  scroll-margin-top: 7rem;
  margin-top: 4.5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--articles-line);
}

.article-plan h2{
  margin-top: 1rem;
}

.article-plan-lead{
  max-width: 38rem;
  margin-top: 1rem !important;
}

.article-phase-key{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 2rem 0 1.25rem;
}

.article-phase-key span,
.article-week-heading small{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.65rem;
  padding: .25rem .55rem;
  border: 1px solid rgba(145,201,56,.35);
  border-radius: 4px;
  color: #b9fd52;
  background: rgba(123,172,44,.08);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-phase-key [data-phase="build"],
.article-week-heading [data-phase="build"]{
  border-color: rgba(101,147,6,.45);
  color: #a9ea42;
  background: rgba(61,91,0,.16);
}

.article-phase-key [data-phase="prime"],
.article-week-heading [data-phase="prime"]{
  border-color: rgba(148,206,56,.42);
  color: #b6fb4a;
  background: rgba(128,178,46,.1);
}

.article-phase-key [data-phase="race"],
.article-week-heading [data-phase="race"]{
  border-color: rgba(250, 204, 21, .38);
  color: #fde68a;
  background: rgba(234, 179, 8, .1);
}

.article-plan-weeks{
  display: grid;
  gap: .75rem;
}

.article-plan-week{
  overflow: hidden;
  border: 1px solid var(--articles-line);
  border-radius: 8px;
  background: var(--articles-surface);
}

.article-plan-week summary{
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 5.6rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
}

.article-plan-week summary::-webkit-details-marker{
  display: none;
}

.article-plan-week summary:hover{
  background: rgba(145,201,56,.04);
}

.article-week-number{
  color: var(--articles-muted);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-week-heading{
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.article-week-heading strong{
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.article-plan-week summary > svg{
  width: 1.2rem;
  height: 1.2rem;
  color: var(--articles-cyan);
  transition: transform .2s ease;
}

.article-plan-week[open] summary > svg{
  transform: rotate(180deg);
}

.article-week-body{
  padding: 0 1.2rem 1.25rem 6.2rem;
}

.article-week-body ol{
  display: grid;
  gap: .55rem;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--articles-line);
  list-style: none;
}

.article-week-body > ol:not(.article-week-schedule) > li{
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: .8rem;
}

.article-week-body > ol:not(.article-week-schedule) > li > span{
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: .23rem;
  border: 1px solid var(--articles-line);
  border-radius: 50%;
  color: var(--articles-teal);
  font-size: .7rem;
  font-weight: 800;
}

.article-week-body > ol:not(.article-week-schedule) > li p{
  margin: 0;
  font-size: .9rem;
  line-height: 1.62;
}

.article-week-schedule{
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--articles-line);
  list-style: none;
}

.article-schedule-day{
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--articles-line);
}

.article-schedule-day:last-child{
  border-bottom: 0;
}

.article-schedule-day-name{
  color: var(--articles-teal);
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.45;
  text-transform: uppercase;
}

.article-schedule-day > div{
  min-width: 0;
}

.article-schedule-day strong{
  display: block;
  margin-bottom: .25rem;
  color: #fff;
  font-size: .9rem;
  line-height: 1.4;
}

.article-schedule-day p{
  margin: 0;
  font-size: .88rem;
  line-height: 1.62;
}

.article-schedule-day.is-rest,
.article-schedule-day.is-recovery{
  margin-right: -.7rem;
  margin-left: -.7rem;
  padding-right: .7rem;
  padding-left: .7rem;
  border-radius: 5px;
}

.article-schedule-day.is-rest{
  background: rgba(148,206,56,.07);
}

.article-schedule-day.is-recovery{
  background: rgba(145,201,56,.05);
}

.article-week-note{
  margin-top: 1rem;
  padding: 1rem;
  border-left: 2px solid var(--articles-violet);
  background: rgba(61,91,0,.09);
}

.article-closing{
  scroll-margin-top: 7rem;
  margin-top: 4.5rem;
  padding: 3rem;
  border: 1px solid rgba(148,206,56,.32);
  border-radius: 8px;
  background: rgba(128,178,46,.07);
}

.article-closing h2{
  margin: 1rem 0 1.5rem;
}

.article-closing ul{
  display: grid;
  gap: .85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-closing li{
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: .75rem;
}

.article-closing li svg{
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .33rem;
  color: var(--articles-teal);
}

.article-safety-note{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-top: 4rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--articles-line);
  border-bottom: 1px solid var(--articles-line);
}

.article-safety-note > svg{
  width: 1.35rem;
  height: 1.35rem;
  color: var(--articles-teal);
}

.article-safety-note strong{
  color: #fff;
  font-size: .9rem;
}

.article-safety-note p{
  margin: .35rem 0 0;
  font-size: .83rem;
  line-height: 1.6;
}

.article-sources{
  scroll-margin-top: 7rem;
  padding: 4rem 0 2rem;
}

.article-sources h2{
  font-size: 1.45rem;
}

.article-sources ol{
  display: grid;
  gap: .6rem;
  margin: 1.25rem 0 0;
  padding-left: 1.4rem;
}

.article-sources li{
  color: #7d817e;
  font-size: .86rem;
}

.article-sources a{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #b9bcb9;
  text-decoration-color: rgba(185,188,185,.5);
  text-underline-offset: .2rem;
}

.article-sources a:hover{
  color: var(--articles-cyan);
}

.article-sources svg{
  width: .9rem;
  height: .9rem;
}

.article-related{
  width: min(100%, 78rem);
  margin: 4rem auto 2rem;
  padding: 5rem 2rem;
  border-top: 1px solid var(--articles-line);
}

.article-related-head{
  margin-bottom: 2rem;
}

.article-related h2{
  margin-top: 1rem;
}

body.public-articles-page :where(a, summary):focus-visible{
  outline: 3px solid var(--articles-cyan);
  outline-offset: 3px;
}

@media (max-width: 900px){
  .articles-hero,
  .article-hero{
    min-height: 38rem;
  }

  .articles-hero h1,
  .article-hero h1{
    font-size: 3.5rem;
  }

  .article-layout{
    display: block;
    max-width: 50rem;
  }

  .article-toc{
    position: static;
    display: flex;
    gap: .35rem;
    margin-bottom: 3.5rem;
    padding: 0 0 .7rem;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--articles-line);
    scrollbar-width: thin;
  }

  .article-toc strong{
    display: none;
  }

  .article-toc a{
    flex: 0 0 auto;
    border: 1px solid var(--articles-line);
  }
}

@media (max-width: 720px){
  body.public-articles-page .public-main{
    padding-bottom: 0;
  }

  .articles-hero,
  .article-hero{
    min-height: 36rem;
  }

  .articles-hero-image,
  .article-hero-image{
    object-position: 62% center;
  }

  .articles-hero-shade,
  .article-hero-shade{
    background: linear-gradient(0deg, rgba(12,14,12,.98) 0%, rgba(12,14,12,.88) 52%, rgba(12,14,12,.34) 100%);
  }

  .articles-hero-content,
  .article-hero-content{
    padding: 8rem 1.2rem 3rem;
  }

  .articles-hero-content{
    justify-content: flex-end;
  }

  .articles-hero h1,
  .article-hero h1,
  .articles-collection-intro h1{
    margin-top: .85rem;
    font-size: 2.65rem;
    line-height: 1.02;
  }

  .articles-hero-content > p,
  .article-hero-content > p,
  .articles-collection-intro > p{
    font-size: .98rem;
    line-height: 1.6;
  }

  .articles-feature-link{
    margin-top: 1.6rem;
  }

  .articles-collection-intro{
    padding: 7rem 1.2rem 2.5rem;
  }

  .articles-filter{
    width: calc(100% - 2.4rem);
    margin-top: -1rem;
  }

  .articles-collection-intro + .articles-filter{
    margin-top: 0;
  }

  .articles-filter a{
    flex: 1 1 0;
    min-width: 0;
    padding-inline: .45rem;
  }

  .articles-collection,
  .article-related{
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  .articles-collection{
    padding-top: 4.5rem;
  }

  .articles-collection + .articles-collection{
    padding-top: 5.5rem;
  }

  .articles-collection-head{
    display: block;
  }

  .articles-collection-head p{
    margin-top: .9rem;
  }

  .articles-collection h2,
  .articles-cta h2,
  .article-related h2{
    font-size: 2.1rem;
  }

  .articles-grid{
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card-featured{
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 12.5rem auto;
  }

  .article-card-featured .article-card-body,
  .article-card-body{
    padding: 1.25rem;
  }

  .article-card-featured h3,
  .article-card h3{
    font-size: 1.42rem;
  }

  .articles-cta{
    width: calc(100% - 2.4rem);
    margin: 5rem auto;
    padding: 2.5rem 1.25rem;
  }

  .articles-cta > div{
    flex-direction: column;
  }

  .article-hero{
    min-height: 40rem;
  }

  .article-hero-content{
    padding-bottom: 2.6rem;
  }

  .article-breadcrumbs{
    margin-bottom: 1.35rem;
  }

  .article-byline{
    gap: .45rem .75rem;
    margin-top: 1.25rem;
  }

  .article-byline span + span::before{
    margin-right: .75rem;
  }

  .article-layout{
    padding: 2.5rem 1.2rem 1rem;
  }

  .article-toc{
    margin-right: -1.2rem;
    margin-bottom: 2.5rem;
  }

  .article-copy p,
  .article-copy li{
    font-size: .96rem;
    line-height: 1.72;
  }

  .article-intro p:first-child{
    font-size: 1.12rem;
  }

  .article-tool-link{
    grid-template-columns:auto minmax(0, 1fr);
    gap:12px;
    margin:20px 0 28px;
    padding:16px;
  }

  .article-tool-link .btn{
    grid-column:1 / -1;
    width:100%;
  }

  .article-glance{
    display: block;
    margin: 2.75rem 0;
    padding: 1.5rem 0;
  }

  .article-glance-title{
    margin-bottom: 1.2rem;
  }

  .article-glance h2,
  .article-section h2,
  .article-plan h2,
  .article-closing h2{
    font-size: 1.85rem;
  }

  .article-glance h2{
    font-size: .82rem;
  }

  .article-section{
    padding-top: 3rem;
  }

  .article-coach-note{
    padding: 1rem;
  }

  .article-plan{
    margin-top: 3.5rem;
    padding-top: 3rem;
  }

  .article-phase-key{
    gap: .35rem;
  }

  .article-plan-week summary{
    grid-template-columns: 1fr auto;
    gap: .7rem;
    min-height: 0;
    padding: 1rem;
  }

  .article-week-number{
    grid-column: 1;
  }

  .article-week-heading{
    grid-column: 1;
  }

  .article-plan-week summary > svg{
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .article-week-body{
    padding: 0 1rem 1rem;
  }

  .article-week-body > ol:not(.article-week-schedule) > li{
    gap: .65rem;
  }

  .article-schedule-day{
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: .7rem;
  }

  .article-closing{
    margin-top: 3.5rem;
    padding: 1.5rem;
  }

  .article-safety-note{
    margin-top: 3rem;
  }

  .article-related{
    margin-top: 2rem;
    padding-top: 4rem;
  }
}

@media (prefers-reduced-motion: reduce){
  .article-card,
  .article-card-media img,
  .article-card-read svg,
  .article-plan-week summary > svg{
    transition: none;
  }
}

/* Public article cards inherit the site's light article surface. Keep every
   text state on the matching high-contrast light palette. */
html:not([data-theme="dark"]) body.public-articles-page .article-card h3 a{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card h3 a:hover{
  color: #4e6f18;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card-body > p{
  color: #5f625f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card-meta{
  color: #707471;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card-meta span:first-child{
  color: #618823;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card-read{
  color: #3b5414;
}

html:not([data-theme="dark"]) body.public-articles-page .article-card-read:hover{
  color: #4e6f18;
}

/* The public light theme supplies the long-form article canvas. Use a complete
   light reading palette rather than inheriting the dark editorial colours. */
html:not([data-theme="dark"]) body.public-articles-page article.article-detail{
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fbfcfe;
  box-shadow: none;
}

html:not([data-theme="dark"]) body.public-articles-page .article-layout{
  --articles-line: #dde1de;
  background: #fbfcfe;
}

html:not([data-theme="dark"]) body.public-articles-page .article-toc{
  border-color: #dde1de;
}

html:not([data-theme="dark"]) body.public-articles-page .article-toc strong{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-toc a{
  color: #5f625f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-toc a:hover{
  color: #4e6f18;
  background: #f0f4f1;
}

html:not([data-theme="dark"]) body.public-articles-page .article-copy p,
html:not([data-theme="dark"]) body.public-articles-page .article-copy li{
  color: #3e413e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-intro p:first-child{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-tool-link{
  border-color: #dde1de;
  background: #f1f6fa;
}

html:not([data-theme="dark"]) body.public-articles-page .article-tool-link > svg{
  color: #52731f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-tool-link strong{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-tool-link p{
  color: #5f625f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-layout .articles-kicker,
html:not([data-theme="dark"]) body.public-articles-page .article-glance-title,
html:not([data-theme="dark"]) body.public-articles-page .article-section-number{
  color: #52731f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-glance h2,
html:not([data-theme="dark"]) body.public-articles-page .article-section h2,
html:not([data-theme="dark"]) body.public-articles-page .article-plan h2,
html:not([data-theme="dark"]) body.public-articles-page .article-closing h2,
html:not([data-theme="dark"]) body.public-articles-page .article-sources h2{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-glance li::before,
html:not([data-theme="dark"]) body.public-articles-page .article-section li::before{
  background: #618823;
}

html:not([data-theme="dark"]) body.public-articles-page .article-coach-note{
  border-left-color: #638c21;
  background: #f2f6f3;
}

html:not([data-theme="dark"]) body.public-articles-page .article-coach-note > svg{
  color: #4e6f18;
}

html:not([data-theme="dark"]) body.public-articles-page .article-coach-note strong,
html:not([data-theme="dark"]) body.public-articles-page .article-week-note strong,
html:not([data-theme="dark"]) body.public-articles-page .article-safety-note strong{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key span,
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading small{
  border-color: #a0dd3e;
  color: #425e15;
  background: #f2f6f2;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="build"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="build"]{
  border-color: #9cd73d;
  color: #3d5b00;
  background: #f3f0ff;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="prime"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="prime"]{
  border-color: #a7e73e;
  color: #52731f;
  background: #ecfdf9;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="race"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="race"]{
  border-color: #facc15;
  color: #854d0e;
  background: #fefce8;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="specific"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="specific"]{
  border-color: #9cd73d;
  color: #3d5b00;
  background: #f3f0ff;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="absorb"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="absorb"]{
  border-color: #a7e73e;
  color: #52731f;
  background: #ecfdf9;
}

html:not([data-theme="dark"]) body.public-articles-page .article-phase-key [data-phase="taper"],
html:not([data-theme="dark"]) body.public-articles-page .article-week-heading [data-phase="taper"]{
  border-color: #facc15;
  color: #854d0e;
  background: #fefce8;
}

html:not([data-theme="dark"]) body.public-articles-page .article-plan-week{
  border-color: #d5d9d5;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(30,32,30,.05);
}

html:not([data-theme="dark"]) body.public-articles-page .article-plan-week summary:hover{
  background: #f3f8fc;
}

html:not([data-theme="dark"]) body.public-articles-page .article-week-number{
  color: #707471;
}

html:not([data-theme="dark"]) body.public-articles-page .article-week-heading strong{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-plan-week summary > svg{
  color: #4e6f18;
}

html:not([data-theme="dark"]) body.public-articles-page .article-week-body > ol:not(.article-week-schedule) > li > span{
  border-color: #c2c6c3;
  color: #52731f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-schedule-day-name{
  color: #52731f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-schedule-day strong{
  color: #1e211e;
}

html:not([data-theme="dark"]) body.public-articles-page .article-schedule-day.is-rest{
  background: #effcf9;
}

html:not([data-theme="dark"]) body.public-articles-page .article-schedule-day.is-recovery{
  background: #f2f6f3;
}

html:not([data-theme="dark"]) body.public-articles-page .article-week-note{
  border-left-color: #557e02;
  background: #f5f2ff;
}

html:not([data-theme="dark"]) body.public-articles-page .article-closing{
  border-color: #aaeb43;
  background: #effcf9;
}

html:not([data-theme="dark"]) body.public-articles-page .article-closing li svg,
html:not([data-theme="dark"]) body.public-articles-page .article-safety-note > svg{
  color: #52731f;
}

html:not([data-theme="dark"]) body.public-articles-page .article-sources li{
  color: #707471;
}

html:not([data-theme="dark"]) body.public-articles-page .article-sources a{
  color: #3e413e;
  text-decoration-color: #9fa3a0;
}

html:not([data-theme="dark"]) body.public-articles-page .article-sources a:hover{
  color: #4e6f18;
}

@media (max-width: 720px){
  html:not([data-theme="dark"]) body.public-articles-page .article-toc a{
    border-color: #d1d5d2;
    background: #ffffff;
  }
}

/* Keep nutrition actions compact on phones while preserving a clear touch target. */
@media (max-width: 640px){
  body.app[data-authenticated="1"] .page-actions.nutrition-actions{
    gap: .4rem;
  }

  body.app[data-authenticated="1"] .page-actions.nutrition-actions :is(
    #edit-targets-btn,
    #log-water-btn,
    #log-food-btn,
    #add-custom-food-btn
  ){
    height: 3.65rem !important;
    min-height: 3.65rem !important;
    max-height: 3.65rem !important;
    padding: .48rem .62rem !important;
    gap: .35rem !important;
    font-size: .9rem !important;
    line-height: 1.12;
  }

  body.app[data-authenticated="1"] .page-actions.nutrition-actions :is(
    #edit-targets-btn,
    #log-water-btn,
    #log-food-btn,
    #add-custom-food-btn
  ) :is(.nav-icon-lucide, svg){
    width: 1.05rem !important;
    height: 1.05rem !important;
    min-width: 1.05rem;
  }
}
/* Public home: editorial performance layout, with restrained corners and chrome. */
body.public-site.ph2-dark :is(.ph2-headline, .ph2-mega, .ph2-panel h3, .public-home-stats-section h2, .public-home-principles h3){
  letter-spacing: 0;
}

body.public-site.ph2-dark .public-proof-strip{
  gap: 0;
  width: fit-content;
  padding: .75rem 0;
  border-top: 1px solid rgba(159,163,160,.2);
  border-bottom: 1px solid rgba(159,163,160,.2);
}

html[data-theme="light"] body.public-site.ph2-dark .public-proof-strip span,
body.public-site.ph2-dark .public-proof-strip span{
  min-height: 0;
  padding: 0 .8rem;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #b9bcb9 !important;
  font-size: .82rem;
}

body.public-site.ph2-dark .public-proof-strip span:first-child{
  padding-left: 0;
}

body.public-site.ph2-dark .public-proof-strip span + span{
  border-left: 1px solid rgba(159,163,160,.24) !important;
}

body.public-site.ph2-dark .ph2-marquee{
  margin: 1rem 0 2rem;
  padding: .9rem 0;
  border-top: 1px solid rgba(159,163,160,.17);
  border-bottom: 1px solid rgba(159,163,160,.17);
  -webkit-mask-image: none;
  mask-image: none;
}

body.public-site.ph2-dark .ph2-marquee-track{
  justify-content: flex-start;
  gap: clamp(.7rem, 3vw, 2.25rem);
  width: max-content;
  animation: ph2-marquee 40s linear infinite;
}

body.public-site.ph2-dark .ph2-marquee-track span{
  color: #979a97;
  -webkit-text-stroke: 0;
  font-family: var(--font-public-body);
  font-size: clamp(.72rem, 1.4vw, .9rem);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.public-site.ph2-dark .ph2-marquee-track i{
  color: #5e615e;
  background: none;
  font-size: .35rem;
}

body.public-site.ph2-dark .ph2-story::before{
  content: none;
}

body.public-site.ph2-dark .ph2-story-head{
  max-width: 54rem;
  text-align: left;
}

body.public-site.ph2-dark .ph2-story-head .ph2-mega{
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

body.public-site.ph2-dark .ph2-story-head .public-sub{
  min-height: 0;
  margin-left: 0;
  text-align: left;
}

body.public-site.ph2-dark .ph2-story-layout{
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2.25rem, 5vw, 5rem);
  margin-top: 3.5rem;
}

body.public-site.ph2-dark :is(.ph2-scene, .ph2-scene-photo){
  border-radius: 4px;
}

body.public-site.ph2-dark .ph2-scene-photo{
  box-shadow: none;
}

body.public-site.ph2-dark :is(.ph2-scene-art, .ph2-panel-art){
  display: none;
}

body.public-site.ph2-dark .ph2-story-panels{
  gap: 0;
}

html:not([data-theme="dark"]) body.public-site.ph2-dark .ph2-panel,
body.public-site.ph2-dark .ph2-panel{
  align-items: flex-start;
  min-height: 52vh;
  padding: 2.5rem 1rem 2.5rem 2rem !important;
  border: 0 !important;
  border-top: 1px solid rgba(159,163,160,.2) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

body.public-site.ph2-dark .ph2-panel:last-child{
  border-bottom: 1px solid rgba(159,163,160,.2) !important;
}

body.public-site.ph2-dark .ph2-panel.is-active{
  border-top-color: var(--ph2-accent) !important;
}

body.public-site.ph2-dark .ph2-panel .public-chip{
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ph2-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.public-site.ph2-dark .ph2-panel h3{
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

body.public-site.ph2-dark .ph2-ticks li{
  padding-left: 1.35rem;
}

body.public-site.ph2-dark .ph2-ticks li::before{
  content: "";
  top: .78em;
  width: .55rem;
  height: 1px;
  border-radius: 0;
  transform: none;
  background: var(--ph2-accent);
}

body.public-site.ph2-dark .btn{
  border-radius: 6px !important;
  letter-spacing: 0;
  text-transform: none;
}

body.public-site.ph2-dark .btn-info{
  outline: 0;
  box-shadow: none !important;
}

html[data-theme="light"] body.public-site.ph2-dark .btn{
  --ui-btn-radius: 6px;
  border-radius: 6px !important;
  letter-spacing: 0;
  text-transform: none;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info{
  outline: 0;
  box-shadow: none !important;
}

html[data-theme="light"] body.public-site.ph2-dark .btn-info::before{
  box-shadow: none;
}

html:not([data-theme="dark"]) body.public-site.ph2-dark .public-audience-role,
body.public-site.ph2-dark .public-audience-role{
  border: 0 !important;
}

html:not([data-theme="dark"]) body.public-site.ph2-dark .public-audience-role + .public-audience-role,
body.public-site.ph2-dark .public-audience-role + .public-audience-role{
  border-left: 1px solid rgba(159,163,160,.2) !important;
}

body.public-site.ph2-dark .public-home-stats-section{
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: left;
}

body.public-site.ph2-dark .public-home-stats-section > :is(.public-eyebrow, h2){
  text-align: left;
}

body.public-site.ph2-dark .public-home-stats-section > h2{
  max-width: 13ch;
  margin-right: 0;
  margin-left: 0;
  font-family: var(--font-public-heading);
  font-weight: 700;
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  letter-spacing: -.02em;
  line-height: 1.02;
  text-transform: uppercase;
}

body.public-site.ph2-dark .public-stat-grid{
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(159,163,160,.22);
  border-bottom: 1px solid rgba(159,163,160,.22);
}

body.public-site.ph2-dark .public-stat-grid > div{
  padding: 1.8rem 2rem;
  text-align: left;
}

body.public-site.ph2-dark .public-stat-grid > div:first-child{
  padding-left: 0;
}

body.public-site.ph2-dark .public-stat-grid > div + div{
  border-left: 1px solid rgba(159,163,160,.22);
}

body.public-site.ph2-dark .public-stats .public-stat-grid strong,
body.public-site.ph2-dark .public-stats .public-stat-grid span{
  text-align: left;
}

body.public-site.ph2-dark .public-stats .public-stat-grid strong{
  color: #f1f4f1;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
}

body.public-site.ph2-dark .public-home-principles{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 4rem;
}

body.public-site.ph2-dark .public-home-principles article{
  padding: 1.5rem 0 0;
  border: 0 !important;
  border-top: 1px solid rgba(159,163,160,.22) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.public-site.ph2-dark .public-home-principles article > span{
  color: #a6e541;
  font-size: .75rem;
  font-weight: 700;
}

body.public-site.ph2-dark .public-home-principles h3{
  margin: 1.8rem 0 .65rem;
  color: #f1f4f1;
  font-size: 1.3rem;
}

body.public-site.ph2-dark .public-home-principles p{
  max-width: 34ch;
  margin: 0;
  color: #acafac;
  line-height: 1.65;
}

body.public-site.ph2-dark .ph2-cta{
  margin-top: 3rem;
  margin-bottom: 0;
  padding: clamp(4.5rem, 8vw, 7rem) clamp(1.4rem, 7vw, 6rem);
  border-top: 1px solid rgba(159,163,160,.22);
  border-bottom: 1px solid rgba(159,163,160,.22);
  border-radius: 4px;
  text-align: left;
}

body.public-site.ph2-dark .ph2-cta-inner{
  max-width: 50rem;
}

body.public-site.ph2-dark .ph2-cta .ph2-mega{
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

body.public-site.ph2-dark .ph2-cta .public-sub{
  min-height: 0;
  margin-left: 0;
  text-align: left;
}

body.public-site.ph2-dark .ph2-cta .public-hero-actions{
  justify-content: flex-start;
}

@media (max-width: 980px){
  body.public-site.ph2-dark .ph2-story-layout{
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 2.5rem;
  }

  body.public-site.ph2-dark .ph2-story-panels{
    gap: 0;
  }

  html:not([data-theme="dark"]) body.public-site.ph2-dark .ph2-panel,
  body.public-site.ph2-dark .ph2-panel{
    padding: 2.75rem 0 !important;
  }

  body.public-site.ph2-dark .ph2-panel-media{
    margin-bottom: 1.5rem;
  }

  body.public-site.ph2-dark .ph2-panel-media > img{
    height: clamp(230px, 48vw, 420px);
    border-radius: 4px;
    box-shadow: none;
  }
}

@media (max-width: 720px){
  body.public-site.ph2-dark .public-proof-strip{
    width: 100%;
    gap: .5rem .9rem;
  }

  html[data-theme="light"] body.public-site.ph2-dark .public-proof-strip span,
  body.public-site.ph2-dark .public-proof-strip span{
    padding: 0;
  }

  body.public-site.ph2-dark .public-proof-strip span + span{
    border-left: 0 !important;
  }

  body.public-site.ph2-dark .ph2-marquee{
    margin-bottom: 1rem;
  }

  body.public-site.ph2-dark .ph2-marquee-track{
    justify-content: flex-start;
    min-width: max-content;
  }

  body.public-site.ph2-dark .public-stat-grid,
  body.public-site.ph2-dark .public-home-principles{
    grid-template-columns: 1fr;
  }

  body.public-site.ph2-dark .public-stat-grid > div,
  body.public-site.ph2-dark .public-stat-grid > div:first-child{
    padding: 1.35rem 0;
  }

  body.public-site.ph2-dark .public-stat-grid > div + div{
    border-top: 1px solid rgba(159,163,160,.18);
    border-left: 0;
  }

  html:not([data-theme="dark"]) body.public-site.ph2-dark .public-audience-role + .public-audience-role,
  body.public-site.ph2-dark .public-audience-role + .public-audience-role{
    border-top: 1px solid rgba(159,163,160,.2) !important;
    border-left: 0 !important;
  }

  body.public-site.ph2-dark .public-home-principles{
    gap: 2.4rem;
    margin-top: 3rem;
  }

  body.public-site.ph2-dark .public-home-principles h3{
    margin-top: 1.15rem;
  }

  body.public-site.ph2-dark .ph2-cta{
    margin-right: -.75rem;
    margin-left: -.75rem;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    border-radius: 0;
  }
}

/* Features: editorial catalogue rather than a carousel of cards. */
body.public-site.features-editorial-page .features-editorial-hero{
  max-width: 1180px;
  min-height: auto;
  padding-top: clamp(5.5rem, 10vw, 9rem);
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
  text-align: left;
}

body.public-site.features-editorial-page .features-editorial-hero .ph2-mega{
  max-width: 14ch;
  margin: 1rem 0 1.4rem !important;
  text-align: left;
}

body.public-site.features-editorial-page .features-editorial-hero .public-sub{
  max-width: 51rem;
  margin: 0;
  text-align: left;
}

body.public-site.features-editorial-page .features-catalog-section{
  max-width: 1180px;
  padding-top: clamp(4rem, 7vw, 6.5rem);
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
  border-top: 1px solid rgba(159,163,160,.2);
}

body.public-site.features-editorial-page .features-section-heading{
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

body.public-site.features-editorial-page .features-section-heading .ph2-mega{
  max-width: 11ch;
  margin: 1rem 0 0;
  text-align: left;
}

body.public-site.features-editorial-page .features-section-heading > p{
  margin: 0 0 .45rem;
  color: #b2b6b2;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.7;
}

body.public-site.features-editorial-page .features-catalog{
  border-bottom: 1px solid rgba(159,163,160,.24);
}

body.public-site.features-editorial-page .features-catalog-group{
  display: grid;
  grid-template-columns: minmax(15rem, .72fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(2.6rem, 5vw, 4.6rem) 0;
  border-top: 1px solid rgba(159,163,160,.24);
}

body.public-site.features-editorial-page .features-group-heading{
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  align-content: start;
  gap: 1rem;
}

body.public-site.features-editorial-page .features-group-number{
  padding-top: .22rem;
  color: #9dd83e;
  font-family: var(--font-public-heading);
  font-size: .82rem;
  font-weight: 700;
}

body.public-site.features-editorial-page .features-group-heading h3{
  margin: 0 0 .7rem;
  color: #f5f8fc;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  letter-spacing: 0;
  text-transform: none;
}

body.public-site.features-editorial-page .features-group-heading p{
  max-width: 28ch;
  margin: 0;
  color: #9c9f9c;
  line-height: 1.6;
}

body.public-site.features-editorial-page .features-catalog-items{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.8rem);
}

body.public-site.features-editorial-page .features-catalog-items article{
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.public-site.features-editorial-page .features-catalog-items svg{
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 1.6rem;
  color: #9dd83e;
  stroke-width: 1.7;
}

body.public-site.features-editorial-page .features-catalog-items h4{
  margin: 0 0 .65rem;
  color: #f1f4f1 !important;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
}

body.public-site.features-editorial-page .features-catalog-items p{
  margin: 0;
  color: #b1b4b1 !important;
  font-size: .95rem;
  line-height: 1.65;
}

body.public-site.features-editorial-page .features-system-section{
  max-width: 1180px;
  padding-top: clamp(4.5rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
  text-align: left;
}

body.public-site.features-editorial-page .features-system-section > .ph2-mega{
  max-width: 14ch;
  margin: 1rem 0 2rem;
  text-align: left;
}

body.public-site.features-editorial-page .features-system-section .ph2-numlist{
  max-width: none;
  margin: 0;
}

body.public-site.features-editorial-page .features-system-section .ph2-numlist article{
  display: grid;
  grid-template-columns: minmax(5rem, .35fr) minmax(0, 1.65fr);
  gap: clamp(1.5rem, 5vw, 6rem);
  padding: clamp(2rem, 4vw, 3.2rem) 0;
}

body.public-site.features-editorial-page .features-system-section .ph2-num{
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

body.public-site.features-editorial-page .features-system-section h3{
  letter-spacing: 0;
  text-transform: none;
}

body.public-site.features-editorial-page .features-system-section p{
  max-width: 62ch;
}

body.public-site.features-editorial-page .features-editorial-cta{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .95fr);
  align-items: end;
  gap: clamp(2.5rem, 7vw, 8rem);
  max-width: 1180px;
  margin: 0 auto clamp(4rem, 8vw, 7rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid rgba(159,163,160,.24);
  border-bottom: 1px solid rgba(159,163,160,.24);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body.public-site.features-editorial-page .features-editorial-cta .ph2-mega{
  max-width: 12ch;
  margin: 1rem 0 0;
  text-align: left;
}

body.public-site.features-editorial-page .features-cta-copy .public-sub{
  margin: 0 0 1.8rem;
  text-align: left;
}

body.public-site.features-editorial-page .features-cta-copy .public-hero-actions{
  justify-content: flex-start;
}

body.public-site.features-editorial-page .public-scroll-blur{
  display: none !important;
}

body.public-site.public-articles-page .public-scroll-blur{
  display: none !important;
}

@media (max-width: 980px){
  body.public-site.features-editorial-page .features-section-heading,
  body.public-site.features-editorial-page .features-catalog-group,
  body.public-site.features-editorial-page .features-editorial-cta{
    grid-template-columns: minmax(0, 1fr);
  }

  body.public-site.features-editorial-page .features-section-heading,
  body.public-site.features-editorial-page .features-catalog-group{
    gap: 2.5rem;
  }

  body.public-site.features-editorial-page .features-group-heading p{
    max-width: 42ch;
  }

  body.public-site.features-editorial-page .features-editorial-cta{
    margin-right: clamp(1rem, 4vw, 2.5rem);
    margin-left: clamp(1rem, 4vw, 2.5rem);
  }
}

@media (max-width: 720px){
  body.public-site.features-editorial-page .features-editorial-hero{
    padding-top: 4rem;
    padding-bottom: 3.75rem;
  }

  body.public-site.features-editorial-page .features-catalog-section{
    padding-top: 3.5rem;
  }

  body.public-site.features-editorial-page .features-section-heading{
    padding-bottom: 2.5rem;
  }

  body.public-site.features-editorial-page .features-catalog-group{
    gap: 2rem;
    padding: 2.7rem 0;
  }

  body.public-site.features-editorial-page .features-catalog-items{
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  body.public-site.features-editorial-page .features-catalog-items article{
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1.45rem 0 !important;
    border-top: 1px solid rgba(159,163,160,.16) !important;
  }

  body.public-site.features-editorial-page .features-catalog-items svg{
    margin: .12rem 0 0;
  }

  body.public-site.features-editorial-page .features-system-section .ph2-numlist article{
    grid-template-columns: 3.3rem minmax(0, 1fr);
    gap: 1rem;
  }

  body.public-site.features-editorial-page .features-editorial-cta{
    margin-right: 1.25rem;
    margin-left: 1.25rem;
    padding: 3rem 0;
  }
}

/* Pricing: editorial treatment matching home and features. */
body.public-site.pricing-editorial-page .public-pricing-hero{
  max-width: 1180px;
  min-height: auto;
  padding-top: clamp(5.5rem, 10vw, 9rem);
  padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
  text-align: left;
}

body.public-site.pricing-editorial-page .public-pricing-hero .ph2-page-headline{
  max-width: 14ch;
  margin: 1rem 0 1.4rem !important;
  text-align: left;
}

body.public-site.pricing-editorial-page .public-pricing-hero .public-sub{
  max-width: 51rem;
  min-height: 0;
  margin: 0;
  text-align: left;
}

body.public-site.pricing-editorial-page .pricing-plan-section,
body.public-site.pricing-editorial-page .public-pricing-flow-section,
body.public-site.pricing-editorial-page .public-pricing-growth-section{
  max-width: 1180px;
  margin-top: 0;
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
  border-top: 1px solid rgba(159,163,160,.2);
  text-align: left;
}

body.public-site.pricing-editorial-page .pricing-section-head{
  max-width: 54rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  text-align: left;
}

body.public-site.pricing-editorial-page .pricing-section-head .ph2-mega{
  margin: 1rem 0 0;
  text-align: left;
}

body.public-site.pricing-editorial-page .pricing-section-head .public-sub,
body.public-site.pricing-editorial-page .public-pricing-flow-section .public-sub{
  min-height: 0;
  margin: 1.1rem 0 0;
  text-align: left;
}

body.public-site.pricing-editorial-page .pricing-solo-section{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

body.public-site.pricing-editorial-page .pricing-solo-section .pricing-section-head{
  margin: 0;
}

body.public-site.pricing-editorial-page .pricing-solo-section .public-pricing-solo{
  margin-top: 0;
}

body.public-site.pricing-editorial-page .public-pricing-flow-section .ph2-mega{
  max-width: 18ch;
  margin: 0;
  text-align: left;
}

body.public-site.pricing-editorial-page .public-pricing-reasons{
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

html[data-theme="light"] body.public-site.pricing-editorial-page .public-pricing-reasons .public-card,
body.public-site.pricing-editorial-page .public-pricing-reasons .public-card{
  min-height: 0;
  padding: 1.5rem 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(159,163,160,.22) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

body.public-site.pricing-editorial-page .public-pricing-reasons .public-card::before{
  content: none;
}

body.public-site.pricing-editorial-page .public-pricing-reasons .public-card h3{
  margin: 0 0 .65rem;
  color: #f1f4f1;
  font-size: 1.3rem;
}

body.public-site.pricing-editorial-page .public-pricing-reasons .public-card p{
  max-width: 34ch;
  margin: 0;
  color: #acafac;
  line-height: 1.65;
}

body.public-site.pricing-editorial-page .public-scroll-blur{
  display: none !important;
}

@media (max-width: 980px){
  body.public-site.pricing-editorial-page .pricing-solo-section{
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  body.public-site.pricing-editorial-page .pricing-solo-section .public-pricing-solo{
    justify-content: flex-start;
  }
}

@media (max-width: 720px){
  body.public-site.pricing-editorial-page .public-pricing-hero{
    padding-top: 4rem;
    padding-bottom: 3rem;
  }

  body.public-site.pricing-editorial-page .public-pricing-reasons{
    gap: 0;
  }
}

/* Eyebrows sit left wherever the section header is left-aligned, instead
   of auto-centring over a left title. */
body.public-site.ph2-dark .public-home-stats-section > .public-eyebrow,
body.public-site.ph2-dark .public-audience-section > .public-eyebrow,
body.public-site.features-editorial-page .features-editorial-hero > .public-eyebrow,
body.public-site.features-editorial-page .features-system-section > .public-eyebrow,
body.public-site.pricing-editorial-page .public-pricing-hero > .public-eyebrow{
  margin-left: 0;
  margin-right: 0;
}

/* The app's stacked-article rhythm must not push the 2nd+ article down
   inside public grid rows (principles, audience roles, feature catalog,
   price cards) — public layouts space themselves with grid gap/padding. */
body.public-site article + article{
  margin-top: 0;
}

/* Messages search clear control: equal vertical inset at every viewport size. */
body.app[data-authenticated="1"].messages-page .messages-inbox-modern .messages-search-clear{
  top: 0 !important;
  bottom: 0 !important;
  right: .45rem !important;
  margin: auto 0 !important;
  transform: none !important;
}

/* Admin dashboard: keep copy readable within narrow mobile cards. */
.admin-shell,
.admin-shell > *,
.admin-shell .page-head > *,
.admin-home-stat,
.admin-nav-card,
.admin-auth-events-card{
  min-width: 0;
  max-width: 100%;
}

.admin-home-stat .stat-label,
.admin-nav-card :is(.admin-nav-title, .admin-nav-desc, .admin-nav-link),
.admin-health-status,
.admin-auth-events-card > header > *{
  overflow-wrap: anywhere;
}

.admin-home-table-wrap{
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px){
  .admin-shell .page-head{
    align-items: flex-start;
  }

  .admin-shell .page-head > :first-child,
  .admin-shell .page-actions{
    width: 100%;
  }

  .admin-shell .page-actions .pill-link,
  .admin-health-status,
  .admin-auth-event{
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    white-space: normal;
    line-height: 1.35;
    text-align: left;
  }

  .admin-nav-card .admin-nav-link{
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }

  .admin-auth-events-card .admin-home-table-wrap table{
    min-width: 44rem;
  }

  .admin-home-stat .stat-label,
  .admin-nav-card :is(.admin-nav-title, .admin-nav-desc){
    white-space: normal;
  }
}

/* Keep the admin-home treatment above later shared card/theme rules. */
body.app .admin-home-shell .card.admin-nav-card,
body.app .admin-home-shell .card.admin-nav-card:hover{
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app .admin-home-shell .card.admin-nav-card--health,
body.app .admin-home-shell .card.admin-nav-card:nth-child(2n + 1){
  border-right: 0;
}

body.app .admin-home-shell :is(.admin-auth-events-card, .admin-home-breakdown){
  border-radius: 14px;
  box-shadow: none;
}

@media (max-width: 700px){
  body.app .admin-home-shell .card.admin-nav-card,
  body.app .admin-home-shell .card.admin-nav-card:hover{
    border-right: 0;
  }

  body.app .admin-home-shell .card.admin-nav-card:last-child{
    border-bottom: 0;
  }
}

/* Shared admin console treatment: desktop, mobile browser, and app webviews. */
.admin-console-page{
  width: 100%;
  min-width: 0;
}

.admin-console-page > .page-head{
  align-items: flex-start;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.admin-console-page > .page-head > :first-child{
  min-width: 0;
}

.admin-console-page > .page-head h2{
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.02em;
}

.admin-console-page > .page-head .muted{
  max-width: 62ch;
  line-height: 1.5;
}

body.app .admin-console-page > .card,
body.app .admin-console-page > .grid2 > .card,
body.app .admin-console-page .admin-ops-card{
  border-color: var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: none;
}

.admin-console-page > .card > header,
.admin-console-page > .grid2 > .card > header{
  margin-bottom: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}

.admin-console-page > .card > header strong,
.admin-console-page > .grid2 > .card > header strong{
  font-size: .96rem;
  font-weight: 700;
}

.admin-console-page form{
  min-width: 0;
}

.admin-console-page form > label{
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.admin-console-page :is(input, select, textarea){
  min-width: 0;
}

.admin-console-page .grid2{
  gap: 1rem;
}

.admin-console-page .card .card{
  margin-top: 0;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-console-page .card .card:last-child{
  border-bottom: 0;
}

.admin-console-page .client-list{
  display: grid;
  gap: 0;
}

.admin-console-page .client-card :is(.client-head, .client-head > div){
  min-width: 0;
}

.admin-console-page .client-card .muted,
.admin-console-page .message-card .muted{
  overflow-wrap: anywhere;
}

.admin-console-page .client-actions{
  flex-wrap: wrap;
}

.admin-console-page .admin-home-table-wrap{
  border: 1px solid var(--border);
  border-radius: 10px;
}

.admin-console-page .admin-home-table-wrap table{
  width: 100%;
}

.admin-console-page .admin-home-table-wrap :is(th, td){
  padding: .7rem .75rem;
}

.admin-console-page .admin-home-table-wrap th{
  background: color-mix(in srgb, var(--card) 86%, var(--ink) 4%);
}

.admin-console-page .admin-retention-banner{
  border-style: solid;
  border-radius: 12px;
  box-shadow: none;
}

/* Operations uses a quiet chip-tab rail so each tab reads as a distinct control. */
.admin-console-page .admin-ops-tabs{
  gap: .6rem;
  margin-bottom: 1.4rem;
}

body.app .admin-console-page .admin-ops-tab,
body.app .admin-console-page .admin-ops-tab:is(:hover, :focus-visible){
  min-height: 2.75rem;
  margin-bottom: 0;
  padding: .6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  box-shadow: none;
}

body.app .admin-console-page .admin-ops-tab:is(:hover, :focus-visible){
  border-color: var(--brand-2);
  color: var(--ink);
}

body.app .admin-console-page .admin-ops-tab.is-active{
  border-color: var(--brand-2);
  background: color-mix(in srgb, var(--brand-2) 14%, var(--card));
  color: var(--ink);
}

.admin-console-page .admin-ops-grid{
  max-width: 820px;
}

.admin-console-page .admin-card-toggle-badge{
  width: 2rem;
  height: 2rem;
}

.admin-console-page .admin-card-toggle-action{
  border-color: var(--border);
  border-radius: 8px;
}

.admin-console-page .admin-card-body{
  border-top-color: var(--border);
}

/* Remove the decorative monitoring grid while retaining health semantics. */
body.app .admin-console-page.ops-dashboard :is(.ops-card, .ops-panel, .ops-strip){
  border-color: var(--ops-border);
  border-radius: 14px;
  background: var(--ops-surface);
  box-shadow: none;
}

body.app .admin-console-page.ops-dashboard :is(.ops-kpi, .ops-mini-card, .ops-meter, .ops-inline-stat, .ops-compact-item){
  border-color: var(--ops-border);
  border-radius: 10px;
  background: var(--ops-surface-2);
  box-shadow: none;
}

/* Keep the stock library within the same admin page frame. */
.admin-console-page.coach-library-page{
  gap: 1rem;
}

body.app .admin-console-page .library-panel-modern{
  margin-top: 0 !important;
  border-radius: 14px;
  box-shadow: none;
}

.admin-console-page .library-panel-icon{
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-2);
}

@media (max-width: 700px){
  .admin-console-page > .page-head{
    gap: .8rem;
    padding-bottom: 1rem;
  }

  .admin-console-page > .page-head > :first-child,
  .admin-console-page > .page-head > .page-actions{
    width: 100%;
  }

  .admin-console-page > .card,
  .admin-console-page > .grid2 > .card,
  .admin-console-page .admin-ops-card{
    padding: 1rem;
  }

  .admin-console-page .grid2,
  .admin-console-page .admin-ops-grid{
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .admin-console-page .admin-ops-tabs{
    flex-wrap: nowrap;
    gap: .6rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-right: 1.5rem;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
  }

  .admin-console-page .admin-ops-tabs::-webkit-scrollbar{
    display: none;
  }

  body.app .admin-console-page .admin-ops-tab{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-console-page .admin-card-toggle-copy{
    min-width: 0;
  }

  .admin-console-page .admin-card-toggle-copy small,
  .admin-console-page .admin-card-toggle-copy strong{
    overflow-wrap: anywhere;
  }

  .admin-console-page .admin-home-table-wrap table{
    min-width: 38rem;
  }

  .admin-console-page .client-actions,
  .admin-console-page .client-actions > *{
    width: 100%;
  }

  .admin-console-page .client-actions :is(button, .pill-link){
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  body.app .admin-console-page.ops-dashboard :is(.ops-strip, .ops-panel, .ops-card){
    border-radius: 12px;
  }

  /* Dense admin tables become readable records instead of sideways scrollers. */
  .admin-shell .admin-home-table-wrap:has(.admin-responsive-table),
  .admin-console-page .table-wrap:has(.admin-responsive-table){
    overflow: visible;
    border: 0;
    background: transparent;
  }

  body.app .admin-shell table.admin-responsive-table,
  body.app .admin-console-page .admin-ops-card table.admin-responsive-table{
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .admin-responsive-table thead{
    display: none;
  }

  .admin-responsive-table tbody{
    display: grid;
    gap: .75rem;
  }

  .admin-responsive-table tbody tr{
    display: grid;
    gap: .4rem;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
  }

  .admin-responsive-table tbody td,
  .admin-responsive-table tbody td:nth-child(2){
    display: grid;
    grid-template-columns: minmax(6.5rem, .38fr) minmax(0, 1fr);
    gap: .75rem;
    min-width: 0;
    padding: .15rem 0 !important;
    border: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .admin-responsive-table tbody td::before{
    content: attr(data-label);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.45;
    text-transform: uppercase;
  }

  .admin-responsive-table tbody td[colspan]{
    grid-template-columns: minmax(0, 1fr);
    margin-top: .2rem;
    padding-top: .55rem !important;
    border-top: 1px solid var(--border);
  }

  .admin-responsive-table :is(code, pre){
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

/* Settings text actions share the Set up 2FA light-mode button treatment. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  .settings-section .settings-body button:not(.btn-icon-only):not(.icon-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.hidden-submit),
  .settings-section .settings-body a[role="button"]:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-section .settings-body a.pill-link:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-page-head .settings-logout-btn,
  #invite-regenerate-modal .modal-actions button
){
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
  border: .75px solid #161916 !important;
  border-radius: 10px !important;
  background: var(--btn-subtle-bg) !important;
  background-color: var(--btn-subtle-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--btn-subtle-fg) !important;
  font: 600 13px/1 "Inter", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, transform .08s ease !important;
  text-transform: none !important;
  text-shadow: none !important;
  filter: none !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  .settings-section .settings-body button:not(.btn-icon-only):not(.icon-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.hidden-submit),
  .settings-section .settings-body a[role="button"]:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-section .settings-body a.pill-link:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-page-head .settings-logout-btn,
  #invite-regenerate-modal .modal-actions button
) :is(.nav-icon-lucide, svg){
  width: 14px !important;
  height: 14px !important;
  color: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  .settings-section .settings-body button:not(.btn-icon-only):not(.icon-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.hidden-submit),
  .settings-section .settings-body a[role="button"]:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-section .settings-body a.pill-link:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-page-head .settings-logout-btn,
  #invite-regenerate-modal .modal-actions button
):is(:hover, :focus, :focus-visible, :active){
  border: .75px solid #161916 !important;
  background: var(--btn-subtle-bg-hover) !important;
  background-color: var(--btn-subtle-bg-hover) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--btn-subtle-fg) !important;
  text-shadow: none !important;
  filter: none !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  .settings-section .settings-body button:not(.btn-icon-only):not(.icon-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.hidden-submit),
  .settings-section .settings-body a[role="button"]:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-section .settings-body a.pill-link:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-page-head .settings-logout-btn,
  #invite-regenerate-modal .modal-actions button
):active{
  background: var(--btn-subtle-bg-active) !important;
  background-color: var(--btn-subtle-bg-active) !important;
  transform: translateY(1px) !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  .settings-section .settings-body button:not(.btn-icon-only):not(.icon-btn):not(.booking-link-toggle):not(.booking-link-icon-btn):not(.hidden-submit),
  .settings-section .settings-body a[role="button"]:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-section .settings-body a.pill-link:not(.btn-icon-only):not(.icon-btn):not(.booking-link-icon-btn),
  .settings-page-head .settings-logout-btn,
  #invite-regenerate-modal .modal-actions button
):focus-visible{
  outline: 2px solid var(--btn-focus-ring) !important;
  outline-offset: 2px !important;
}

/* Final light-mode action outline width: retain each button's colour and border style. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) :is(body.app[data-authenticated], body.app.embed-shell-app) :is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.btn,
  a.button,
  a.pill-link,
  a.secondary,
  a[role="button"]
){
  border-width: .75px !important;
}

/* Save profile/appearance: prevent legacy settings rules restoring a heavier edge. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .settings-section .settings-body .settings-save-btn,
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] .settings-section .settings-body .settings-save-btn:is(:hover, :focus, :focus-visible, :active){
  border: .75px solid #161916 !important;
  box-shadow: none !important;
}

/* Dashboard Start/Continue: keep mobile and desktop CTAs on the thin light outline. */
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  #continue-workout-cta,
  #desk-continue-cta,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop
),
:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app[data-authenticated="1"] :is(
  #continue-workout-cta,
  #desk-continue-cta,
  .dashboard-workout-cta,
  .dashboard-workout-cta-desktop
):is(:hover, :focus, :focus-visible, :active){
  border: .75px solid #161916 !important;
  box-shadow: none !important;
}

/* ── Emoji reaction options: guaranteed transparent ──
   Appended last so it wins on source order regardless of any earlier
   authenticated/glossy button rule. Doubled classes + .icon-btn keep the
   specificity above the broad button rules; theme-agnostic on purpose. */
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn,
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn.is-active,
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn:active,
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn:focus{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn:hover,
body.app[data-authenticated="1"] .feed-emoji-picker button.feed-emoji-option.feed-emoji-option.icon-btn:focus-visible{
  background: var(--soft) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* History deletion undo: compact snackbar treatment with one clear action. */
body.app[data-authenticated="1"] .toast.toast-history-undo{
  display:flex;
  align-items:center;
  gap:.7rem;
  width:min(90vw, 380px);
  max-width:380px;
  min-height:3.25rem;
  padding:.65rem .7rem .65rem .75rem;
  border-color:color-mix(in srgb, var(--brand) 34%, var(--border));
  border-radius:14px;
  background:color-mix(in srgb, var(--card) 94%, var(--brand) 6%);
  box-shadow:0 14px 34px color-mix(in srgb, #060806 24%, transparent);
  color:var(--color-text-primary);
  font-weight:600;
  text-align:left;
}
body.app[data-authenticated="1"] .toast.toast-history-undo::before{
  content:"✓";
  display:grid;
  place-items:center;
  flex:0 0 1.7rem;
  width:1.7rem;
  height:1.7rem;
  border-radius:50%;
  background:color-mix(in srgb, var(--brand) 18%, transparent);
  color:var(--brand);
  font-size:.85rem;
  font-weight:800;
}
body.app[data-authenticated="1"] .toast.toast-history-undo .toast-actions{
  flex:0 0 auto;
  margin:0 0 0 auto;
}
body.app[data-authenticated="1"] .toast.toast-history-undo button.toast-history-undo-action,
body.app[data-authenticated="1"] .toast.toast-history-undo button.toast-history-undo-action:is(:hover, :focus, :focus-visible, :active){
  width:auto !important;
  min-width:0 !important;
  min-height:2.15rem !important;
  margin:0 !important;
  padding:.4rem .7rem !important;
  border:0 !important;
  border-radius:9px !important;
  background:color-mix(in srgb, var(--brand) 15%, transparent) !important;
  background-image:none !important;
  box-shadow:none !important;
  color:var(--brand) !important;
  font-size:.82rem !important;
  font-weight:750 !important;
}
body.app[data-authenticated="1"] .toast.toast-history-undo button.toast-history-undo-action:hover,
body.app[data-authenticated="1"] .toast.toast-history-undo button.toast-history-undo-action:focus-visible{
  background:color-mix(in srgb, var(--brand) 24%, transparent) !important;
}
@media (max-width:640px){
  body.app[data-authenticated="1"] .toast.toast-history-undo{
    width:min(92vw, 380px);
  }
}

/* Workout details remove action: a quiet icon-only destructive affordance.
   End-of-file specificity prevents global authenticated/light button themes
   from restoring a fill, outline or shadow. */
.workout-builder-page .workout-details-header{
  position:relative !important;
  display:block !important;
  width:100% !important;
  min-height:2.5rem;
  padding-right:3rem;
  box-sizing:border-box;
}

.workout-builder-page .workout-remove-form{
  position:absolute !important;
  top:50% !important;
  right:-.55rem !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  transform:translateY(-50%) !important;
}

.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn,
.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:hover,
.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:focus,
.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:focus-visible,
.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:active{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:2.5rem !important;
  min-width:2.5rem !important;
  max-width:2.5rem !important;
  height:2.5rem !important;
  min-height:2.5rem !important;
  max-height:2.5rem !important;
  margin:0 !important;
  padding:.5rem !important;
  border:0 !important;
  border-color:transparent !important;
  border-radius:0 !important;
  outline:0;
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  color:#f87171 !important;
  line-height:1 !important;
  text-shadow:none !important;
  filter:none !important;
}

.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:hover,
.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:focus-visible{
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  color:#ef4444 !important;
}

.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:focus-visible{
  outline:2px solid color-mix(in srgb, #ef4444 58%, transparent) !important;
  outline-offset:1px !important;
}

.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn:active{
  transform:scale(.92) !important;
}

.workout-builder-page .workout-details-header button.workout-remove-btn.workout-remove-btn .nav-icon-lucide{
  width:1.1rem !important;
  height:1.1rem !important;
  color:inherit !important;
  stroke-width:2 !important;
}

/* Plan grid: per-day "Add workout" affordance so any day (including a day
   that already has one workout, whose pencil jumps straight to the builder)
   can gain another workout. */
body.app[data-authenticated="1"] .plan-cal-add-link{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .55rem;
  padding: .42rem .7rem;
  border: 1px dashed var(--border);
  border-radius: var(--ui-btn-radius);
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
body.app[data-authenticated="1"] .plan-cal-add-link:hover,
body.app[data-authenticated="1"] .plan-cal-add-link:focus-visible{
  color: var(--ink);
  border-color: var(--border);
  background: var(--soft);
}
body.app[data-authenticated="1"] .plan-cal-add-link .nav-icon-lucide{
  width: .95rem;
  height: .95rem;
}

/* In-app confirmation dialog (replaces native confirm(), no origin prefix) */
.app-confirm{
  position: fixed;
  inset: 0;
  z-index: 6500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.app-confirm[hidden]{ display: none !important; }
.app-confirm-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(7,9,7,.62);
  backdrop-filter: blur(4px);
}
.app-confirm-card{
  position: relative;
  z-index: 1;
  width: min(24rem, 100%);
  padding: 1.35rem 1.35rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.app-confirm.has-wide-confirm-action{
  padding-inline: 1rem;
}
.app-confirm.has-wide-confirm-action .app-confirm-card{
  width: min(26rem, 100%);
}
.app-confirm-text{
  margin: 0 0 1.15rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.app-confirm-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
/* Labels too long to share a row stack, the main action first. */
.app-confirm.has-stacked-confirm-actions .app-confirm-actions{
  grid-template-columns: minmax(0, 1fr);
}
.app-confirm.has-stacked-confirm-actions .app-confirm-ok{
  order: -1;
}
html body.app #app-confirm .app-confirm-actions button.app-confirm-action{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.75rem !important;
  padding: .6rem .9rem !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  white-space: nowrap;
  box-sizing: border-box;
  text-shadow: none !important;
  transform: none !important;
}
html body.app #app-confirm.has-wide-confirm-action .app-confirm-actions button.app-confirm-action{
  padding-inline: 1.15rem !important;
}
html body.app #app-confirm .app-confirm-ok,
html body.app #app-confirm .app-confirm-ok:hover,
html body.app #app-confirm .app-confirm-ok:focus,
html body.app #app-confirm .app-confirm-ok:focus-visible,
html body.app #app-confirm .app-confirm-ok:active{
  background: #ef4444 !important;
  background-image: none !important;
  border: 1px solid #ef4444 !important;
  color: #fff !important;
  box-shadow: none !important;
}
html body.app #app-confirm .app-confirm-ok:hover,
html body.app #app-confirm .app-confirm-ok:focus-visible{
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* One-time plan notice (trial ended), on the in-app confirmation sheet. */
.plan-notice-card{
  display: grid;
  justify-items: center;
  padding: 1.5rem;
  text-align: center;
}
.plan-notice-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: .75rem;
  border-radius: var(--radius-sm);
  background: var(--ui-btn-primary-bg);
  color: var(--ui-btn-primary-fg);
}
.plan-notice-icon svg{
  width: 1.5rem;
  height: 1.5rem;
}
.plan-notice-title{
  margin: 0 0 .5rem;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.25;
}
.plan-notice-copy{
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.5;
}
.plan-notice-card form{
  width: 100%;
}
.plan-notice-action{
  width: 100%;
  min-height: 3rem;
}
.plan-notice-actions{
  display: grid;
  gap: 8px;
}

/* Builder prompt for keeping a custom exercise in the user's private library. */
.exercise-library-prompt-card{
  width: min(32rem, 100%);
}
.exercise-library-prompt-title{
  margin: 0 0 .45rem;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.25;
}
.exercise-library-prompt-copy{
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-weight: 500;
}
html body.app #exercise-library-prompt .exercise-library-prompt-actions button.app-confirm-action{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.75rem !important;
  padding: .65rem .9rem !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-shadow: none !important;
  transform: none !important;
}
@media (max-width: 520px){
  .exercise-library-prompt{
    padding: 1rem;
  }
  .exercise-library-prompt-actions{
    grid-template-columns: 1fr;
  }
}

/* Keep the week Actions trash icon neutral like Edit plan and Library.
   This late override wins over the shared trash-icon danger treatment. */
html body.app[data-authenticated="1"] .plan-fab-panel .fab-menu-btn--danger .fab-menu-icon-wrap,
html body.app[data-authenticated="1"] .plan-fab-panel .fab-menu-btn--danger .fab-menu-icon{
  color: var(--ink) !important;
  stroke: var(--ink) !important;
}
html body.app[data-authenticated="1"] .plan-fab-panel .fab-menu-btn--danger .fab-menu-icon{
  opacity: .6 !important;
}

/* Workout stopwatch controls remain icon-only across late button overrides. */
body.app[data-authenticated="1"] .desktop-session-timer-control,
body.app[data-authenticated="1"] .desktop-session-timer-control:hover,
body.app[data-authenticated="1"] .desktop-session-timer-control:focus,
body.app[data-authenticated="1"] .desktop-session-timer-control:focus-visible,
body.app[data-authenticated="1"] .desktop-session-timer-control:active,
body.app[data-authenticated="1"] .guided-stopwatch-control,
body.app[data-authenticated="1"] .guided-stopwatch-control:hover,
body.app[data-authenticated="1"] .guided-stopwatch-control:focus,
body.app[data-authenticated="1"] .guided-stopwatch-control:focus-visible,
body.app[data-authenticated="1"] .guided-stopwatch-control:active{
  border: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Dashboard workout feature card: strong hierarchy with a compact action row. */
body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-card, #desk-continue-card).dashboard-workout-feature{
  position: relative;
  display: block;
  min-height: 0;
  padding: clamp(1.1rem, 2.5vw, 1.55rem) !important;
  overflow: hidden;
  border: 1px solid #e0e4e0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 18%, rgba(86,127,0,.1), transparent 34%),
    linear-gradient(145deg, #ffffff, #f1f5f2);
  box-shadow: 0 16px 34px rgba(22,25,22,.1);
  color: #161916;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-card, #desk-continue-card).dashboard-workout-feature{
  border-color: rgba(111,155,41,.18);
  background:
    radial-gradient(circle at 82% 12%, rgba(86,127,0,.16), transparent 36%),
    linear-gradient(145deg, #181a18, #131614 72%);
  box-shadow: 0 18px 40px rgba(6,8,6,.34);
  color: #f0f4f8;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-top{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  align-items: center;
  gap: 1rem;
  min-height: 10rem;
  z-index: 1;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-copy{
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
  overflow-wrap: anywhere;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-eyebrow{
  margin-bottom: .48rem;
  color: #567f00;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-eyebrow{
  color: #83b532;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-title-row{
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-title{
  color: inherit;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-meta{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .42rem;
  margin-top: .85rem;
  color: #626562;
  font-size: .88rem;
  line-height: 1.35;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-meta{
  color: #9fa29f;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-meta .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
  color: currentColor !important;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-meta strong{
  color: inherit;
  font-weight: 600;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-meta-dot{
  opacity: .65;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art{
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 10rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: .5rem;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art svg{
  height: 10rem;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art figcaption{
  display: none;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art .muscle-region{
  cursor: default;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art .muscle-level-0{
  fill: var(--color-text-secondary);
  fill-opacity: .5;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-footer{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(112,116,113,.18);
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-footer{
  border-top-color: rgba(111,155,41,.16);
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-progress-copy{
  display: grid;
  gap: .14rem;
  min-width: 0;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-progress-copy > strong{
  color: inherit;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-progress-copy > span{
  color: #626562;
  font-size: .78rem;
  line-height: 1.25;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-progress-copy > span{
  color: #9fa29f;
}

body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature .dashboard-card-actions{
  margin: 0;
  width: min(15rem, 50%);
  flex: 0 1 15rem;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta){
  width: min(15rem, 50%) !important;
  min-width: 10.5rem !important;
  min-height: 3.1rem !important;
  padding: .78rem 1rem !important;
  border: 1px solid rgba(131,181,50,.38) !important;
  border-radius: 14px !important;
  background: var(--color-brand) !important;
  background-color: #567f00 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.2) !important;
  transform: none !important;
}

:is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta):is(:hover, :focus, :focus-visible, :active){
  border-color: rgba(155,215,60,.46) !important;
  background: var(--color-brand) !important;
  background-color: #496d02 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.22) !important;
  transform: none !important;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta){
  width: min(15rem, 50%) !important;
  min-width: 10.5rem !important;
  min-height: 3.1rem !important;
  padding: .78rem 1rem !important;
  border: 1px solid rgba(131,181,50,.38) !important;
  border-radius: 14px !important;
  background: var(--color-brand) !important;
  background-color: #567f00 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.2) !important;
  transform: none !important;
}

:is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta):is(:hover, :focus, :focus-visible, :active){
  border-color: rgba(155,215,60,.46) !important;
  background: var(--color-brand) !important;
  background-color: #496d02 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.22) !important;
  transform: none !important;
}

body.app.user-dashboard-page[data-authenticated="1"] #desk-continue-cta{
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 520px){
  body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-card, #desk-continue-card).dashboard-workout-feature{
    padding: 1rem !important;
    border-radius: 20px;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-top{
    grid-template-columns: minmax(0, 1fr) 7rem;
    gap: .75rem;
    min-height: 9rem;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-copy{
    width: 100%;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-title{
    font-size: clamp(1.25rem, 5.6vw, 1.55rem);
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art{
    height: 9rem;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-art svg{
    height: 9rem;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-footer{
    align-items: stretch;
    flex-direction: column;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature .dashboard-card-actions{
    width: 100%;
    flex-basis: auto;
  }

  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-progress-copy{
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: .45rem;
  }

  body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta),
  :is(html[data-theme="light"], html.light, html:not([data-theme="dark"])) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta),
  :is(html[data-theme="dark"], html.dark) body.app.user-dashboard-page[data-authenticated="1"] :is(#continue-workout-cta, #desk-continue-cta){
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 360px){
  body.app.user-dashboard-page[data-authenticated="1"] .dashboard-workout-feature-top{
    grid-template-columns: minmax(0, 1fr) 6rem;
    gap: .5rem;
  }
}

/* Shared dashboard/week workout CTA: one final treatment in both themes. */
html body.app[data-authenticated="1"] .workout-blue-cta.workout-blue-cta{
  --ui-btn-bg: #567f00;
  --ui-btn-border: rgba(131,181,50,.38);
  --ui-btn-fg: #ffffff;
  --ui-btn-hover-bg: #496d02;
  --ui-btn-hover-border: rgba(155,215,60,.46);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 7rem !important;
  min-height: 3.1rem !important;
  padding: .78rem 1rem !important;
  border: 1px solid rgba(131,181,50,.38) !important;
  border-radius: 14px !important;
  background: var(--color-brand) !important;
  background-color: #567f00 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.2) !important;
  transform: none !important;
}

html body.app[data-authenticated="1"] .workout-blue-cta.workout-blue-cta:hover,
html body.app[data-authenticated="1"] .workout-blue-cta.workout-blue-cta:focus,
html body.app[data-authenticated="1"] .workout-blue-cta.workout-blue-cta:focus-visible,
html body.app[data-authenticated="1"] .workout-blue-cta.workout-blue-cta:active{
  border-color: rgba(155,215,60,.46) !important;
  background: #496d02 !important;
  background-color: #496d02 !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.22) !important;
}

/* Continue keeps the blue CTA: it is the single action on a card that has a
   session running. Starting one is now a choice between two equal options, so
   Freestyle and Routine wear the ordinary flat button instead and this rule no
   longer names #off-plan-start-cta. */
html body.app[data-authenticated="1"] #off-plan-continue-link{
  --ui-btn-bg: #567f00 !important;
  --ui-btn-border: rgba(131,181,50,.38) !important;
  --ui-btn-fg: #ffffff !important;
  border-color: rgba(131,181,50,.38) !important;
  background: var(--color-brand) !important;
  background-color: #567f00 !important;
  background-image: none !important;
  color: var(--color-on-brand) !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.2) !important;
}

html body.app[data-authenticated="1"] #off-plan-continue-link:hover,
html body.app[data-authenticated="1"] #off-plan-continue-link:focus,
html body.app[data-authenticated="1"] #off-plan-continue-link:focus-visible,
html body.app[data-authenticated="1"] #off-plan-continue-link:active{
  border-color: rgba(155,215,60,.46) !important;
  background: #496d02 !important;
  background-color: #496d02 !important;
  box-shadow: 0 10px 22px rgba(86,127,0,.22) !important;
}

/* In the app, a page's content shows as soon as it arrives. Fading the page
   and its cards in from transparent left only the dark background on screen
   for a moment, which read as a black flash between pages. */
body.app[data-authenticated="1"] > .shell > .container,
body.app[data-authenticated="1"] :is(.card, article, .daycard, .workout-section){
  animation: none;
}

@keyframes app-page-enter{
  from{
    opacity: 0;
  }
  to{
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce){
  body.app[data-authenticated="1"] > .shell > .container{
    animation: none;
    opacity: 1;
  }
}
/* Native GPS recorder and dashboard quick start. */
@media (max-width: 819px){
  body.user-dashboard-page .dashboard-quick-actions{
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(var(--mobile-footer-height, 5.5rem) + env(safe-area-inset-bottom) + 1rem);
    z-index: 48;
    display: grid;
    justify-items: end;
    gap: .75rem;
  }
  body.user-dashboard-page .dashboard-quick-fab{
    width: 3.75rem;
    height: 3.75rem;
    min-width: 3.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-on-accent);
    background: var(--color-accent);
    box-shadow: var(--shadow);
    transition: transform .18s ease, background-color .18s ease;
  }
  body.user-dashboard-page .dashboard-quick-fab.is-open{ transform: rotate(45deg); }
  body.user-dashboard-page .dashboard-quick-fab .lucide{ width: 1.65rem; height: 1.65rem; }
  body.user-dashboard-page .dashboard-quick-menu{
    width: min(22rem, calc(100vw - 2rem));
    padding: .5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
  }
  body.user-dashboard-page .dashboard-quick-menu[hidden]{ display: none; }
  body.user-dashboard-page .dashboard-quick-menu form{ margin: 0; }
  body.user-dashboard-page .dashboard-quick-menu :is(a, button){
    width: 100%;
    min-height: 4.25rem;
    padding: .75rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--ui-btn-border) !important;
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    background: var(--ui-btn-bg) !important;
    text-align: left;
    text-decoration: none;
    box-shadow: none !important;
  }
  /* The global light-mode a[role="button"] rule otherwise darkens the anchor's
     border/outline; the menu id outranks it so both actions share the light
     border with no dark outline. */
  html[data-theme="light"] #dashboard-quick-menu :is(a, button).dashboard-quick-menu-action,
  html[data-theme="light"] #dashboard-quick-menu :is(a, button).dashboard-quick-menu-action:is(:hover, :focus, :focus-visible, :active){
    border-color: var(--color-border) !important;
    outline: none !important;
    box-shadow: none !important;
  }
  body.user-dashboard-page .dashboard-quick-menu :is(a, button):hover{
    border-color: var(--ui-btn-hover-border) !important;
    background: var(--ui-btn-hover-bg) !important;
  }
  body.user-dashboard-page .dashboard-quick-menu form + .dashboard-quick-menu-action{ margin-top: .5rem; }
  body.user-dashboard-page .dashboard-quick-menu-icon{
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  }
  body.user-dashboard-page .dashboard-quick-menu strong,
  body.user-dashboard-page .dashboard-quick-menu small{ display: block; }
  body.user-dashboard-page .dashboard-quick-menu small{ margin-top: .15rem; color: var(--color-text-secondary); font-weight: 400; }
}

body.activity-recorder-page .shell{ padding: 0; }
body.activity-recorder-page .shell > .container{ width: 100%; max-width: none; padding: 0; }
@media (max-width: 1023px){
  body.activity-recorder-page .appbar{ display: none !important; }
  body.app.activity-recorder-page[data-authenticated="1"] > .shell{ margin-top: 0 !important; }
}
body.activity-recorder-page .gps-recorder{
  min-height: calc(100dvh - var(--mobile-footer-height, 5.5rem));
  display: grid;
  grid-template-rows: minmax(20rem, 1fr) auto;
  background: var(--color-bg-primary);
}
.gps-recorder-map{
  position: relative;
  min-height: 20rem;
  overflow: hidden;
  background: var(--color-bg-secondary);
}
.gps-map-grid{
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-border) 65%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-border) 65%, transparent) 1px, transparent 1px);
  background-size: 3rem 3rem;
}
#gps-route-map{ position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; background: transparent; }
.gps-recorder-map .leaflet-control-attribution{ color: var(--color-text-secondary); background: color-mix(in srgb, var(--card) 84%, transparent); }
.gps-recorder-map .leaflet-control-attribution a{ color: var(--color-accent); }
.gps-recorder-map .mapboxgl-ctrl-attrib{
  color: var(--color-text-secondary);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.gps-recorder-map .mapboxgl-ctrl-attrib a{ color: var(--color-accent); }
html[data-theme="dark"] .gps-recorder-map .leaflet-tile-pane,
html.dark .gps-recorder-map .leaflet-tile-pane{ filter: invert(.9) hue-rotate(180deg) saturate(.65) brightness(.72) contrast(1.12); }
/* Strava-style current-location dot with a soft pulsing halo. */
.gps-live-marker{ background: none; border: 0; }
.gps-live-dot{
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #567f00;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 rgba(86,127,0,.45);
  animation: gpsLivePulse 2s ease-out infinite;
}
@keyframes gpsLivePulse{
  0%{ box-shadow: 0 0 0 0 rgba(86,127,0,.45); }
  70%{ box-shadow: 0 0 0 14px rgba(86,127,0,0); }
  100%{ box-shadow: 0 0 0 0 rgba(86,127,0,0); }
}
@media (prefers-reduced-motion: reduce){
  .gps-live-dot{ animation: none; }
}
.gps-route-glow{ fill: none; stroke: color-mix(in srgb, var(--color-accent) 30%, transparent); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.gps-route-line{ fill: none; stroke: var(--color-accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.gps-signal,
.gps-recorder-back{
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-primary);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.gps-signal{ left: 1rem; padding: .55rem .8rem; font-size: .8rem; }
.gps-recorder-back{ right: 1rem; width: 2.5rem; justify-content: center; text-decoration: none; }
.gps-signal .lucide,
.gps-recorder-back .lucide{ width: 1rem; height: 1rem; }
.gps-recorder-panel{
  position: relative;
  z-index: 2;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) calc(1.25rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid var(--color-border);
  background: var(--card);
  box-shadow: var(--shadow);
}
.gps-summary-heading .gps-overline{ color: var(--color-accent); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gps-summary-heading h1{ margin: .25rem 0; font-size: 1.65rem; }
.gps-summary-heading p{ margin: 0; color: var(--color-text-secondary); }
.gps-prestart-actions{ margin-top: 1.25rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; }
/* Activity selector as a horizontal pill: icon · label · chevron. */
.gps-type-button{
  display: flex !important;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 3.4rem;
  padding: 0 1.1rem !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 999px !important;
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
  box-shadow: none !important;
  filter: none !important;
  font-weight: 700;
}
.gps-type-button .gps-type-button-glyph{ display: inline-flex; }
.gps-type-button #gps-type-button-label{ margin-right: auto; }
.gps-type-button .lucide{ width: 1.5rem; height: 1.5rem; color: var(--color-accent); }
.gps-type-button .gps-type-button-caret{ color: var(--color-text-secondary); }
.gps-type-button .gps-type-button-caret.lucide{ width: 1.1rem; height: 1.1rem; }
.gps-start-button{ justify-self: center; width: 5rem; height: 5rem; min-width: 5rem; padding: 0; border-radius: 50%; }
.gps-start-button .lucide{ width: 2rem; height: 2rem; }
/* Feature highlights under the start row. */
.gps-prestart-features{ margin-top: 1.75rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.gps-feature{ display: grid; justify-items: center; gap: .35rem; min-width: 0; }
.gps-feature-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: .15rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent);
}
.gps-feature-icon .lucide{ width: 1.35rem; height: 1.35rem; }
.gps-feature strong{ font-size: .9rem; }
.gps-feature > span{ color: var(--color-text-secondary); font-size: .74rem; line-height: 1.25; }
.gps-live-title{ display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gps-live-title span{ font-size: 1.15rem; font-weight: 700; }
.gps-live-title strong{ color: var(--color-accent); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.gps-live-stats{ margin: 1.25rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.gps-live-stats.has-steps{ grid-template-columns: repeat(2, 1fr); }
.gps-live-stats > div{ min-width: 0; padding: .75rem .3rem; border-radius: var(--radius-sm); background: var(--color-bg-secondary); }
.gps-live-stats strong,
.gps-live-stats span{ display: block; }
.gps-live-stats strong{ font-size: clamp(1rem, 5vw, 1.55rem); font-variant-numeric: tabular-nums; }
.gps-live-stats span{ margin-top: .25rem; color: var(--color-text-secondary); font-size: .7rem; }
.gps-live-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.gps-pause-button{ width: 100%; }
.gps-finish-button{ width: 100%; min-width: 0; }
.gps-bottom-sheet{ align-self: end; width: min(100%, 34rem); max-height: min(85dvh, 44rem); margin: auto auto 0; padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius) var(--radius) 0 0; }
.gps-type-modal .modal-backdrop,
.gps-finish-modal .modal-backdrop{ z-index: 0; background: color-mix(in srgb, var(--color-bg-primary) 76%, transparent); backdrop-filter: none; }
.gps-type-modal .gps-bottom-sheet,
.gps-finish-modal .gps-bottom-sheet{ z-index: 1; opacity: 1; filter: none !important; backdrop-filter: none; background: var(--card) !important; }
.gps-bottom-sheet > header{ display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
/* One close-button treatment for GPS sheets and workout action sheets. */
body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close){
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 2.75rem !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  padding: 0 !important;
  border: var(--ui-btn-border-width, 1px) solid var(--ui-btn-default-border) !important;
  border-radius: var(--ui-btn-radius, 10px) !important;
  background: var(--ui-btn-default-bg) !important;
  background-color: var(--ui-btn-default-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-default-fg) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close):is(:hover, :focus, :focus-visible, :active){
  border-color: var(--ui-btn-default-hover-border) !important;
  background: var(--ui-btn-default-hover-bg) !important;
  background-color: var(--ui-btn-default-hover-bg) !important;
  color: var(--ui-btn-default-fg) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close){
  background-image: var(--ui-btn-glossy-surface-image) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.55),
    0 3px 10px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
}

html[data-theme="dark"] body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close):is(:hover, :focus, :focus-visible, :active){
  background-image: var(--ui-btn-glossy-surface-image-hover) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 8px 10px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.5) !important;
}

body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close) .lucide,
body.app[data-authenticated="1"] :is(.gps-bottom-sheet, .plan-fab-panel) button:is(.gps-modal-close, .plan-action-sheet-close) .nav-icon-lucide{
  width: 1.25rem !important;
  height: 1.25rem !important;
  margin: 0 !important;
  color: currentColor !important;
  stroke: currentColor !important;
}

/* Keep the activity-sheet close a flat icon — no glossy button glow. */
/* Flat neutral close button that matches the sheet's other buttons — no
   glossy dark-theme box-shadow or focus glow. */
html body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close,
html[data-theme="dark"] body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close,
html body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close:is(:hover, :focus, :focus-visible, :active),
html[data-theme="dark"] body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close:is(:hover, :focus, :focus-visible, :active){
  border: 1px solid var(--ui-btn-default-border) !important;
  background: var(--ui-btn-default-bg) !important;
  background-color: var(--ui-btn-default-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
html body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close::before,
html body.app[data-authenticated="1"] .gps-bottom-sheet button.gps-modal-close::after{
  display: none !important;
}
.gps-type-list{ display: grid; }
.gps-type-list button{ min-height: 4.25rem; padding: .75rem; display: grid; grid-template-columns: 2rem 1fr 2rem; align-items: center; gap: .75rem; border: 1px solid transparent !important; color: var(--color-text-primary) !important; background: transparent !important; text-align: left; box-shadow: none !important; }
.gps-type-list button.is-selected{ color: var(--color-accent) !important; }
.gps-type-list button:is(:hover, :focus-visible, .is-selected){ border-color: var(--color-border) !important; background: var(--color-bg-secondary) !important; }
.gps-type-list button:not(.is-selected) .gps-type-check{ visibility: hidden; }
.gps-bottom-sheet label{ display: grid; gap: .4rem; margin-top: .8rem; font-weight: 600; }
.gps-finish-actions{ margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
/* The global :focus-visible ring and glossy button shadow have huge
   specificity, so beat them with the modal IDs to strip every glow from the
   close buttons in both sheets — resting and focus/active alike. */
#gps-type-modal .gps-modal-close,
#gps-finish-modal .gps-modal-close,
#gps-type-modal .gps-modal-close:is(:hover, :focus, :focus-visible, :active),
#gps-finish-modal .gps-modal-close:is(:hover, :focus, :focus-visible, :active){
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  background-image: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.gps-finish-actions .gps-discard-button{ grid-column: 1 / -1; border: 0; color: var(--color-danger); background: transparent; box-shadow: none; }
.gps-finish-actions .gps-discard-button.is-confirming{ font-weight: 700; color: #ffffff; background: var(--color-danger); border-radius: var(--ui-btn-radius, 10px); }
@media (min-width: 820px){
  body.activity-recorder-page .gps-recorder{ max-width: 72rem; min-height: 44rem; margin: 0 auto; grid-template-columns: 1.35fr .8fr; grid-template-rows: 1fr; }
  .gps-recorder-panel{ display: grid; align-items: center; border-top: 0; border-left: 1px solid var(--color-border); }
}
/* Notification activity */
html:has(body.notifications-page){scrollbar-gutter:stable}
.notifications-shell{position:relative;max-width:640px;margin:0 auto;display:grid;gap:12px}
.notifications-head{display:flex;align-items:center;justify-content:space-between}
.notifications-head h1{margin:0}
.notification-load-line{position:absolute;left:0;right:0;top:-1rem;height:1px;overflow:hidden;opacity:0;background:transparent;transition:opacity .22s ease;z-index:1}
.notification-load-line::after{content:"";position:absolute;inset:0 auto 0 0;width:46%;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--brand) 58%,transparent),color-mix(in srgb,var(--violet) 52%,transparent),transparent);transform:translateX(-110%);will-change:transform}
.notifications-shell.is-loading .notification-load-line{opacity:.72}
.notifications-shell.is-loading .notification-load-line::after{animation:notificationLoadSweep 1.25s linear infinite}
@keyframes notificationLoadSweep{to{transform:translateX(240%)}}
@media(prefers-reduced-motion:reduce){.notifications-shell.is-loading .notification-load-line::after{animation:none;transform:none;width:100%}}
@media(max-width:1023px){.notification-load-line{position:fixed;top:var(--appbar-height,72px);left:0;right:0;width:100vw;z-index:39}}
.notification-filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.notification-filters::-webkit-scrollbar{display:none}
.notification-filters button{flex:0 0 auto;min-height:36px;padding:0 14px;border:0;border-radius:999px;background:var(--soft);color:var(--ink);font:inherit;font-size:.875rem;font-weight:600;line-height:1;cursor:pointer;transition:background-color .15s ease,color .15s ease}
.notification-filters button.active{background:var(--ink);color:var(--bg)}
.notification-list{display:block;overflow:visible;overflow-anchor:none;border:0;border-radius:0;background:transparent}
.notification-section{margin:20px 0 4px;padding:0 12px;color:var(--ink);font-size:1rem;font-weight:700;line-height:1.3;letter-spacing:0;text-transform:none}
.notification-section:first-child{margin-top:4px}
.notification-item{margin:0;padding:0;overflow:visible;border:0;border-radius:var(--radius-md);background:transparent;box-shadow:none;transition:background-color .15s ease}
.notification-item.is-unread{background:color-mix(in srgb,var(--brand) 6%,transparent)}
.notification-item:active{background:color-mix(in srgb,var(--ink) 8%,transparent)}
@media(hover:hover){.notification-item:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}.notification-item.is-unread:hover{background:color-mix(in srgb,var(--brand) 9%,transparent)}}
.notification-item form{margin:0;padding:0;border:0;border-radius:inherit;background:transparent;box-shadow:none}
.notification-open{width:100%;min-height:72px;display:grid;grid-template-columns:48px minmax(0,1fr) 8px;align-items:center;gap:12px;padding:10px 12px;border:0;border-radius:inherit;background:transparent;color:var(--ink);text-align:left;font-weight:400;cursor:pointer}
.notification-avatar{position:relative;box-sizing:border-box;flex:none;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--soft);font-size:.875rem;font-weight:700;line-height:1;overflow:visible}
.notification-avatar-initials{display:grid;place-items:center;width:100%;height:100%;border-radius:50%}
.notification-avatar img{display:block;width:100%;height:100%;aspect-ratio:1;border-radius:50%;object-fit:cover}
.notification-avatar svg,.notification-avatar-emoji{position:absolute;right:-4px;bottom:-4px;z-index:2;box-sizing:border-box;width:22px;height:22px;border:2px solid var(--bg);border-radius:50%}
.notification-avatar svg{padding:3px;background:var(--brand);color:#fff;overflow:visible}
.notification-avatar-emoji{display:grid;place-items:center;background:var(--soft);font-size:.7rem;line-height:1}
.notification-item--reaction .notification-avatar svg{background:var(--color-danger);fill:currentColor}
.notification-copy{min-width:0;display:grid;gap:2px}
.notification-title,.notification-snippet{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.notification-title{-webkit-line-clamp:3;color:var(--ink);font-size:.9375rem;line-height:1.35}
.notification-title strong{font-weight:700}
.notification-snippet{-webkit-line-clamp:2;color:var(--muted);font-size:.875rem;line-height:1.35}
.notification-copy time{color:var(--muted);font-size:.8125rem;line-height:1.35}
.notification-dot{width:8px;height:8px;border-radius:50%;background:var(--brand);opacity:0;transition:opacity .2s ease}
.notification-item.is-unread .notification-dot{opacity:1}
.notification-empty{display:grid;justify-items:center;gap:8px;padding:48px 16px;color:var(--muted)}
.notification-empty svg{width:32px;height:32px}.notification-more{padding:16px;text-align:center}
@media(max-width:1023px){body.app[data-authenticated="1"] .notifications-shell{width:100vw;max-width:100vw;margin-inline:calc(50% - 50vw)}body.app[data-authenticated="1"] .notifications-head,body.app[data-authenticated="1"] .notification-filters{padding-inline:16px}body.app[data-authenticated="1"] .notification-section{padding-inline:16px}body.app[data-authenticated="1"] .notification-item{width:100%;margin:0;border-radius:0}body.app[data-authenticated="1"] .notification-open{padding-inline:16px}}

/* ──────────────────────────────────────────────────────────────────────────
   Exercise favourites and tags. Favourites are per library row, which is
   already per user, so the star is private to whoever is looking at it.
   ────────────────────────────────────────────────────────────────────────── */
/* The star is the control. The tick box beside it said the same thing twice,
   and .exercise-tag-filters label sets display:grid, which outranked this and
   stacked box, star and text down the page as a full-width block. Scoped to
   beat that rule, and the box is hidden from sight but left in the page so it
   still takes focus and still answers the keyboard. */
/* The two "show me mine" filters share one row above the tag dropdowns. The
   row spans the grid; the chips inside size to their own content, so they sit
   together instead of each claiming a full-width line of its own. */
.exercise-tag-filters .exercise-filter-quick{
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}
.exercise-tag-filters .exercise-favourites-toggle{
  display: inline-flex;
  /* .routine-page label sets flex-direction: column for the stacked
     label-over-field pattern this chip is not. Without restating the
     direction the icon sat above the text and the chip came out tall and
     narrow, which is the opposite of what a chip should be. */
  flex-direction: row;
  align-items: center;
  gap: .35rem;
  width: auto;
  padding: .3rem .6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
/* Selected has to read at a glance: the amber star alone was easy to miss on a
   chip this size, so the whole chip takes the accent. */
.exercise-tag-filters .exercise-favourites-toggle:has(input:checked){
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand) 38%, transparent);
}
@media (hover: hover){
  .exercise-tag-filters .exercise-favourites-toggle:hover{ color: var(--ink); }
}
.exercise-favourites-toggle input{
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.exercise-favourites-toggle .nav-icon-lucide,
.exercise-favourites-toggle svg{ width: 14px; height: 14px; flex: 0 0 auto; }
/* A general sibling, because the icon markup is replaced at runtime. */
.exercise-favourites-toggle input:checked ~ .nav-icon-lucide,
.exercise-favourites-toggle input:checked ~ svg{ color: #f59e0b; fill: #f59e0b; }
.exercise-tag-filters .exercise-favourites-toggle:has(input:checked){ color: var(--ink); }
.exercise-favourites-toggle input:focus-visible ~ .nav-icon-lucide,
.exercise-favourites-toggle input:focus-visible ~ svg{
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

.exercise-row-actions{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.exercise-row-favourite{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--ui-btn-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.exercise-row-favourite .nav-icon-lucide{ width: 16px; height: 16px; }
.exercise-row-favourite:hover,
.exercise-row-favourite:focus-visible{ color: var(--ink); }
.exercise-row-favourite.is-favourite{ color: #f59e0b; }
.exercise-row-favourite.is-favourite .nav-icon-lucide{ fill: #f59e0b; }

.exercise-favourite-btn .nav-icon-lucide{ width: 15px; height: 15px; }
.exercise-favourite-btn.is-favourite .nav-icon-lucide{ color: #f59e0b; fill: #f59e0b; }

.plan-exercise-search-result-star{
  width: 14px;
  height: 14px;
  color: #f59e0b;
  fill: #f59e0b;
  flex-shrink: 0;
}

.exercise-tag-fields{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.exercise-tag-fields label{ display: grid; gap: 4px; min-width: 0; font-size: .875rem; }
.exercise-tag-fields select{ width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 700px){
  .exercise-tag-fields{ grid-template-columns: minmax(0, 1fr); }
}

/* ──────────────────────────────────────────────────────────────────────────
   Stats and library: one box language.

   Tiles were a single full-width column on a phone, so one number filled a
   card the height of a paragraph, and tiles bordered inside a bordered section
   drew a box within a box down the whole page. Tiles now sit two-up and read
   as surfaces inside their section, which owns the only border.
   ────────────────────────────────────────────────────────────────────────── */
.progress-summary-grid{
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.progress-summary-card{
  padding: .85rem .95rem;
  gap: .3rem;
  align-content: start;
}
.progress-summary-card strong{
  font-size: 1.5rem;
  line-height: 1.1;
}
.progress-summary-card .muted,
.progress-summary-card small{
  font-size: .8rem;
  line-height: 1.3;
}
.progress-summary-kicker{
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.progress-summary-kicker .nav-icon-lucide{ width: 14px; height: 14px; }

/* A tile inside a section is a surface, not a second card: the section keeps
   the border so a group of tiles reads as one block. */
.progress-section .progress-summary-card{
  border-color: transparent;
  background: var(--soft);
}

/* The empty state was 200px of dashed outline for one sentence. */
.progress-empty-state{
  min-height: 0;
  padding: 1.5rem 1rem;
  gap: .35rem;
}
.progress-empty-state.compact{ min-height: 0; padding: 1.1rem 1rem; }

@media (max-width: 620px){
  /* Two-up, not one: a phone fits two tiles comfortably and the page stops
     being a single column of near-empty boxes. */
  .progress-summary-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
  }
  .progress-summary-card{ padding: .75rem .8rem; }
  .progress-summary-card strong{ font-size: 1.35rem; }
  .progress-section{ padding: 1rem; }
}

/* Library rows: the icon, the name and the actions on one line, with the
   category under the name rather than trailing it into an awkward wrap. */
.exercise-row-summary .library-plan-main{
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.exercise-row-summary .library-plan-main > div{ min-width: 0; }
.exercise-row-title-line{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  min-width: 0;
}
.exercise-row-title-line strong{
  min-width: 0;
  overflow-wrap: anywhere;
}
.exercise-row-icon{ flex-shrink: 0; }


/* ──────────────────────────────────────────────────────────────────────────
   Button finish — deliberately the last rule in this file.

   Five earlier attempts to do this through the token system were defeated by
   successive layers that paint buttons directly with !important: a glossy
   gradient block at (0,9,7), a light-mode "outline lock" hardcoding
   #0f172a borders, and several :is() blocks forcing padding and background.
   Each fix resolved correctly in isolation and still changed nothing on the
   device, because something later and heavier repainted it.

   So this stops competing. `html:not(#_)` contributes id-level specificity
   without matching an id, the trick this file already relies on elsewhere for
   tie-breaking, making this (1,x,y) and unreachable by any rule above that has
   no id of its own. Buttons that genuinely own an id, and icon-only or
   navigation controls, are excluded so their own styling survives.

   This is a sledgehammer and the honest fix is to collapse those layers into
   one. That is a much larger change than the button restyle asked for, so it
   is flagged rather than attempted here.
   ────────────────────────────────────────────────────────────────────────── */
html:not(#_) body.app[data-authenticated="1"] :is(.pill-link, .btn, .button, a.button, a[role="button"], button, .secondary-button, .secondary):not(#macropro-calculate):not(#macropro-export):not(#barcode-ocr-trigger):not(#nutrition-ocr-trigger):not(#coach-payment-share-send-btn):not(#clear-local-cache-btn):not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):not(.header-nav-link):not(.chat-fab):not(.dashboard-quick-fab):not(.off-plan-icon-btn):not(.progress-entry-icon-action):not(.progress-photo-icon-action):not(.subtle-edit-btn):not(.plan-fab-btn):not(.plan-exercise-search-result):not(.select-sheet-option):not(.exercise-info-btn):not(.exercise-row-favourite):not(.library-row-edit-icon):not(.exercise-category-toggle):not(.range-toggle-btn):not(.set-effort-info):not(.exercise-template-notes-toggle):not(.progress-heatmap-cell):not(.progress-subtab-btn):not(.progress-range-btn):not(.feed-comment-inline-icon):not(.feed-comment-submit):not(.notification-open):not(.notification-filters button):not(.notifications-clear):not(.muscle-analytics .range-toggle > button):not(.stats-top-periods > button):not(.pb-row):not(.dashboard-card-handle):not(.upgrade-cta){
  /* A button is a fill and nothing else. */
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  background-image: none !important;
  background-color: var(--ui-btn-bg) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  border-radius: var(--ui-btn-radius) !important;
  padding: var(--ui-btn-padding-y) var(--ui-btn-padding-x) !important;
  font-size: var(--ui-btn-font-size) !important;
  font-weight: var(--ui-btn-font-weight) !important;
  min-height: var(--ui-btn-min-height) !important;
}

html:not(#_) body.app[data-authenticated="1"] :is(.pill-link, .btn, .button, a.button, a[role="button"], button, .secondary-button, .secondary):not(#macropro-calculate):not(#macropro-export):not(#barcode-ocr-trigger):not(#nutrition-ocr-trigger):not(#coach-payment-share-send-btn):not(#clear-local-cache-btn):not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.pricing-carousel-indicator):not(.header-nav-link):not(.chat-fab):not(.dashboard-quick-fab):not(.off-plan-icon-btn):not(.progress-entry-icon-action):not(.progress-photo-icon-action):not(.subtle-edit-btn):not(.plan-fab-btn):not(.plan-exercise-search-result):not(.select-sheet-option):not(.exercise-info-btn):not(.exercise-row-favourite):not(.library-row-edit-icon):not(.exercise-category-toggle):not(.range-toggle-btn):not(.set-effort-info):not(.exercise-template-notes-toggle):not(.progress-heatmap-cell):not(.progress-subtab-btn):not(.progress-range-btn):not(.feed-comment-inline-icon):not(.feed-comment-submit):not(.notification-open):not(.notification-filters button):not(.notifications-clear):not(.muscle-analytics .range-toggle > button):not(.stats-top-periods > button):not(.pb-row):not(.dashboard-card-handle):not(.upgrade-cta):is(:hover, :focus, :focus-visible){
  background-color: var(--ui-btn-hover-bg) !important;
  background: var(--ui-btn-hover-bg) !important;
}

html:not(#_) body.app[data-authenticated="1"] :is(.pill-link, .btn, .button, a.button, a[role="button"], button, .secondary-button, .secondary):not(#macropro-calculate):not(#macropro-export):not(#barcode-ocr-trigger):not(#nutrition-ocr-trigger):not(#coach-payment-share-send-btn):not(#clear-local-cache-btn):not(.appbar-icon-btn):not(.plain-close-icon):not(.story-ring):not(.story-add):not(.story-strip-item):not(.story-viewer-btn):not(.story-tap):not(.athlete-story-thumb):not(.feed-me-story-btn):not(.header-nav-link):not(.chat-fab):not(.dashboard-quick-fab):not(.feed-comment-submit):not(.notification-open):active{
  transform: scale(.975) !important;
}

/* Search results share the flat button finish, but keep content-sized rows. */
html:not(#_) body.app[data-authenticated="1"] :is(.workout-builder-page, .off-plan-autocomplete) .plan-exercise-search-result,
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-card{
  background: var(--ui-btn-default-bg) !important;
  background-image: none !important;
  color: var(--ui-btn-default-fg) !important;
  border: 0 !important;
  border-radius: var(--ui-btn-radius) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transition: background-color .18s ease, transform .16s ease;
}
html:not(#_) body.app[data-authenticated="1"] :is(.workout-builder-page, .off-plan-autocomplete) .plan-exercise-search-result:is(:hover, :focus-visible, :active, .is-selected),
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-card:has(> .exercise-row-summary:is(:hover, :focus-visible, :active)){
  background: var(--ui-btn-default-hover-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.workout-builder-page, .off-plan-autocomplete) .plan-exercise-search-result:focus-visible,
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-summary:focus-visible{
  outline: 2px solid var(--brand) !important;
  outline-offset: 2px;
}
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-summary:active{
  transform: scale(.975);
}
html:not(#_) body.app[data-authenticated="1"] :is(.workout-builder-page, .off-plan-autocomplete) .plan-exercise-search-result-name,
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-summary,
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-title-line strong{
  color: inherit !important;
  text-shadow: none !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.workout-builder-page, .off-plan-autocomplete) .plan-exercise-search-result-icon,
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-icon{
  background: var(--ui-btn-default-hover-bg) !important;
  color: var(--ui-btn-default-fg) !important;
  border: 0 !important;
  border-radius: var(--ui-btn-radius) !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce){
  html:not(#_) body.app[data-authenticated="1"] :is(.pill-link, .btn, .button, a.button, a[role="button"], button, .secondary-button, .secondary):active,
  html:not(#_) body.app[data-authenticated="1"] .coach-library-page .exercise-row-summary:active{
    transform: none !important;
  }
}

/* Nutrition date input overflowed the screen: it is a grid item, and a grid
   item keeps min-width:auto, so it refuses to shrink below the intrinsic width
   a date input reports regardless of the minmax(0, 1fr) track. It spans the row
   on purpose, so give it the row and let it shrink. */
html:not(#_) body.app[data-authenticated="1"] .page-actions.nutrition-actions > *{
  min-width: 0 !important;
}
/* width:100% resolves against the content box, and WebKit renders a date input
   through shadow DOM that keeps content-box whatever the author says, so the
   padding was added on top of the track and pushed the right edge off screen.
   Letting grid stretch it instead sizes the border box to the track. */
html:not(#_) body.app[data-authenticated="1"] .page-actions.nutrition-actions > #nutrition-date{
  grid-column: 1 / -1;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch !important;
}

/* The unread badge sits in the chat button's flow, so it shifted the icon off
   centre. Taking it out of flow leaves the icon alone in a centred box. */
html:not(#_) body.app[data-authenticated="1"] .chat-fab{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  /* The shared button gap still applied here, and a gap after the only
     in-flow child shifts it off centre by half the gap. */
  gap: 0 !important;
}
html:not(#_) body.app[data-authenticated="1"] .chat-fab .nav-badge-wrap{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Icon spacing comes from the button's gap. A margin-right on the icon as well
   double-spaces icon+label buttons, and on an icon-only button it shifts the
   icon off centre by half the margin — which is what made the chat button and
   the Actions pill look wrong. */
html:not(#_) body.app[data-authenticated="1"] :is(.pill-link, .btn, .button, a.button, a[role="button"], button, .secondary-button, .secondary, .chat-fab, .plan-fab-btn) > :is([data-lucide], .nav-icon-lucide, svg){
  margin: 0 !important;
}

/* Keep the weight logger close control intact after the legacy icon resets. */
html:not(#_) body.app[data-authenticated="1"] .progress-weight-modal-card button.plain-close-icon:has(> .nav-icon-lucide[data-lucide="x"]){
  box-sizing:border-box !important;
  flex:0 0 40px !important;
  width:40px !important;
  min-width:40px !important;
  height:40px !important;
  min-height:40px !important;
  margin:0 !important;
  padding:0 !important;
  /* Borderless like every other close control; --ui-close-bg is a real fill,
     so the circle still reads without an outline. */
  border:0 !important;
  border-radius:50% !important;
  background:var(--ui-close-bg) !important;
  color:var(--ui-close-fg) !important;
  box-shadow:none !important;
  transform:none !important;
}
html:not(#_) body.app[data-authenticated="1"] .progress-weight-modal-card button.plain-close-icon:has(> .nav-icon-lucide[data-lucide="x"]):is(:hover, :focus, :focus-visible){
  border:0 !important;
  background:var(--ui-close-hover-bg) !important;
  color:var(--ui-close-hover-fg) !important;
  transform:none !important;
}

/* Personal bests "show more": the count and the control sit on one line, and
   stack on narrow screens rather than squeezing the label. */
.history-pb-more{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .75rem;
}
.history-pb-more .history-pb-footnote{
  margin: 0;
}
.history-pb-more-btn[hidden]{ display: none !important; }

/* Plan/week floating action button. It was held out of the rule above to keep
   its pill shape, which also left it on the old brand gradient with a border
   and a drop shadow — the last buttons in the app still carrying those. It is
   a primary action, so it takes the primary fill, flat, and keeps the pill. */
html:not(#_) body.app[data-authenticated="1"] .plan-fab-btn{
  background-image: none !important;
  background-color: var(--ui-btn-primary-bg) !important;
  background: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  /* Pinned, because light mode was giving it a 10px corner while dark kept
     the pill — the same control reading as two different shapes per theme. */
  border-radius: 999px !important;
}
html:not(#_) body.app[data-authenticated="1"] .plan-fab-btn:is(:hover, :focus, :focus-visible){
  background-color: var(--ui-btn-primary-hover-bg) !important;
  background: var(--ui-btn-primary-hover-bg) !important;
  box-shadow: none !important;
}
html:not(#_) body.app[data-authenticated="1"] .plan-fab-btn:active{
  transform: scale(.975) !important;
}

/* The panel's close button kept a 1px border and a 10px radius from its own
   lock rule, the only icon button in the app still doing either. */
html:not(#_) body.app[data-authenticated="1"] .plan-fab-close,
html:not(#_) body.app[data-authenticated="1"] .plan-fab-panel-actions button.plan-fab-close{
  border: 0 !important;
  border-radius: var(--ui-btn-radius) !important;
  box-shadow: none !important;
}

/* Discard sits apart from the two keep-it actions, above a hairline, so it is
   not reachable by the same thumb sweep as "Exit and complete". */
.guided-exit-discard{
  margin: .9rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}
.guided-exit-discard-btn{
  width: 100%;
}

/* Icon-only actions — trash, shuffle, close, app bar — follow the same surface
   language as the labelled buttons: a fill and nothing else, on the same
   corner. Their own sizing is deliberate and left alone. Several had picked up
   a gradient, a border and a shadow from the generic button layers despite
   their own rules asking for none of it. */
html:not(#_) body.app[data-authenticated="1"] :is(
  .off-plan-icon-btn, .plain-close-icon, .appbar-icon-btn, .subtle-edit-btn,
  .progress-entry-icon-action, .plan-fab-icon-btn,
  .icon-btn, .btn-icon-only,
  .messages-sidebar-compose, .messages-sidebar-announcements,
  .exercise-row-favourite, .exercise-info-btn
){
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-radius: var(--ui-btn-radius) !important;
}
/* The chat header's bell and compose controls are spans with role="button",
   so no button rule ever reached them and they kept a glossy raised chip.
   They are icon buttons like any other: the shared subtle fill, flat. */
html:not(#_) body.app[data-authenticated="1"] :is(.messages-sidebar-compose, .messages-sidebar-announcements){
  background-color: var(--ui-btn-light-bg) !important;
  background: var(--ui-btn-light-bg) !important;
  color: var(--ui-btn-light-fg) !important;
}
html[data-theme="dark"]:not(#_) body.app[data-authenticated="1"] :is(.messages-sidebar-compose, .messages-sidebar-announcements){
  background-color: var(--ui-btn-dark-bg) !important;
  background: var(--ui-btn-dark-bg) !important;
  color: var(--ui-btn-dark-fg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.messages-sidebar-compose, .messages-sidebar-announcements):is(:hover, :focus, :focus-visible){
  background-color: var(--ui-btn-light-hover-bg) !important;
  background: var(--ui-btn-light-hover-bg) !important;
}
html[data-theme="dark"]:not(#_) body.app[data-authenticated="1"] :is(.messages-sidebar-compose, .messages-sidebar-announcements):is(:hover, :focus, :focus-visible){
  background-color: var(--ui-btn-dark-hover-bg) !important;
  background: var(--ui-btn-dark-hover-bg) !important;
}

/* These are transparent by their own definition; keep them that way so the
   icon reads against the row rather than sitting on a grey chip. */
html:not(#_) body.app[data-authenticated="1"] :is(.off-plan-icon-btn, .plain-close-icon, .subtle-edit-btn, .exercise-row-favourite, .exercise-info-btn){
  background-color: transparent !important;
  background: transparent !important;
}
/* The star and info icons sit bare beside the exercise name: no chip, just
   the icon brightening on hover. */
html:not(#_) body.app[data-authenticated="1"] :is(.exercise-row-favourite, .exercise-info-btn):is(:hover, :focus-visible){
  color: var(--ink) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(
  .off-plan-icon-btn, .plain-close-icon, .appbar-icon-btn, .subtle-edit-btn,
  .progress-entry-icon-action, .plan-fab-icon-btn
):active{
  transform: scale(.975) !important;
}

/* Actions popup menu rows. These were outlined and still carried the glossy
   surface image with an inset highlight — the panel was hidden, so the button
   sweep never measured them. They are buttons like any other: a flat fill on
   the system corner, with the destructive row tinted rather than outlined. */
/* These rows include plain anchors, which none of the button remaps target, so
   --ui-btn-bg was never defined on them and the var() collapsed to nothing.
   Declaring the tokens here gives them the same surface as a real button. */
html:not(#_) body.app[data-authenticated="1"] :is(.fab-menu-item, .fab-menu-btn, .week-workout-picker-option, .progress-measurements-cta){
  --ui-btn-bg: var(--ui-btn-light-bg);
  --ui-btn-fg: var(--ui-btn-light-fg);
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg);
}
html[data-theme="dark"]:not(#_) body.app[data-authenticated="1"] :is(.fab-menu-item, .fab-menu-btn, .week-workout-picker-option, .progress-measurements-cta){
  --ui-btn-bg: var(--ui-btn-dark-bg);
  --ui-btn-fg: var(--ui-btn-dark-fg);
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg);
}
html:not(#_) body.app[data-authenticated="1"] :is(.fab-menu-item, .fab-menu-btn, .week-workout-picker-option, .progress-measurements-cta){
  background-image: none !important;
  background-color: var(--ui-btn-bg) !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-radius: var(--ui-btn-radius) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.fab-menu-item, .fab-menu-btn, .week-workout-picker-option, .progress-measurements-cta):is(:hover, :focus, :focus-visible){
  background-image: none !important;
  background-color: var(--ui-btn-hover-bg) !important;
  background: var(--ui-btn-hover-bg) !important;
}
/* The destructive row sets the tokens rather than painting over them. The
   shared button rule carries a long :not() chain and so outranks anything
   scoped this tightly; whichever rule ends up painting, it paints the tint. */
html:not(#_) body.app[data-authenticated="1"] .fab-menu-btn.fab-menu-btn--danger{
  --ui-btn-bg: var(--ui-btn-danger-bg);
  --ui-btn-fg: var(--ui-btn-danger-fg);
  --ui-btn-hover-bg: var(--ui-btn-danger-hover-bg);
  --ui-btn-border: transparent;
  --ui-btn-hover-border: transparent;
}
html:not(#_) body.app[data-authenticated="1"] .fab-menu-btn.fab-menu-btn--danger .nav-icon-lucide{
  color: currentColor !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.fab-menu-item, .fab-menu-btn, .week-workout-picker-option, .progress-measurements-cta):active{
  transform: scale(.975) !important;
}

/* Shared training anatomy, Stats and compact feed summaries. */
.muscle-analytics {
  --muscle-low: var(--carb-color, #22c55e);
  --muscle-moderate: var(--warning, #eab308);
  --muscle-elevated: var(--fat-color, #f97316);
  --muscle-high: var(--color-danger);
  margin-block: 24px;
  padding-block: 24px;
  border-block: 1px solid var(--color-border);
}
.muscle-panel-head, .muscle-controls, .muscle-controls form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.muscle-panel-head h3 { margin: 0; }
.muscle-controls { justify-content: flex-start; margin-block: 20px; }
.muscle-controls label { display: grid; gap: 4px; min-width: 0; }
.muscle-controls select, .muscle-controls input { width: 100%; min-width: 0; }
.muscle-controls form { align-items: end; }
.muscle-controls [hidden] { display: none !important; }
.muscle-analytics-layout { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr); gap: 32px; }
.muscle-body-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; min-height: 280px; }
.muscle-body-map figure { margin: 0; min-width: 0; text-align: center; }
.muscle-body-map svg { display: block; width: 100%; height: 420px; }
.muscle-body-map figcaption { color: var(--color-text-secondary); font-size: .85rem; }
.muscle-region { fill: var(--color-border); stroke: var(--color-bg-primary); stroke-width: 2; transition: fill .2s ease; }
.muscle-region.is-muscle { cursor: pointer; }
.muscle-region.is-muscle:hover, .muscle-region.is-muscle:focus { stroke: var(--color-text-primary); stroke-width: 4; outline: none; }
.muscle-region.is-muscle.is-selected { stroke: var(--color-text-primary); stroke-width: 5; }
/* Training volume is a magnitude, so it takes one hue, light to dark: the
   brand lime, stepped rather than mixed toward the surface:
   mixing put the faintest trained muscle at 1.3:1 against the card, which is
   not far off invisible. Each step is a chosen value that clears a 2:1 floor
   against its own surface. Light mode darkens with more training; dark mode
   brightens toward the brand lime, so heavy training stands out on black. */
:root{
  --muscle-training-1: #a2e13c;
  --muscle-training-2: #85ba31;
  --muscle-training-3: #678f26;
  --muscle-training-4: #496817;
}
html[data-theme="dark"]{
  --muscle-training-1: #3E5A14;
  --muscle-training-2: #5E8A1A;
  --muscle-training-3: #86C22A;
  --muscle-training-4: #B5F542;
}
.muscle-region.muscle-level-1 { fill: var(--muscle-training-1); }
.muscle-region.muscle-level-2 { fill: var(--muscle-training-2); }
.muscle-region.muscle-level-3 { fill: var(--muscle-training-3); }
.muscle-region.muscle-level-4 { fill: var(--muscle-training-4); }
[data-mode="fatigue"] .muscle-region.muscle-level-1, .muscle-fatigue-1 { fill: var(--muscle-low); background: var(--muscle-low); }
[data-mode="fatigue"] .muscle-region.muscle-level-2, .muscle-fatigue-2 { fill: var(--muscle-moderate); background: var(--muscle-moderate); }
[data-mode="fatigue"] .muscle-region.muscle-level-3, .muscle-fatigue-3 { fill: var(--muscle-elevated); background: var(--muscle-elevated); }
[data-mode="fatigue"] .muscle-region.muscle-level-4, .muscle-fatigue-4 { fill: var(--muscle-high); background: var(--muscle-high); }
.muscle-bars { display: grid; gap: 8px; max-height: 500px; overflow-y: auto; padding-right: 4px; }
.muscle-effective-sets-panel{ min-width:0; }
.muscle-effective-sets-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.muscle-effective-sets-info{ position:relative; }
.muscle-effective-sets-trigger,
.muscle-effective-sets-trigger:is(:hover, :focus, :focus-visible, :active){
  display:grid;
  place-items:center;
  width:2.5rem;
  min-width:2.5rem;
  height:2.5rem;
  min-height:2.5rem;
  padding:0;
  list-style:none;
  color:var(--color-text-secondary);
}
.muscle-effective-sets-trigger::-webkit-details-marker{ display:none; }
.muscle-effective-sets-trigger .nav-icon-lucide{ width:1rem; height:1rem; }
.muscle-effective-sets-copy{
  position:absolute;
  z-index:6;
  top:calc(100% + 8px);
  right:0;
  width:min(320px, calc(100vw - 48px));
  padding:12px;
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  background:var(--color-bg-secondary);
  box-shadow:var(--shadow);
}
.muscle-effective-sets-copy p{
  margin:6px 0 0;
  color:var(--color-text-secondary);
  font-size:.82rem;
  line-height:1.5;
}
html:not(#_) body.app[data-authenticated="1"] #muscle-analytics .muscle-bars button.muscle-bar-row {
  --ui-btn-min-height: 76px;
  --ui-btn-padding-y: 8px;
  --ui-btn-padding-x: 8px;
  --ui-btn-font-size: .85rem;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  text-align: left;
  white-space: normal;
  width: 100%;
  padding: 8px !important;
  min-height: 76px !important;
  height: auto !important;
  overflow: visible !important;
  font-size: .85rem;
  border-radius: var(--radius-sm);
}
.muscle-bar-row > span:first-child { overflow-wrap: anywhere; }
.muscle-bar-row small, .muscle-bar-track { grid-column: 1 / -1; }
.muscle-bar-track { display: flex; width: 100%; height: 8px; background: var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.muscle-bar-track > span { display: block; height: 100%; }
/* The bars read from the same ramp, so a muscle's colour on the map and in its
   bar are the one scale rather than two that happen to look alike. */
.muscle-bar-primary { background: var(--muscle-training-4); }
.muscle-bar-secondary { background: var(--muscle-training-3); }
.muscle-bar-stabiliser { background: var(--muscle-training-2); }
.muscle-detail:empty { display: none; }
.muscle-detail { margin-top: 24px; border-top: 1px solid var(--color-border); }
.muscle-quick-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  min-height: 24px;
  font-size: .85rem;
}
.muscle-quick-detail-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.muscle-quick-detail-row span { color: var(--color-text-secondary); }
.muscle-contributor { display: grid; gap: 4px; padding-block: 12px; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.exercise-muscle-preview { margin-block: 12px 20px; }
.exercise-muscle-detail { display: grid; gap: 8px; }
.exercise-muscle-detail:empty { display: none; }
.exercise-muscle-detail-row {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-secondary);
}
.exercise-muscle-detail-row span { font-size: .82rem; }
.muscle-coverage { margin-top: 20px; }
.muscle-coverage p, .muscle-legend { font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.muscle-fatigue-days { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.muscle-fatigue-days[hidden] { display: none; }
.muscle-analytics button[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: -2px; }
.muscle-mapping-grid { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px 12px; margin-block: 12px; }
.muscle-mapping-grid label { min-width: 0; overflow-wrap: anywhere; }
.muscle-mapping-grid input, .muscle-mapping-grid select { width: 100%; min-width: 0; }
.muscle-set-options { margin-block: 4px 12px; font-size: .85rem; }
.muscle-set-options input[type="checkbox"] { width: auto; min-width: 0; }
.set-effort{ min-width: 0; }
.set-effort-summary{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .5rem; padding-block: .4rem; cursor: pointer; list-style: none; }
.set-effort-summary::-webkit-details-marker{ display: none; }
.set-effort-heading{ display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.set-effort-heading .nav-icon-lucide{ width: 1rem; height: 1rem; transition: transform .15s ease; }
.set-effort[open] > summary .set-effort-heading .nav-icon-lucide{ transform: rotate(90deg); }
.set-effort-heading small, .set-effort-recorded{ color: var(--muted); font-size: .8rem; font-weight: 400; }
.set-effort-fields{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding-block: .4rem; }
.set-effort-field{ min-width: 0; }
.set-effort-label{ display: flex; align-items: center; justify-content: space-between; gap: .2rem; min-height: 2rem; font-size: .8rem; font-weight: 600; }
.set-effort-label label{ margin: 0; min-width: 0; }
.set-effort-fields select{ width: 100%; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: .5rem .35rem; font-size: .8rem; }
.set-effort-value{ display: block; font-size: .8rem; overflow-wrap: anywhere; }
.set-effort-help{ display: block; margin-top: .4rem; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.set-effort-help[hidden]{ display: none !important; }
html:not(#_) body.app[data-authenticated="1"] button.set-effort-info{
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 2rem;
  width: 2rem; height: 2rem; min-width: 2rem; min-height: 2rem !important;
  padding: 0 !important; border: 0 !important; box-shadow: none !important;
  background: transparent !important; color: var(--muted) !important; border-radius: var(--ui-btn-radius) !important;
}
.set-effort-info .nav-icon-lucide{ width: 1rem; height: 1rem; }
.history-recorded-sets{ width: 100%; min-width: 0; margin-top: .5rem; }
.history-recorded-set{ padding-block: .5rem; border-top: 1px solid var(--border); }
.history-set-values{ display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; font-size: .85rem; }
#day-exercises[data-edit-sets="1"] .exercise-row.is-complete > form.exercise-actuals{ display: block !important; }
.muscle-fatigue-note { font-size: .85rem; color: var(--color-text-secondary); }
.muscle-fatigue-note[hidden] { display: none !important; }
.feed-muscle-summary { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: center; margin-block: 12px; }
.feed-muscle-summary .muscle-body-map { min-height: 0; gap: 4px; }
.feed-muscle-summary .muscle-body-map svg { height: 136px; }
.feed-muscle-summary figcaption { display: none; }
.feed-muscle-summary p { margin-block: 4px; font-size: .85rem; overflow-wrap: anywhere; }
.feed-muscle-summary .feed-muscle-quick-detail { margin-top: 8px; font-size: .78rem; line-height: 1.4; }
.exercise-tag-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  /* The quick-filter chips are the first thing in this grid and sat hard
     against the search box that opens it. Spacing the block, not the chips,
     keeps every host of this partial separated the same way. */
  margin-top: 12px;
  flex-basis: 100%;
  width: 100%;
  min-width: 0;
}
.exercise-tag-filters label { display: grid; gap: 4px; min-width: 0; font-size: .875rem; }
.exercise-tag-filters select { width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 700px) {
  .exercise-tag-filters { grid-template-columns: minmax(0, 1fr); }
  .muscle-analytics-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .muscle-body-map svg { height: 300px; }
  .muscle-bars { max-height: 340px; }
  .muscle-controls > label, .muscle-controls form { flex: 1 1 140px; }
  .muscle-controls form label { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .muscle-region { transition: none; }
}

.exercise-muscle-fields{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.exercise-muscle-fields label{ min-width: 0; }
.exercise-muscle-fields select{ width: 100%; min-width: 0; max-width: 100%; }
/* Muscle associations is part of the editor, not a fold-out. */
.muscle-mapping-section{ display: grid; gap: 12px; margin-top: 16px; }
.muscle-mapping-title{ margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.muscle-mapping-section + .exercise-actions{ margin-top: 16px; }
@media (max-width: 700px){
  .exercise-muscle-fields{ grid-template-columns: minmax(0, 1fr); }
}

/* ──────────────────────────────────────────────────────────────────────────
   Stats filtering.

   The range filter and the section tabs were rows of filled buttons, so four
   chunky boxes competed with the data they filter. Both become one segmented
   control: a single track, with only the chosen segment filled. These carry
   html:not(#_) because the shared button rule paints .pill-link with
   !important at id-level weight, and this is the exception to it.
   ────────────────────────────────────────────────────────────────────────── */
html:not(#_) body.app[data-authenticated="1"] .progress-range-filter{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--soft);
}
html:not(#_) body.app[data-authenticated="1"] .progress-range-filter > button{
  background: transparent !important;
  background-color: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 999px !important;
  padding: .4rem .85rem !important;
  min-height: 0 !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
}
html:not(#_) body.app[data-authenticated="1"] .progress-range-filter > button:is(:hover, :focus-visible){
  background: transparent !important;
  background-color: transparent !important;
  color: var(--ink) !important;
}
html:not(#_) body.app[data-authenticated="1"] .progress-range-filter > button.active{
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
}

/* Section tabs: the same strip the week builder uses, so moving between views
   of your own data reads as navigation rather than as six actions. */
html:not(#_) body.app[data-authenticated="1"] .progress-subtabs{
  gap: .25rem;
  border-bottom: 1px solid var(--border);
}
html:not(#_) body.app[data-authenticated="1"] .progress-subtab-btn{
  background: transparent !important;
  background-color: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: .55rem .7rem !important;
  min-height: 0 !important;
  font-size: .85rem !important;
  font-weight: 600 !important;
  margin-bottom: -1px !important;
  flex: 0 0 auto;
}
html:not(#_) body.app[data-authenticated="1"] .progress-subtab-btn:is(:hover, :focus-visible){
  background: transparent !important;
  background-color: transparent !important;
  color: var(--ink) !important;
}
html:not(#_) body.app[data-authenticated="1"] .progress-subtab-btn.active{
  color: var(--ink) !important;
  border-bottom-color: var(--brand) !important;
}
html:not(#_) body.app[data-authenticated="1"] .progress-subtab-btn .nav-icon-lucide{
  width: 15px;
  height: 15px;
}

/* One card surface for Stats and the library.

   These two pages each had their own box: Stats drew rgba(11,18,36,.44) with
   a blue-grey hairline at 22px, the library panels a near-black gradient with
   a cyan border at 18px, and every other card in the app used the shared
   tokens. Three surfaces on adjacent screens is what made the pages look
   untidy rather than any one of them being wrong, so they all read from the
   card tokens now and follow the theme with everything else. */
html:not(#_) body.app[data-authenticated="1"] :is(.progress-section, .progress-summary-card),
html:not(#_) body.app[data-authenticated="1"] .coach-library-page .library-panel-modern{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* A tile inside a section stays a surface, not a second card. */
html:not(#_) body.app[data-authenticated="1"] .progress-section .progress-summary-card{
  background: var(--soft);
  border-color: transparent;
}
/* The section owns the depth; the tiles inside it stay flat. */
html:not(#_) body.app[data-authenticated="1"] .progress-section{
  box-shadow: var(--shadow-soft, none);
}
html:not(#_) body.app[data-authenticated="1"] .progress-summary-card{
  box-shadow: none;
}

/* Exercise info: the library's notes, opened from the row being worked. */
.exercise-info-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--ui-btn-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.exercise-info-btn .nav-icon-lucide{ width: 16px; height: 16px; }
.exercise-info-btn:hover,
.exercise-info-btn:focus-visible,
.exercise-info-btn.is-open{ color: var(--ink); }
.exercise-info-shell[hidden]{ display: none; }
.exercise-info-panel{
  margin-top: .5rem;
  padding: .75rem .85rem;
  border-radius: var(--ui-btn-radius);
  background: var(--soft);
  display: grid;
  gap: .5rem;
}
.exercise-info-tags{ display: flex; flex-wrap: wrap; gap: .35rem; }
.exercise-info-tag{
  padding: .18rem .5rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}
.exercise-info-notes{
  white-space: pre-wrap;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ink);
}
/* Open in library: a button, not a text link -- the way into this exercise's
   notes, muscles and tags. */
.exercise-info-panel .exercise-info-link{
  display:inline-flex; align-items:center; gap:6px; margin-top:10px; padding:.4rem .85rem;
  font-size:.85rem; font-weight:600; text-decoration:none; min-height:0;
}
.exercise-info-panel .exercise-info-link .nav-icon-lucide{ width:16px; height:16px; }
.exercise-info-panel .exercise-info-link .exercise-info-link-go{ width:14px; height:14px; opacity:.7; }

/* Muscle analytics mode: the same segmented control the range filter uses. */
html:not(#_) body.app[data-authenticated="1"] .muscle-analytics .range-toggle,
html:not(#_) body.app[data-authenticated="1"] .stats-top-card .stats-top-periods{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--soft);
}
html:not(#_) body.app[data-authenticated="1"] .muscle-analytics .range-toggle > button,
html:not(#_) body.app[data-authenticated="1"] .stats-top-card .stats-top-periods > button{
  background: transparent !important;
  background-color: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 999px !important;
  padding: .4rem .85rem !important;
  min-height: 0 !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
}
html:not(#_) body.app[data-authenticated="1"] .muscle-analytics .range-toggle > button[aria-pressed="true"],
html:not(#_) body.app[data-authenticated="1"] .stats-top-card .stats-top-periods > button[aria-pressed="true"]{
  background: var(--ui-btn-primary-bg) !important;
  background-color: var(--ui-btn-primary-bg) !important;
  color: var(--ui-btn-primary-fg) !important;
}

/* Measurements: a short list of numbers in a short list of boxes. */
.progress-measurements-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .6rem;
}
.progress-measurement-field{ display: grid; gap: .25rem; min-width: 0; }
.progress-measurement-field-label{ font-size: .8rem; font-weight: 600; color: var(--muted); }
.progress-measurement-input-wrap{ position: relative; display: block; }
.progress-measurement-input-wrap input{ width: 100%; padding-right: 2.6rem; }
.progress-measurement-unit{
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .75rem;
  color: var(--muted);
  pointer-events: none;
}
.progress-measurement-status{ margin-top: .5rem; min-height: 1.1em; font-size: .8rem; }
.muscle-controls[hidden]{ display: none !important; }
.history-exercise-note{ display: block; margin-top: .15rem; font-size: .82rem; white-space: pre-wrap; }

/* History is scan-first: the day stays compact until an exercise is opened. */
body.history-page .history-detail > header{
  margin-bottom:.65rem;
  padding-bottom:.65rem;
  border-bottom:1px solid var(--border);
}
body.history-page .history-metrics{
  grid-template-columns:repeat(auto-fit, minmax(90px, 1fr));
  gap:.45rem;
  margin-bottom:.7rem;
}
body.history-page .history-metrics > div{
  min-height:52px;
  min-width:0;
  padding:.45rem .55rem;
  border:1px solid var(--border);
  background:var(--soft);
  /* A long value (02:54:11) puts its label on the next line, not past the edge. */
  flex-wrap:wrap;
  align-content:center;
  row-gap:0;
  text-align:center;
}
body.history-page .history-metrics > div strong{
  font-size:1rem;
}
.history-session-note,
.history-exercise-note{
  display:flex;
  align-items:flex-start;
  gap:.5rem;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.45;
  white-space:pre-wrap;
}
.history-session-note{
  margin:.1rem 0 .75rem;
  padding:.55rem .65rem;
  border-left:2px solid var(--brand);
  background:var(--soft);
}
.history-session-note .nav-icon-lucide,
.history-exercise-note .nav-icon-lucide{
  width:.95rem;
  height:.95rem;
  margin-top:.12rem;
  flex:0 0 auto;
}
body.history-page .history-workout{
  margin-top:.6rem;
  padding:.85rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--color-bg-primary);
}
body.history-page .history-detail > header{
  position:relative;
  margin-bottom:.9rem;
}
.history-date-picker-trigger,
.history-date-picker-trigger:is(:hover, :focus, :focus-visible, :active){
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  width:auto;
  min-height:2.5rem;
  padding:.25rem .4rem;
  margin:-.25rem 0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:var(--color-text-primary);
  text-align:left;
  cursor:pointer;
  position:relative;
}
.history-date-picker-trigger .nav-icon-lucide{
  width:1rem;
  height:1rem;
  color:var(--brand);
}
.history-date-picker-input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
body.history-page .history-workout-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.25rem;
}
body.history-page .history-workout-heading,
body.history-page .history-workout-heading > div{
  display:flex;
  align-items:center;
  gap:.45rem;
  min-width:0;
}
body.history-page .history-workout-heading{
  align-items:baseline;
  flex-wrap:wrap;
}
.history-workout-actions{
  display:flex;
  align-items:center;
  gap:.25rem;
  margin-left:auto;
  flex:0 0 auto;
}
.history-workout-edit,
.history-workout-delete,
.history-workout-edit:is(:hover, :focus, :focus-visible, :active),
.history-workout-delete:is(:hover, :focus, :focus-visible, :active){
  display:grid;
  place-items:center;
  width:2.5rem;
  min-width:2.5rem;
  height:2.5rem;
  min-height:2.5rem;
  padding:0;
  color:var(--color-text-secondary);
}
.history-workout-delete,
.history-workout-delete:is(:hover, :focus, :focus-visible, :active){
  color:var(--color-danger, #ef4444);
}
.history-workout-edit .nav-icon-lucide,
.history-workout-delete .nav-icon-lucide{
  width:1rem;
  height:1rem;
}
.history-workout-preview{
  margin:.25rem 0 .55rem;
  font-size:.84rem;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.history-workout-disclosure > summary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  padding:.5rem 0 0;
  border-top:1px solid var(--border);
  color:var(--color-text-secondary);
  font-size:.82rem;
  font-weight:650;
  cursor:pointer;
  list-style:none;
}
.history-workout-disclosure > summary::-webkit-details-marker{
  display:none;
}
.history-workout-disclosure > summary::after{
  content:"";
  width:.42rem;
  height:.42rem;
  margin-top:-.18rem;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
}
.history-workout-disclosure[open] > summary::after{
  margin-top:.18rem;
  transform:rotate(225deg);
}
.history-less-label,
.history-workout-disclosure[open] .history-more-label{
  display:none;
}
.history-workout-disclosure[open] .history-less-label{
  display:inline;
}
.history-workout-disclosure[open] > summary{
  margin-top:.6rem;
  padding-top:.55rem;
}
body.history-page .history-exercises{
  gap:0;
  margin-top:.55rem;
  border-top:1px solid var(--border);
}
.history-exercise-item{
  min-width:0;
  border-bottom:1px solid var(--border);
}
.history-exercise-disclosure > summary{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:.6rem;
  min-height:48px;
  padding:.55rem .65rem;
  cursor:pointer;
  list-style:none;
}
.history-exercise-disclosure > summary::-webkit-details-marker{
  display:none;
}
.history-exercise-main,
.history-exercise-summary{
  display:flex;
  align-items:center;
  gap:.4rem;
  min-width:0;
}
.history-exercise-main .exercise-name{
  min-width:0;
  font-weight:650;
  overflow-wrap:anywhere;
}
.history-exercise-summary{
  justify-content:flex-end;
  font-size:.76rem;
  white-space:nowrap;
}
.history-exercise-summary > span + span::before{
  content:"·";
  margin-right:.4rem;
}
.history-done-icon{
  width:1rem;
  height:1rem;
  color:var(--success, #22c55e);
}
.history-disclosure-icon{
  width:1rem;
  height:1rem;
  transition:transform .18s ease;
}
.history-exercise-disclosure[open] .history-disclosure-icon{
  transform:rotate(180deg);
}
.history-exercise-detail{
  padding:.1rem .65rem .65rem;
  background:transparent;
}
.history-exercise-detail .history-exercise-note{
  padding:.55rem 0 .15rem;
}
.history-exercise-detail .history-recorded-sets{
  margin-top:.25rem;
}
.history-exercise-detail .history-recorded-set{
  padding:.45rem 0;
}
.history-no-set-detail{
  margin:.55rem 0 0;
  font-size:.8rem;
}
@media (max-width:700px){
  body.history-page .page-head{
    gap:.65rem;
  }
  body.history-page .page-head .muted{
    font-size:.82rem;
  }
  body.history-page .history-column{
    gap:.75rem;
  }
  body.history-page .history-calendar,
  body.history-page .history-summary-card,
  body.history-page .history-detail{
    padding:.8rem;
  }
  body.history-page .calendar-day{
    min-height:44px;
    border-radius:10px;
    box-shadow:none;
  }
  body.history-page .summary-grid{
    gap:.5rem;
  }
  body.history-page .history-detail header{
    align-items:flex-start;
    flex-direction:column;
    gap:.12rem;
  }
  .history-exercise-disclosure > summary{
    grid-template-columns:minmax(0, 1fr);
    gap:.2rem;
  }
  body.history-page .history-workout{
    padding:.75rem;
  }
  body.history-page .history-workout-heading{
    display:block;
  }
  body.history-page .history-workout-heading > div{
    margin-bottom:.15rem;
  }
  .history-exercise-summary{
    justify-content:flex-start;
    white-space:normal;
  }
  .history-disclosure-icon{
    margin-left:auto;
  }
}
@media (prefers-reduced-motion:reduce){
  .history-disclosure-icon{
    transition:none;
  }
}

/* The off-plan search carries the plan builder's filters, behind its funnel.
   The input and the funnel share a row; the panel drops under both. */
.off-plan-autocomplete{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: start;
}
.off-plan-autocomplete > input{ grid-column: 1; min-width: 0; }
.off-plan-filter-toggle{ grid-column: 2; align-self: start; }
.off-plan-filter-panel{ grid-column: 1 / -1; }
.off-plan-filter-panel[hidden]{ display: none; }
.off-plan-autocomplete-results{ grid-column: 1 / -1; }

.weight-goal-form{ display: grid; gap: 1.25rem; }
.weight-goal-stepper{ display: grid; grid-template-columns: 3rem minmax(0, 1fr) 3rem; align-items: center; gap: .75rem; }
.weight-goal-number{ display: flex; align-items: baseline; justify-content: center; gap: .35rem; min-width: 0; }
.weight-goal-number > span:last-child{ color: var(--muted); font-size: 1.25rem; }
.weight-goal-adjustments{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.weight-goal-form input[type="range"]{ width: 100%; min-width: 0; accent-color: var(--brand); }
.weight-goal-error{ color: var(--danger); margin: 0; }
html:not(#_) body.app[data-authenticated="1"] .weight-goal-error[hidden],
html:not(#_) body.app[data-authenticated="1"] .weight-goal-form [data-weight-goal-remove][hidden]{ display: none !important; }
.progress-chart-goal-control{ cursor: pointer; pointer-events: auto; }
.progress-chart-goal-control:focus-visible rect{ stroke: var(--brand); stroke-width: 2; }
html:not(#_) body.app[data-authenticated="1"] .weight-goal-number input{
  width: 100%; min-width: 0; padding: .5rem 0; border: 0; background: transparent; box-shadow: none;
  color: var(--ink); font-size: 3rem; font-weight: 700; text-align: center;
  appearance: textfield;
}
.weight-goal-number input::-webkit-inner-spin-button,
.weight-goal-number input::-webkit-outer-spin-button{ appearance: none; margin: 0; }
.weight-goal-card .modal-body{ padding-top: 1rem; }
html:not(#_) body.app[data-authenticated="1"] .weight-goal-modal{
  align-items: center !important;
  padding: 1rem !important;
}
html:not(#_) body.app[data-authenticated="1"] .weight-goal-form input[type="range"]{
  padding: 0 !important; margin: 0; height: 1.5rem; min-height: 0;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
}
html:not(#_) body.app[data-authenticated="1"] .weight-goal-card .plain-close-icon,
html:not(#_) body.app[data-authenticated="1"] .weight-goal-card .plain-close-icon .nav-icon-lucide{
  color: var(--muted) !important;
}
@media (max-width: 700px){
  html:not(#_) body.app[data-authenticated="1"] .weight-goal-modal{
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .weight-goal-modal .weight-goal-card{
    width: 100%; max-width: 100%; margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 1rem);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 700px){
  .off-plan-add-exercise-form,
  .off-plan-alt-add-form{
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .off-plan-add-exercise-form > .off-plan-autocomplete,
  .off-plan-alt-add-form > .off-plan-autocomplete{
    width: 100%;
    grid-column: 1 / -1;
  }
  .off-plan-add-exercise-form > .off-plan-add-exercise-btn,
  .off-plan-alt-add-form > .off-plan-icon-btn{
    justify-self: end;
  }
  .exercise-row-title-bar:has(> .off-plan-alt-add-form:not([hidden])){
    flex-wrap: wrap;
  }
  .exercise-row-title-bar > .off-plan-alt-add-form{
    flex-basis: 100%;
    order: 1;
  }
  /* Renaming searches the library: the search gets its own full-width line
     under the edit buttons, like the shuffle picker. */
  .exercise-row-title-bar:has(> .off-plan-rename-form:not([hidden])){
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .exercise-row-title-bar > .off-plan-rename-form{
    flex-basis: 100%;
    order: 1;
  }
}


/* ──────────────────────────────────────────────────────────────────────────
   Dashboard water widget. Deliberately short: a bar, a reading and a row of
   buttons, so it earns its place above nutrition without pushing the rest of
   the dashboard down a screen.
   ────────────────────────────────────────────────────────────────────────── */
.water-widget{ display: grid; gap: .5rem; }
.water-widget .mobile-card-head strong{ display: inline-flex; align-items: center; gap: .4rem; }
.water-widget .mobile-card-head .nav-icon-lucide{ width: 16px; height: 16px; color: var(--water-color, #8dc337); }

.water-widget-goal{
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .55rem;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.water-widget-goal .nav-icon-lucide{ width: 13px; height: 13px; }
.water-widget-goal:hover,
.water-widget-goal:focus-visible{ color: var(--ink); }

.water-widget-bar{
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}
.water-widget-fill{
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--water-color, #8dc337);
  transition: width .32s ease;
}
.water-widget.is-complete .water-widget-fill{ background: #22c55e; }

.water-widget-read{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.water-widget-read strong{ font-size: 1.15rem; }
.water-widget-read .muted{ font-size: .8rem; }

.water-widget-actions{ display: flex; gap: .4rem; }
.water-widget-add,
.water-widget-undo{
  flex: 1 1 auto;
  min-height: 38px;
  border: 0;
  border-radius: var(--ui-btn-radius);
  background: var(--soft);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.water-widget-undo{ flex: 0 0 44px; color: var(--muted); }
.water-widget-undo .nav-icon-lucide{ width: 15px; height: 15px; }
.water-widget-add:hover,
.water-widget-undo:hover{ background: var(--card); }

.water-widget-goal-form{ display: flex; gap: .4rem; }
.water-widget-goal-form[hidden]{ display: none; }
.water-widget-goal-form label{ flex: 1 1 auto; min-width: 0; }
.water-widget-goal-form input{ width: 100%; }
.water-widget-save{
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 .9rem;
  border: 0;
  border-radius: var(--ui-btn-radius);
  background: var(--ui-btn-primary-bg);
  color: var(--ui-btn-primary-fg);
  font-weight: 700;
  cursor: pointer;
}

/* Reusable routines share the library and workout controls. */
/* The Library page is a grid with its own row gap, so these add none. */
.routine-library-tabs{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); gap:8px; margin:0; }
.routine-library-tabs .pill-link{ justify-content:center; text-align:center; min-width:0; }
.library-head{ margin:0; }
.library-section-about{ margin:-8px 0 0; }
/* The Library tab not open (the route builds only the open one). */
.coach-library-page .library-panel.is-tab-hidden{ display:none !important; }
/* Which tab you are on has to be obvious -- it is the whole job of this row,
   and all three read identically before this.
   The button finish at the end of this file paints every .pill-link with
   `background: var(--ui-btn-bg) !important`, so a plain background here never
   showed however specific it was, and the outline that was tried instead never
   showed either. Rather than add another !important to that pile, point the
   variable the winning rule already reads at the primary fill: it paints the
   active tab for us, and hover keeps working the same way. */
html:not(#_) body.app[data-authenticated="1"] .routine-library-tabs a.is-active{
  --ui-btn-bg: var(--ui-btn-primary-bg);
  --ui-btn-fg: var(--ui-btn-primary-fg);
  --ui-btn-hover-bg: var(--ui-btn-primary-hover-bg);
}
.routine-page .page-head{ gap:16px; flex-wrap:wrap; }
.routine-page .page-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
:is(.routine-page,.library-plan-list) form{ margin:0; }
:is(.routine-page,.library-plan-list) [hidden]{ display:none!important; }
:is(.routine-page,.library-plan-list) .nav-icon-lucide{ width:18px; height:18px; flex-shrink:0; }
:is(.routine-page,.library-plan-list) .pill-link{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; }
.routine-schedule-fields{ display:grid; grid-template-columns:repeat(2,minmax(0,160px)); gap:12px; margin-bottom:16px; }
.routine-page label{ display:flex; flex-direction:column; gap:8px; min-width:0; }
.routine-page :is(input,textarea,select){ width:100%; min-width:0; box-sizing:border-box; }
.routine-search-label{ margin-bottom:16px; }
.routine-library-row{ display:grid; grid-template-columns:minmax(0,1fr) 140px 36px; align-items:center; gap:16px; padding:20px 0; border-bottom:1px solid var(--color-border); }
.routine-library-main{ display:grid; gap:8px; min-width:0; }
.routine-name-link{ font-size:1.05rem; font-weight:700; overflow-wrap:anywhere; color:var(--color-text-primary); text-decoration:none; }
.routine-library-commands{ display:flex; flex-wrap:wrap; gap:8px; }
.routine-mini-map.muscle-body-map{ min-height:0; gap:4px; }
.routine-mini-map.muscle-body-map svg{ height:140px; }
.routine-mini-map figcaption{ display:none; }
.routine-mini-map .muscle-level-0{ fill:var(--color-text-secondary); fill-opacity:.5; }
.routine-overflow{ position:relative; align-self:start; }
.routine-overflow > summary{ list-style:none; }
.routine-overflow > summary::-webkit-details-marker{ display:none; }
.routine-list .routine-section:not([hidden]) ~ .routine-section:not([hidden]){ margin-top:32px; }
.routine-stock-about{ margin:4px 0 12px; }
.routine-tabs{ flex-wrap:wrap; margin-bottom:12px; }
.routine-preview-map.muscle-body-map{ min-height:0; gap:4px; }
.routine-preview-map.muscle-body-map svg{ height:220px; }
.routine-preview-map figcaption{ display:none; }
.routine-preview-actions{ display:grid; gap:8px; margin-top:16px; }
.routine-preview-actions form{ margin:0; }
.routine-preview-actions :is(.btn,.pill-link){ width:100%; justify-content:center; }
.plan-preview-map-label{ margin-top:16px; }
.library-plan-list .library-plan-tabs{ flex-wrap:wrap; margin-bottom:12px; }
.library-plan-list .library-plan-section-head{ margin-bottom:4px; }
.library-plan-empty{ padding:16px 0; }
/* Tabs keep the list short, so it grows with the page instead of scrolling in a box. */
.coach-library-page .library-modern-list:has(> .library-plan-list){ max-height:none; overflow:visible; }
.library-plan-list .library-plan-commands{ grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; }
.library-plan-list .library-plan-commands .pill-link{ min-height:36px; padding-inline:12px; }
@media (max-width:640px){
  .plan-preview-map.muscle-body-map svg{ height:160px; }
}
.routine-overflow-menu{ position:absolute; right:0; top:40px; display:grid; gap:8px; padding:12px; min-width:160px; z-index:20; background:var(--color-bg-primary); border:1px solid var(--color-border); border-radius:var(--radius-sm); box-shadow:var(--shadow-soft); }
.routine-overflow-menu .pill-link{ width:100%; justify-content:flex-start; }
.routine-name-field{ margin-bottom:24px; max-width:600px; font-weight:600; }
.routine-editor-layout{ display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:32px; align-items:start; }
.routine-editor-main{ min-width:0; }
.routine-target-preview{ position:sticky; top:calc(var(--appbar-height,64px) + 16px); }
.routine-target-preview h3,.routine-exercises-head h3{ font-size:1rem; margin:0 0 16px; }
.routine-target-preview .muscle-body-map{ min-height:0; gap:8px; }
.routine-target-preview .muscle-body-map svg{ height:260px; }
.routine-target-preview .muscle-level-0{ fill:var(--color-text-secondary); fill-opacity:.5; }
.routine-exercise-list{ display:grid; gap:12px; }
.routine-exercise-row{ border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-bg-secondary); min-width:0; }
.routine-exercise-row > summary{ display:flex; gap:8px; align-items:center; padding:12px 8px; list-style:none; cursor:pointer; }
.routine-exercise-row > summary::-webkit-details-marker{ display:none; }
.routine-item-title{ flex:1; min-width:0; display:grid; gap:4px; overflow-wrap:anywhere; }
.routine-item-title strong{ font-size:.95rem; }
.routine-item-title small{ font-size:.8rem; }
.routine-exercise-row[open] > summary .routine-expand-icon{ transform:rotate(180deg); }
.routine-row-actions{ display:flex; gap:0; align-items:center; }
html body.app.routine-page[data-authenticated="1"] .routine-icon-action, html body.app[data-authenticated="1"] .library-plan-list .routine-icon-action{ display:inline-flex!important; align-items:center; justify-content:center; width:36px!important; min-width:36px!important; height:40px!important; padding:0!important; border:0!important; border-radius:var(--radius-sm)!important; background:transparent!important; background-image:none!important; box-shadow:none!important; color:var(--color-text-secondary); cursor:pointer; }
html body.app.routine-page[data-authenticated="1"] .routine-icon-action:hover, html body.app[data-authenticated="1"] .library-plan-list .routine-icon-action:hover{ background:var(--ui-btn-hover-bg)!important; color:var(--color-text-primary); }
.routine-icon-action:disabled{ opacity:.35; cursor:default; }
:is(.routine-page,.library-plan-list) .is-danger{ color:var(--color-danger)!important; }
.routine-item-fields{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:0 16px 16px; }
.routine-item-fields :is(.routine-item-name-field,.routine-item-notes-field){ grid-column:1/-1; }
.routine-item-fields label{ font-size:.85rem; }
.routine-item-fields input{ min-height:44px; }
.routine-drag{ touch-action:none; cursor:grab!important; }
.routine-picker{ margin-top:24px; }
.routine-picker-tools{ display:flex; align-items:center; gap:8px; }
.routine-picker-tools .library-search-input-wrap{ flex:1; }
.routine-search-results{ display:grid; gap:4px; margin-top:12px; max-height:360px; overflow:auto; overscroll-behavior:contain; }
html body.app #routine-editor #routine-search-results .plan-exercise-search-result{ display:block!important; width:100%!important; max-width:none!important; min-height:72px!important; padding:12px 16px!important; text-align:left!important; border:0!important; background:var(--color-bg-secondary)!important; background-image:none!important; box-shadow:none!important; border-radius:var(--radius-sm)!important; color:var(--color-text-primary)!important; transform:none!important; filter:none!important; }
html body.app #routine-editor #routine-search-results .plan-exercise-search-result:is(:hover,:focus-visible,:active){ background:var(--ui-btn-hover-bg)!important; box-shadow:none!important; }
.routine-search-results .plan-exercise-search-result-main{ display:grid; grid-template-columns:36px minmax(0,1fr); gap:12px; align-items:center; }
.routine-search-results .plan-exercise-search-result-icon{ width:36px; height:36px; display:flex; align-items:center; justify-content:center; }
.routine-search-results .plan-exercise-search-result-copy{ min-width:0; display:grid; gap:4px; }
.routine-search-results .plan-exercise-search-result-name{ overflow-wrap:anywhere; }
.routine-search-results .exercise-category-pill{ font-weight:400; color:var(--color-text-secondary); font-size:.85rem; }
.routine-error{ color:var(--color-danger); }
/* Empty state. A bare "No routines yet." left the page with nothing to act on
   and no explanation of what a routine is for, which matters most on the one
   screen a new user reaches before they have made any. Tokens throughout so it
   holds up in both themes. */
.routine-empty{
  display:grid;
  justify-items:center;
  gap:12px;
  padding:32px 20px;
  text-align:center;
  border:1px dashed var(--color-border);
  border-radius:var(--radius-lg, 18px);
  background:var(--soft);
}
.routine-empty p{ margin:0; max-width:34rem; }
.routine-empty strong{ font-size:1.05rem; color:var(--color-text-primary); }
.routine-empty-icon{
  width:3rem;
  height:3rem;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:color-mix(in srgb, var(--brand) 14%, transparent);
  color:var(--brand);
}
.routine-empty-icon svg{ width:22px; height:22px; }
.routine-day-actions{ margin-top:16px; }
/* The two ways to add to a day belong on one line; they were a submit button
   and a separate block below it, which read as unrelated controls. */
.off-plan-add-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
@media(max-width:760px){
  .routine-editor-layout{ grid-template-columns:minmax(0,1fr); gap:24px; }
  .routine-target-preview{ position:static; order:-1; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; }
  .routine-target-preview h3{ font-size:.95rem; }
  .routine-target-preview .muscle-body-map{ width:160px; flex-shrink:0; }
  .routine-target-preview .muscle-body-map svg{ height:140px; }
  .routine-target-preview figcaption{ display:none; }
  .routine-target-preview [role="status"]:empty{ display:none; }
  .routine-target-preview [role="status"]{ flex-basis:100%; }
  .routine-library-row{ grid-template-columns:minmax(0,1fr) 100px 36px; gap:8px; padding:16px 0; }
  .routine-mini-map.muscle-body-map svg{ height:120px; }
  .routine-library-commands{ flex-direction:column; align-items:start; }
  .routine-exercise-row > summary{ gap:4px; padding:8px 4px; }
  html body.app.routine-page[data-authenticated="1"] .routine-icon-action, html body.app[data-authenticated="1"] .library-plan-list .routine-icon-action{ width:32px!important; min-width:32px!important; }
  .routine-item-fields{ gap:8px; padding:0 12px 12px; }
}

/* Pull to refresh (touch screens, Feed and Activity) and the post a notification opened. */
html:has(body.feed-page-body),html:has(body.notifications-page){overscroll-behavior-y:contain}
.pull-refresh{display:flex;align-items:center;justify-content:center;height:var(--ptr-pull,0px);overflow:hidden;transition:height .22s ease}
.pull-refresh.is-pulling{transition:none}
.pull-refresh-icon{display:grid;place-items:center;width:2.25rem;height:2.25rem;border:1px solid var(--border);border-radius:50%;background:var(--card);color:var(--color-accent);box-shadow:var(--shadow-soft);opacity:var(--ptr-progress,0);transform:scale(calc(.6 + var(--ptr-progress,0) * .4))}
.pull-refresh-icon svg{width:1.1rem;height:1.1rem;transition:transform .2s ease}
.pull-refresh.is-armed .pull-refresh-icon svg{transform:rotate(180deg)}
.pull-refresh.is-refreshing .pull-refresh-icon svg{display:none}
.pull-refresh.is-refreshing .pull-refresh-icon::after{content:"";width:1rem;height:1rem;border:2px solid color-mix(in srgb,var(--color-accent) 25%,transparent);border-top-color:var(--color-accent);border-radius:50%;animation:pullRefreshSpin .7s linear infinite}
@keyframes pullRefreshSpin{to{transform:rotate(360deg)}}
/* Outline rather than box-shadow: desktop feed cards force box-shadow:none. */
.feed-card,.feed-comment-row{outline:2px solid transparent;outline-offset:2px;transition:outline-color .4s ease}
.feed-card.is-focused,.feed-comment-row.is-focused{outline-color:var(--color-accent)}
.feed-comment-row.is-focused{border-radius:var(--radius-sm)}
@media(prefers-reduced-motion:reduce){.pull-refresh.is-refreshing .pull-refresh-icon::after{animation-duration:1.6s}}


/* Wheel picker for set KG / reps / rest on touch screens (wheel_picker.js). */
html.wheel-picker-open,html.wheel-picker-open body{overflow:hidden}
.set-value-input.is-wheel-input{cursor:pointer;caret-color:transparent}
.wheel-picker{position:fixed;inset:0;z-index:5300;display:none}
.wheel-picker[aria-hidden="false"]{display:block}
.wheel-picker-backdrop{position:absolute;inset:0;background:rgba(22,25,22,.52)}
.wheel-picker-panel{position:absolute;left:0;right:0;bottom:0;display:grid;gap:.5rem;padding:.5rem 1rem calc(1rem + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);border-radius:var(--radius-lg) var(--radius-lg) 0 0;background:var(--card);box-shadow:var(--shadow-soft);animation:wheelPickerIn .22s cubic-bezier(.25,.6,.35,1)}
@keyframes wheelPickerIn{from{transform:translateY(100%)}to{transform:none}}
@media(prefers-reduced-motion:reduce){.wheel-picker-panel{animation:none}}
.wheel-picker-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:2.75rem}
.wheel-picker-head strong{font-size:1rem;color:var(--ink)}
/* Cancel, Done and Clear take the app's standard button fill. */
.wheel-picker-action{min-height:2.75rem;padding:0 1rem}
.wheel-picker-action:first-child{justify-self:start}
.wheel-picker-action.is-primary{justify-self:end;font-weight:800}
.wheel-picker-wheels{position:relative;display:flex;align-items:center;justify-content:center;gap:.25rem}
/* The band behind the selected row. */
.wheel-picker-wheels::before{content:"";position:absolute;left:0;right:0;top:50%;height:44px;transform:translateY(-50%);border-radius:var(--radius-sm);background:var(--soft);pointer-events:none}
.wheel-picker-wheel{position:relative;width:5.5rem;height:220px;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-width:none;-webkit-mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent);mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent)}
.wheel-picker-wheel::-webkit-scrollbar{display:none}
.wheel-picker-wheel:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px;border-radius:var(--radius-sm)}
.wheel-picker-list{padding:88px 0}
.wheel-picker-item{height:44px;display:grid;place-items:center;scroll-snap-align:center;color:var(--muted);font-size:1.15rem;font-variant-numeric:tabular-nums;transition:color .15s ease,font-size .15s ease}
.wheel-picker-item.is-selected{color:var(--ink);font-size:1.4rem;font-weight:700}
.wheel-picker-separator{position:relative;width:.35rem;height:.35rem;border-radius:50%;background:var(--ink)}
.wheel-picker-unit{position:relative;min-width:3rem;color:var(--muted);font-weight:600}
.wheel-picker-clear{justify-self:center;min-height:2.5rem;padding:0 1rem}

/* History: jump to any date from the calendar header. */
/* A native date input keeps an intrinsic minimum width on iOS and ignores
   width:100%, so uncontained it spills over the back arrow beside it and takes
   its taps. Clipping the button keeps the tap area to the button itself. */
.history-jump-btn{position:relative;overflow:hidden;cursor:pointer}

/* Feed opened from a notification: the list lays out hidden (so the jump
   lands precisely) while the loading line sits centred on screen. */
.feed-list.is-focus-loading{visibility:hidden}
#feed-loading.is-focus-loading{position:fixed;inset:45% 0 auto;z-index:2;margin:0 !important;text-align:center}
.message-row .message-bubble{outline:2px solid transparent;outline-offset:2px;transition:outline-color .4s ease}
.message-row.is-focused .message-bubble{outline-color:var(--color-accent)}

/* Feed comments: the send button sits inside a pill input. Size and position
   are forced here because the shared icon-button layers set them with
   !important. 16px stops iOS zooming the page when the input is focused. */
.feed-comment-actions{margin-left:-.18rem}
body.app[data-authenticated="1"] .feed-comment-form input{width:100% !important;height:44px !important;min-height:44px !important;padding:0 48px 0 16px !important;border-radius:999px !important;font-size:16px !important}
body.app[data-authenticated="1"] .feed-comment-form .feed-comment-submit.icon-btn{position:absolute !important;top:0;right:4px;bottom:0;width:40px !important;min-width:40px !important;height:40px !important;min-height:40px !important;margin:auto 0;padding:0 !important;color:var(--color-accent)}
.feed-comment-edit-input{display:block;margin-bottom:8px;font-size:16px !important}
.feed-comment-edit-input:focus{box-shadow:none !important}
html:not(#_) body.app[data-authenticated="1"] :is(.feed-comment-actions .feed-comment-inline-icon, .feed-comment-form .feed-comment-submit),
html:not(#_) body.app[data-authenticated="1"] :is(.feed-comment-actions .feed-comment-inline-icon, .feed-comment-form .feed-comment-submit):is(:hover, :focus, :focus-visible, :active){
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
html:not(#_) body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-inline-icon{color:var(--muted) !important}
html:not(#_) body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-save.feed-comment-inline-icon,
html:not(#_) body.app[data-authenticated="1"] .feed-comment-form .feed-comment-submit{color:var(--color-accent) !important}

/* A tapped action button stays focused on a phone; only keyboard focus and real
   hover should show the grey square. */
body.app[data-authenticated="1"] :is(.feed-kudos-btn, .feed-comment-btn, .feed-emoji-btn):focus:not(:focus-visible){background:transparent !important;background-color:transparent !important}
@media (hover:none){
  body.app[data-authenticated="1"] :is(.feed-kudos-btn, .feed-comment-btn, .feed-emoji-btn):hover:not(:focus-visible){background:transparent !important;background-color:transparent !important}
}

/* A post opened from a notification sits first, with the feed underneath. */
.feed-focus-divider{margin:12px 16px 0;color:var(--muted);font-size:.875rem;font-weight:600;line-height:1.3}

/* Activity rows and filter chips are flat, not buttons: the shared glossy and
   light-mode button layers would otherwise repaint and re-lay them out. */
html:not(#_) body.app[data-authenticated="1"] .notification-item{border:0 !important;box-shadow:none !important;background:transparent !important}
html:not(#_) body.app[data-authenticated="1"] .notification-item.is-unread{background:color-mix(in srgb,var(--brand) 6%,transparent) !important}
html:not(#_) body.app[data-authenticated="1"] .notification-item:active{background:color-mix(in srgb,var(--ink) 8%,transparent) !important}
@media(hover:hover){
  html:not(#_) body.app[data-authenticated="1"] .notification-item:hover{background:color-mix(in srgb,var(--ink) 5%,transparent) !important}
  html:not(#_) body.app[data-authenticated="1"] .notification-item.is-unread:hover{background:color-mix(in srgb,var(--brand) 9%,transparent) !important}
}
html:not(#_) body.app[data-authenticated="1"] .notification-open,
html:not(#_) body.app[data-authenticated="1"] .notification-open:is(:hover,:focus,:focus-visible,:active){
  display:grid !important;
  width:100% !important;
  min-height:72px !important;
  grid-template-columns:48px minmax(0,1fr) 8px !important;
  justify-content:stretch !important;
  align-items:center !important;
  padding:10px 12px !important;
  border:0 !important;
  border-radius:inherit !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  filter:none !important;
  transform:none !important;
  color:var(--ink) !important;
  font-size:.9375rem !important;
  font-weight:400 !important;
  text-align:left !important;
  white-space:normal !important;
}
html:not(#_) body.app[data-authenticated="1"] .notification-open::before,
html:not(#_) body.app[data-authenticated="1"] .notification-open::after{display:none !important}
html:not(#_) body.app[data-authenticated="1"] .notification-open .notification-avatar svg{box-sizing:border-box !important;width:24px !important;height:24px !important;padding:4px !important;color:#fff !important}
html:not(#_) body.app[data-authenticated="1"] .notification-filters button,
html:not(#_) body.app[data-authenticated="1"] .notification-filters button:is(:hover,:focus,:focus-visible,:active){
  min-height:36px !important;
  padding:0 14px !important;
  border:0 !important;
  border-radius:999px !important;
  background:color-mix(in srgb,var(--ink) 10%,transparent) !important;
  background-image:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  filter:none !important;
  color:var(--ink) !important;
  font-size:.875rem !important;
  font-weight:600 !important;
}
html:not(#_) body.app[data-authenticated="1"] .notification-filters button.active,
html:not(#_) body.app[data-authenticated="1"] .notification-filters button.active:is(:hover,:focus,:focus-visible,:active){background:var(--ink) !important;color:var(--bg) !important}
.notification-avatar{background:color-mix(in srgb,var(--ink) 10%,transparent)}
.notifications-head form{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
html:not(#_) body.app[data-authenticated="1"] .notifications-clear,
html:not(#_) body.app[data-authenticated="1"] .notifications-clear:is(:hover,:focus,:focus-visible,:active){min-height:36px !important;padding:0 4px !important;border:0 !important;border-radius:var(--radius-sm) !important;background:transparent !important;background-image:none !important;box-shadow:none !important;text-shadow:none !important;filter:none !important;color:var(--muted) !important;font-size:.875rem !important;font-weight:600 !important}
@media(max-width:1023px){
  html:not(#_) body.app[data-authenticated="1"] .notification-open,
  html:not(#_) body.app[data-authenticated="1"] .notification-open:is(:hover,:focus,:focus-visible,:active){padding:10px 16px !important}
}

/* Connection status in the app bar: hidden unless there is something to say. */
.appbar-net-status[hidden]{display:none !important}
.appbar-net-status > i, .appbar-net-status > svg{display:none}
.appbar-net-status[data-state="offline"] > .net-status-offline,
.appbar-net-status[data-state="syncing"] > .net-status-syncing,
.appbar-net-status[data-state="signin"] > .net-status-attention,
.appbar-net-status[data-state="problem"] > .net-status-attention{display:block}
html:not(#_) body.app[data-authenticated="1"] .appbar-net-status{color:var(--muted);background:transparent;border:0;box-shadow:none;padding:0}
html:not(#_) body.app[data-authenticated="1"] .appbar-net-status[data-state="problem"]{color:var(--warning, #f59e0b)}
.appbar-net-status[data-state="syncing"] > .net-status-syncing{animation:net-status-spin 1.6s linear infinite}
@keyframes net-status-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.appbar-net-status[data-state="syncing"] > .net-status-syncing{animation:none}}
/* The workout timer shares this bar, so it gives up its label whenever space is short and the buttons stay clear of the time. */
@media (max-width: 400px){
  html:not(#_) body.app[data-authenticated="1"] .appbar-workout-timer-label{display:none}
}
@media (max-width: 1023px){
  html:not(#_) body.app[data-authenticated="1"] .appbar-net-status{width:28px;min-width:28px;margin-right:0;flex:0 0 auto}
  html:not(#_) body.app[data-authenticated="1"].net-status-visible .appbar-workout-timer-label{display:none}
  html:not(#_) body.app[data-authenticated="1"].net-status-visible .appbar-workout-timer-value{font-size:1.15rem}
  html:not(#_) body.app[data-authenticated="1"].net-status-visible .appbar-workout-timer-controls{gap:.15rem}
}
@media (max-width: 340px){
  html:not(#_) body.app[data-authenticated="1"].net-status-visible .appbar-workout-timer-value{font-size:.95rem}
}
/* Shown in place of a page that was not saved for offline use. */
.offline-unavailable{display:flex;flex-direction:column;align-items:center;gap:12px;padding:64px 24px;text-align:center}
.offline-unavailable h1{margin:0;font-size:1.25rem}
.offline-unavailable p{margin:0 0 8px}
.offline-unavailable-icon{width:32px;height:32px;color:var(--muted)}
/* Holds the space of a section that loads after the page opens, so nothing jumps. */
.progress-deferred{min-height:320px}
/* Training activity loads after Stats opens; hold about the height it arrives
   at (260-280px on phones, 220-240px wider) so what's below doesn't jump. */
.progress-heatmap-section.progress-deferred{min-height:272px}
@media (min-width:700px){.progress-heatmap-section.progress-deferred{min-height:232px}}
/* A new range fades the overview in rather than reloading Stats. */
.progress-section--summary{transition:opacity .2s ease}
.progress-section--summary.htmx-added{opacity:0}
@media (prefers-reduced-motion: reduce){.progress-section--summary{transition:none}}

/* ──────────────────────────────────────────────────────────────────────────
   Messages, followers and groups on the app's own surfaces. These pages
   kept an older navy panel look; dark mode now uses the same card, soft and
   border tokens as the rest of the app. Light mode keeps its own rules.
   ────────────────────────────────────────────────────────────────────────── */
/* Followers, Groups and the other shortcuts are tabs styled like the chat
   filters; the open tab's list drops down under the row. */
.messages-inbox-modern .messages-quicktabs{
  position: relative;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.messages-inbox-modern .messages-quicktabs .messages-shortcut-detail{
  position: static;
  width: auto;
  min-width: 0;
}
.messages-inbox-modern .messages-quicktabs .messages-shortcut-detail > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.messages-inbox-modern .messages-quicktabs .messages-shortcut-detail > summary::-webkit-details-marker{
  display: none;
}
html[data-theme="dark"] .messages-inbox-modern .messages-quicktabs .pill-badge.is-active:is(:hover, :focus){
  /* Same as the active chat filter; a tap can leave hover stuck on touch. */
  background: rgba(151,211,55,.14);
  border-color: rgba(151,211,55,.24);
  color: #aff144;
}
.messages-inbox-modern .messages-quicktabs .pill-badge.is-disabled{
  opacity: .5;
  cursor: default;
}
.messages-inbox-modern .messages-quicktabs .messages-shortcut-menu:not(.messages-locker-menu){
  position: absolute;
  top: calc(100% - 4px);
  left: 16px;
  right: 16px;
  width: auto;
  max-width: 28rem;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Followers and Groups (and Locker, Bookings) open as a list over the page. */
.messages-inbox-modern .messages-shortcut-menu{
  z-index: 40;
  max-height: min(60vh, 26rem);
  overflow-y: auto;
}
html:not([data-theme="light"]) body .messages-inbox-modern .messages-shortcut-menu{
  gap: .15rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
html:not([data-theme="light"]) body .messages-inbox-modern .messages-shortcut-menu-item{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  text-decoration: none;
  transform: none;
}
html:not([data-theme="light"]) body .messages-inbox-modern .messages-shortcut-menu-item:is(:hover, :focus, :focus-visible){
  background: var(--soft) !important;
  box-shadow: none !important;
  transform: none;
}
.messages-inbox-modern .messages-shortcut-menu-item .messages-shortcut-menu-copy{
  flex: 1 1 auto;
  min-width: 0;
}
.messages-inbox-modern .messages-shortcut-menu-copy :is(strong, span){
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages-quick-avatar{
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
}
.messages-quick-avatar.is-icon{
  color: var(--brand);
}
.messages-quick-avatar .nav-icon-lucide{
  width: 1.05rem;
  height: 1.05rem;
}
.messages-quick-empty{
  margin: .5rem .65rem;
  color: var(--muted);
  font-size: .85rem;
}
.messages-quick-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .2rem;
  padding: .7rem .75rem .45rem;
  border-top: 1px solid var(--border);
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.messages-quick-footer .nav-icon-lucide{
  width: 1rem;
  height: 1rem;
}

/* Chat bubbles: the other person on the soft surface, yours in the primary blue. */
html:not([data-theme="light"]) body .messages-inbox-modern .messages-workspace .message-bubble{
  background: var(--soft);
  border-color: var(--border);
}
html:not([data-theme="light"]) body .messages-inbox-modern .messages-workspace .message-row.self .message-bubble{
  background: var(--ui-btn-primary-bg);
  border-color: transparent;
  color: var(--ui-btn-primary-fg);
}

/* Groups, New message and Archived chats use the standard card. */
html:not([data-theme="light"]) body :is(.groups-panel, .messages-new-panel, .messages-archived-panel){
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
html:not([data-theme="light"]) body .groups-manage-body{
  background: transparent;
}
html:not([data-theme="light"]) body .messages-announcements-overlay-card{
  border-color: var(--border);
  background: var(--card);
}
html:not([data-theme="light"]) body .messages-announcement-card{
  border-color: var(--border);
  background: var(--soft);
}

/* A follower's "..." menu sits above every other row and card, in the
   standard card colours, and opens upward when there is no room below. */
.contacts-row:has(.contacts-row-menu[open]),
.contacts-panel:has(.contacts-row-menu[open]){
  position: relative;
  z-index: 30;
}
.contacts-row-menu[open] > summary{
  position: relative;
  z-index: 31;
}
.contacts-row-menu.opens-up .contacts-row-menu-panel{
  top: auto;
  bottom: calc(100% + .4rem);
}
html:not([data-theme="light"]) body .contacts-row-menu-panel{
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

/* Groups buttons use the same variants as the Followers page: one primary
   per form, subtle for everything else, and the danger tint for Delete. */
html:not(#_) body.app[data-authenticated="1"] :is(.groups-primary-btn, .groups-secondary-btn, .groups-inline-btn, .groups-message-link){
  --ui-btn-bg: var(--ui-btn-dark-bg) !important;
  --ui-btn-fg: var(--ui-btn-dark-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px !important;
  min-height: 44px !important;
  min-width: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}
html[data-theme="light"]:not(#_) body.app[data-authenticated="1"] :is(.groups-secondary-btn, .groups-inline-btn:not(.danger)){
  --ui-btn-bg: var(--ui-btn-light-bg) !important;
  --ui-btn-fg: var(--ui-btn-light-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.groups-primary-btn, .groups-message-link){
  --ui-btn-bg: var(--ui-btn-primary-bg) !important;
  --ui-btn-fg: var(--ui-btn-primary-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-primary-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] .groups-inline-btn.danger{
  --ui-btn-bg: var(--ui-btn-danger-bg) !important;
  --ui-btn-fg: var(--ui-btn-danger-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-danger-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.groups-primary-btn, .groups-secondary-btn, .groups-inline-btn, .groups-message-link):hover{
  background: var(--ui-btn-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.groups-primary-btn, .groups-secondary-btn, .groups-inline-btn, .groups-message-link):focus-visible{
  outline: 2px solid var(--ui-btn-primary-bg);
  outline-offset: 2px;
}
html:not(#_) body.app[data-authenticated="1"] .groups-member-action-btn{
  min-height: 36px !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  font-size: 14px !important;
}

/* Member actions sit in one row of compact buttons, and the footer's two
   actions share the width equally. */
body.app .groups-member-row{
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
body.app .groups-member-actions{
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
body.app .groups-member-actions form{
  width: auto;
}
body.app .groups-member-actions .groups-member-action-btn{
  width: auto;
}
body.app .groups-manage-footer{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body.app .groups-manage-footer > :only-child{
  grid-column: 1 / -1;
}
html:not(#_) body.app[data-authenticated="1"] .groups-manage-footer :is(.groups-message-link, .groups-footer-action-btn){
  padding: 0 12px !important;
}
body.app .groups-manage-footer :is(.groups-message-link, .groups-footer-action-btn),
body.app .groups-manage-footer .groups-action-form{
  width: 100%;
  min-width: 0;
}
html:not([data-theme="light"]) body .groups-member-row{
  border: 1px solid var(--border);
  background: var(--soft);
}

/* Every X icon uses the shared close colour, whatever button it sits in. */
html:not(#_):not(#__) body.app :is(svg.lucide-x, [data-lucide="x"]){
  color: var(--ui-close-fg) !important;
  stroke: currentColor !important;
}
html:not(#_):not(#__) body.app :is(button, a, [role="button"], summary):is(:hover, :focus-visible) :is(svg.lucide-x, [data-lucide="x"]){
  color: var(--ui-close-hover-fg) !important;
}

/* Plan locks (Stats, Nutrition, Automations, Coach branding): the standard
   surfaces, an icon tile and a plain list of what the plan includes. */
html:not([data-theme="light"]) body .settings-feature-lock-card{
  border-color: var(--border);
  background: var(--soft);
}
html:not([data-theme="light"]) body .settings-feature-lock-dialog{
  border-color: var(--border);
  background: var(--card);
}
.settings-feature-lock-card{
  gap: 20px;
  padding: 24px;
}
.settings-feature-lock-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settings-feature-lock-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(141,195,55,.24);
  background: rgba(151,211,55,.12);
  color: #e8ece8;
}
html[data-theme="light"] .settings-feature-lock-icon{
  border-color: rgba(141,195,55,.2);
  background: rgba(151,211,55,.1);
  color: #364d10;
}
.settings-feature-lock-icon .nav-icon-lucide{
  width: 22px;
  height: 22px;
}
.settings-feature-lock-copy{
  display: grid;
  gap: 4px;
}
.settings-feature-lock-copy strong{
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.settings-feature-lock-copy p{
  margin: 0;
}
.settings-feature-lock-list{
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.settings-feature-lock-list li{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-feature-lock-list li > .nav-icon-lucide{
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--muted);
}
.settings-feature-lock-list li span{
  display: grid;
  gap: 2px;
  min-width: 0;
}
.settings-feature-lock-list li strong{
  color: var(--ink);
  font-weight: 600;
}
.settings-feature-lock-list li small{
  color: var(--muted);
  font-size: .875rem;
}
.settings-feature-lock-dialog[hidden]{
  display: none;
}
.settings-feature-lock-card .settings-upgrade-lock-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
:is(.coach-automations-locked, .premium-locked){
  max-width: 36rem;
  margin-top: 16px;
}
.nav-lock-icon{
  width: 14px !important;
  height: 14px !important;
  margin-left: auto;
  opacity: .65;
}

/* Top bar Upgrade pill for Solo Free: the same accent as the "Premium Feature"
   badge on lock cards. It steps aside while a workout timer is showing. */
.appbar-upgrade-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin-right: 8px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(245,179,1,.38);
  background: rgba(245,179,1,.14);
  color: #fcd34d;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.appbar-upgrade-pill:hover,
.appbar-upgrade-pill:focus-visible{
  background: rgba(245,179,1,.22);
}
.appbar-upgrade-pill .nav-icon-lucide{
  width: 14px;
  height: 14px;
}
html[data-theme="light"] .appbar-upgrade-pill{
  border-color: rgba(245,179,1,.45);
  background: rgba(245,179,1,.16);
  color: #7a5200;
}
.appbar-workout-timer:not([hidden]) ~ .appbar-upgrade-pill{
  display: none !important;
}
/* The pill leads the right-hand group; the offline icon joins it rather than
   splitting the space, and the pill drops to its icon while that icon shows. */
.appbar-upgrade-pill{
  margin-left: auto;
}
.appbar-upgrade-pill ~ .appbar-net-status:not([hidden]){
  margin-left: 0;
}

.plan-app-actions{
  display: grid;
  gap: 8px;
  max-width: 24rem;
  margin: 16px auto 0;
}
.plan-app-actions[hidden]{
  display: none;
}
.upgrade-unavailable p{max-width:28rem}
.upgrade-unavailable-actions{display:grid;gap:8px;width:100%;max-width:20rem;margin-top:8px}
.upgrade-unavailable a[href^="mailto:"]{color:var(--brand);font-weight:600;text-decoration:none}

/* Same purple as the paywall, so the Plans card and the paywall read as one plan. */
.pricing-pro-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(101,147,6,.16);
  border: 1px solid rgba(101,147,6,.35);
  color: #81b430;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.pricing-pro-badge .nav-icon-lucide{
  width: 12px;
  height: 12px;
}
html[data-theme="light"] .pricing-pro-badge{
  background: rgba(101,147,6,.1);
  color: #4a6d03;
}
/* With the Upgrade pill showing, the right-hand group packs tighter so the
   pill, offline icon, bell and feed all stay on one line at full size. */
@media (max-width: 1023px){
  html:not(#_) body.app .appbar-actions:has(.appbar-upgrade-pill){
    gap: 4px;
  }
  html:not(#_) body.app .appbar-actions:has(.appbar-upgrade-pill) .appbar-icon-btn{
    margin-right: 0;
  }
  html:not(#_) body.app .appbar-actions:has(.appbar-upgrade-pill) .appbar-net-status{
    width: 28px !important;
    min-width: 28px !important;
  }
  html:not(#_) body.app .appbar-upgrade-pill{
    margin-right: 2px;
    padding: 0 10px;
    gap: 4px;
  }
  html:not(#_) body.app:has(.appbar-upgrade-pill) .appbar .logo-text{
    letter-spacing: .08em;
  }
}
@media (max-width: 389px){
  html:not(#_) body.app .appbar-actions:has(.appbar-upgrade-pill) .appbar-icon-btn:not(.appbar-net-status){
    width: 34px !important;
    min-width: 34px !important;
  }
  html:not(#_) body.app:has(.appbar-upgrade-pill) .appbar .logo-mark{
    width: 36px;
    height: 36px;
  }
  html:not(#_) body.app:has(.appbar-upgrade-pill) .appbar .logo-text{
    letter-spacing: .04em;
  }
}
/* Only very small phones (under 360px) run out of room, and only while the
   offline icon shows: the pill keeps its icon there rather than wrapping. */
@media (max-width: 359px){
  body.net-status-visible .appbar-upgrade-pill{
    width: 32px;
    padding: 0 !important;
    justify-content: center;
  }
  body.net-status-visible .appbar-upgrade-pill > span{
    display: none;
  }
}

/* Restore purchases on Plans: a quiet line under the plans, not a second CTA. */
.plan-restore{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
}
/* The link itself takes the app's subtle button style: a small, clear tap target. */
.plan-restore-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  font-weight: 600;
}
html:not(#_) body.app .plan-restore-link .nav-icon-lucide{
  width: 15px;
  height: 15px;
  color: currentColor !important;
}
.plan-restore-link[aria-busy="true"]{
  opacity: .7;
  pointer-events: none;
}

/* History and Stats header actions use the app's grey secondary buttons. */
html:not(#_) body.app[data-authenticated="1"] :is(.history-page-action-btn, .history-checkin-btn){
  --ui-btn-bg: var(--ui-btn-dark-bg) !important;
  --ui-btn-fg: var(--ui-btn-dark-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-dark-hover-bg) !important;
  border-color: transparent !important;
  background: var(--ui-btn-bg) !important;
  color: var(--ui-btn-fg) !important;
  box-shadow: none !important;
}
html[data-theme="light"]:not(#_) body.app[data-authenticated="1"] :is(.history-page-action-btn, .history-checkin-btn){
  --ui-btn-bg: var(--ui-btn-light-bg) !important;
  --ui-btn-fg: var(--ui-btn-light-fg) !important;
  --ui-btn-hover-bg: var(--ui-btn-light-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.history-page-action-btn, .history-checkin-btn):is(:hover, :focus-visible){
  background: var(--ui-btn-hover-bg) !important;
}
html:not(#_) body.app[data-authenticated="1"] :is(.history-page-action-btn, .history-checkin-btn) .nav-icon-lucide{
  color: currentColor !important;
}

/* "Open in library" scrolls the exercise into view below the top bar. */
details.exercise-row-card{
  scroll-margin-top: calc(var(--appbar-height, 72px) + 16px);
}
/* Library exercises read as a list, like Plans and Routines: flat rows
   split by a line, not boxed buttons. */
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page .exercise-list-modern{ gap:0 !important; max-height:none !important; overflow:visible !important; }
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page .exercise-row-card,
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page .exercise-row-card:has(> .exercise-row-summary:is(:hover, :focus-visible, :active)){
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--color-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 16px 0 !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page .exercise-row-card:last-child{ border-bottom: 0 !important; }

/* Routines tab: the add action sits above the search, as on the other tabs. */
.routine-page .coach-library-page .library-top-actions{ margin-bottom: 12px; }

/* A field heading with its info tip beside it. */
.field-label-row{ display: inline-flex; align-items: center; gap: 6px; }

/* Select sheet (static/select_sheet.js): one picker for every select in the
   library. The field keeps the look of a select; the sheet rises from the
   bottom on a phone and sits centred on a wider screen. */
.select-sheet-field{ display: block; min-width: 0; cursor: pointer; border-radius: 12px; }
.select-sheet-field[aria-disabled="true"]{ cursor: default; }
.select-sheet-field > select{ width: 100%; min-width: 0; max-width: 100%; margin: 0 !important; pointer-events: none; text-overflow: ellipsis; }
.select-sheet-field:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
html.select-sheet-open, html.select-sheet-open body{ overflow: hidden; }
.select-sheet{ position: fixed; inset: 0; z-index: 12020; display: flex; align-items: flex-end; justify-content: center; }
.select-sheet[hidden]{ display: none; }
.select-sheet-backdrop{ position: absolute; inset: 0; background: rgba(14,17,15,.45); backdrop-filter: blur(4px); }
.select-sheet-panel{
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: min(75vh, 640px);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--card);
  box-shadow: var(--shadow);
}
.select-sheet-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 20px; }
.select-sheet-head strong{ color: var(--ink); font-size: 1rem; font-weight: 700; }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-close{
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 999px; background: transparent !important; color: var(--muted) !important; box-shadow: none !important;
}
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-close svg{ width: 20px; height: 20px; }
.select-sheet-list{ overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.select-sheet-group{ padding: 16px 12px 4px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option{
  display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 48px; margin: 0 !important; padding: 12px !important;
  border: 0 !important; border-radius: 10px; background: transparent !important; box-shadow: none !important;
  color: var(--ink) !important; font: inherit; font-size: 1rem; font-weight: 500; text-align: left; cursor: pointer;
  min-width: 0; height: auto !important; line-height: 1.3;
}
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option:focus-visible{ background: var(--soft) !important; outline: none; }
@media (hover: hover){ html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option:hover{ background: var(--soft) !important; } }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option > span{ flex: 1 1 auto; min-width: 0; text-align: left; }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option svg{ flex: 0 0 auto; width: 20px; height: 20px; color: var(--accent); visibility: hidden; }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option[aria-selected="true"]{ font-weight: 600; }
html:not(#_):not(#__):not(#___) body .select-sheet .select-sheet-option[aria-selected="true"] svg{ visibility: visible; }
.select-sheet-foot{ padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }
.select-sheet-confirm{ width: 100%; justify-content: center; margin: 0 !important; }
@media (min-width: 700px){
  .select-sheet{ align-items: center; padding: 24px; }
  .select-sheet-panel{ width: min(100%, 420px); max-height: min(70vh, 560px); border-bottom: 1px solid var(--border); border-radius: 16px; }
}

/* Dashboard cards hidden in App preferences. */
[data-dashboard-card][hidden]{ display: none !important; }
.dashboard-card-pref-detail{ display: block; margin-top: 2px; font-size: .8125rem; font-weight: 400; }

/* Body weight in stone: stones and pounds side by side, each with its unit. */
.body-weight-st{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* A number box with its unit shown inside on the right (kg, lb, st, cm, ft, in). */
.unit-input{ position: relative; display: block; min-width: 0; }
.unit-input input{ width: 100%; padding-right: 2.75rem !important; }
.unit-input > span{ position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .875rem; font-weight: 500; pointer-events: none; }

/* Live field checks (static/field_checks.js): red until a username or new
   password meets the rules; a quiet confirmation once it does. */
html:not(#_) body input.is-invalid{
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 18%, transparent) !important;
}
.field-check-message{
  display: block;
  margin-top: 6px;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}
.field-check-message[hidden]{ display: none; }
.field-check-message.is-error{ color: var(--color-danger); }
html[data-theme="dark"] .field-check-message.is-error{ color: color-mix(in srgb, var(--color-danger) 70%, #ffffff); }
.field-check-message.is-ok::before{ content: "\2713  "; }

/* Scanner sheet (barcode and nutrition label). A dark camera stage with
   frosted glass controls: full screen on a phone so the camera gets the
   height, a roomy card on wider screens. Scoped to .scanner-sheet so it sits
   above the older scanner rules. */
html:not(#_):not(#__) body .scanner-sheet{ z-index: 12010; }
html:not(#_):not(#__) body .scanner-sheet .modal-backdrop{
  background: rgba(5,7,5,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-card{
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  max-height: min(92vh, 860px);
  margin: 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: #060806;
  color: #f8fafc;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 16px 16px 20px;
  border: 0;
  background: rgba(22,25,22,.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  z-index: 5;
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-head strong{ color: #f8fafc; font-size: 1.0625rem; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-head .muted{ color: rgba(229,233,229,.72); font-size: .875rem; margin-top: 2px; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-close{
  width: 40px; height: 40px; border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.08) !important;
  color: #f8fafc !important;
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-body{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: auto;
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-panel{ display: block; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-panel[hidden]{ display: none; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-frame{
  aspect-ratio: 4 / 3;
  max-height: min(56vh, 520px);
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}
/* The frame: a soft dimmed surround, bright corners, a sweeping line. */
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay::before{
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.42), 0 0 24px rgba(141,195,55,.25);
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay::after{
  height: 2px;
  background: linear-gradient(90deg, rgba(141,195,55,0), rgba(141,195,55,.95), rgba(141,195,55,0));
  box-shadow: 0 0 14px rgba(141,195,55,.6);
  animation: scanner-sweep 2.4s ease-in-out infinite;
}
/* A barcode is a wide strip; a nutrition table a tall panel. Fixed shapes
   so a tall phone screen doesn't stretch them. */
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-barcode::before{ width: 82%; height: auto; aspect-ratio: 3 / 2; max-height: 44%; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-barcode::after{ top: 50%; width: 74%; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-nutrition::before{ height: 70%; width: auto; aspect-ratio: 3 / 4; max-width: 84%; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-nutrition::after{ top: 50%; width: 70%; }
@keyframes scanner-sweep{
  0%, 100%{ transform: translate(-50%, -14px); opacity: .55; }
  50%{ transform: translate(-50%, 14px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce){
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay::after{ animation: none; }
}
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-controls{
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 20px;
  background: rgba(22,25,22,.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,.08);
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-actions > button{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0 !important;
  border-radius: 14px !important;
  font-weight: 600;
}
html:not(#_):not(#__) body .scanner-sheet #barcode-ocr-trigger, html:not(#_):not(#__) body .scanner-sheet #nutrition-ocr-trigger{
  background: #f8fafc !important;
  color: #101311 !important;
  border: 0 !important;
}
html:not(#_):not(#__) body .scanner-sheet #barcode-ocr-upload-trigger, html:not(#_):not(#__) body .scanner-sheet #nutrition-ocr-upload-trigger,
html:not(#_):not(#__) body .scanner-sheet #barcode-import-submit, html:not(#_):not(#__) body .scanner-sheet #nutrition-ocr-retry{
  background: rgba(255,255,255,.1) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
}
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-entry{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-controls > *{ min-width: 0; }
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-entry input{
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.06) !important;
  color: #f8fafc !important;
}
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-entry input::placeholder{ color: rgba(229,233,229,.55); }
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-entry button{ flex: 0 0 auto; min-height: 44px; margin: 0 !important; padding-inline: 16px !important; border-radius: 12px !important; }
html:not(#_):not(#__) body .scanner-sheet #barcode-import-status:empty{ display: none; }
html:not(#_):not(#__) body .scanner-sheet #barcode-import-status, html:not(#_):not(#__) body .scanner-sheet .nutrition-ocr-status{ color: rgba(229,233,229,.8); font-size: .875rem; opacity: 1; cursor: default; }

/* Phone: the camera takes the whole screen; the glass bars float over it. */
@media (max-width: 700px){
  html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-card{
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-head{
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
  }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-body{ flex: 1 1 auto; overflow: hidden; }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-body:has(.custom-food-scanner-panel:not([hidden])) .custom-food-scanner-panel{
    position: absolute;
    inset: 0;
  }
  /* The older phone rules capped the camera at about a quarter of the screen. */
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-frame{ aspect-ratio: auto; height: 100%; max-height: none; }
  html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-controls{
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
  }
  /* Phone: keep the frames clear of the glass bars -- the label frame sits in
     the space between the title bar and the controls, a little above centre. */
  /* The label frame fits the gap between the title bar and the controls
     (safe areas included), centred in it, so neither bar covers it. */
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-nutrition{
    --scan-top: calc(env(safe-area-inset-top, 0px) + 128px);
    --scan-gap: calc(100% - var(--scan-top) - env(safe-area-inset-bottom, 0px) - 132px);
    --scan-h: min(var(--scan-gap), 96vw);
  }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-nutrition::before{
    top: calc(var(--scan-top) + (var(--scan-gap) - var(--scan-h)) / 2);
    height: var(--scan-h);
    width: auto;
    max-width: 76%;
    transform: translateX(-50%);
  }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-nutrition::after{ top: calc(var(--scan-top) + var(--scan-gap) / 2); }
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-barcode::before,
  html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay-barcode::after{ top: 45%; }
  /* Without a camera (denied or none), the controls sit in the middle. */
  html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-body:not(:has(.custom-food-scanner-panel:not([hidden]))) .scanner-sheet-controls{
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

/* Scanner states (nutrition_add_food.html): a quicker sweep while a picture
   is read, green when something is found; Scan again sits on its own row. */
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-frame.is-reading .custom-food-scanner-overlay::after{ animation-duration: .9s; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-frame.is-found .custom-food-scanner-overlay::before{
  border-color: #4ade80;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.42), 0 0 28px rgba(74,222,128,.55);
}
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-frame.is-found .custom-food-scanner-overlay::after{ opacity: 0; animation: none; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay::before{ transition: border-color .2s ease, box-shadow .2s ease; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-actions > button span{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-actions > button{ min-width: 0; }
html:not(#_):not(#__) body .scanner-sheet .custom-food-barcode-actions > button{ padding-inline: 12px !important; }
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-rescan{ grid-column: 1 / -1; }
html:not(#_):not(#__) body .scanner-sheet .scanner-sheet-rescan[hidden]{ display: none !important; }
html:not(#_):not(#__) body .scanner-sheet .nutrition-ocr-retry-wrap{ margin: 0; }
html:not(#_):not(#__) body .scanner-sheet .nutrition-ocr-retry-wrap[hidden]{ display: none; }
html:not(#_):not(#__) body .scanner-sheet #nutrition-ocr-retry{ display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 0 !important; border-radius: 14px !important; }
/* The frame and its sweep stay over a frozen photo, so reading is visible. */
html:not(#_):not(#__) body .scanner-sheet .custom-food-scanner-overlay{ z-index: 5; }

/* Stats entries (weight, body fat, measurements): one compact row each --
   date, value, then neutral edit and delete icons. Editing opens the small
   entry form over the page. Photo edit/delete icons share the neutral look. */
.progress-entry-list{
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.progress-entry-item{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.progress-entry-date{ color: var(--muted); font-size: .875rem; white-space: nowrap; }
.progress-entry-value{ min-width: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.progress-entry-value .muted{ font-weight: 400; }
.progress-entry-item .progress-entry-actions{ display: inline-flex; align-items: center; gap: 2px; }
.progress-entry-item .progress-entry-actions form{ display: contents; margin: 0; }
html:not(#_):not(#__):not(#___) body :is(.progress-entry-icon-action, .progress-photo-icon-action),
html:not(#_):not(#__):not(#___) body :is(.progress-entry-icon-action, .progress-photo-icon-action):is(.progress-entry-icon-action--edit, .progress-entry-icon-action--delete, .progress-photo-edit-btn, .progress-photo-delete-btn){
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--muted) !important;
}
html:not(#_):not(#__):not(#___) body :is(.progress-entry-icon-action, .progress-photo-icon-action):is(:hover, :focus-visible){
  background: var(--soft) !important;
  color: var(--ink) !important;
}
html:not(#_):not(#__):not(#___) body :is(.progress-entry-icon-action, .progress-photo-icon-action) .nav-icon-lucide{ width: 18px; height: 18px; color: inherit !important; stroke: currentColor; }
.progress-measurement-picker{ display: grid; gap: 6px; max-width: 260px; margin-bottom: 12px; }
.progress-measurement-inputs{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.progress-measurement-inputs label{ display: grid; gap: 6px; min-width: 0; }

/* Effective sets folds away by default; the chevron turns when open. */
/* Muscle analytics disclosures (Effective sets, How this is worked out): one
   style -- a bold title and a chevron that turns. No tap flash or focus ring
   on tap; the ring still shows for keyboard focus. */
.muscle-disclosure > summary.muscle-disclosure-head{ list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; -webkit-tap-highlight-color: transparent; background: none; border-radius: var(--radius-sm); }
.muscle-disclosure > summary.muscle-disclosure-head:focus:not(:focus-visible){ outline: none; box-shadow: none; }
.muscle-disclosure > summary::-webkit-details-marker{ display: none; }
.muscle-disclosure-chevron{ width: 18px; height: 18px; color: var(--muted); transition: transform .16s ease; flex: 0 0 auto; }
.muscle-disclosure[open] .muscle-disclosure-chevron{ transform: rotate(180deg); }
.muscle-coverage[open] > summary{ margin-bottom: 8px; }
.muscle-effective-sets-panel[open] > .muscle-bars{ margin-top: 12px; }
/* Keep date, value and the two icons on one line (older entry-table rules
   stretched the actions onto a row of their own). */
html:not(#_):not(#__):not(#___) body .progress-entry-item{ display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important; }
html:not(#_):not(#__):not(#___) body .progress-entry-item .progress-entry-actions{ grid-column: auto !important; width: auto !important; margin: 0 !important; padding: 0 !important; justify-content: flex-end; border: 0 !important; background: none !important; }
.progress-entry-part{ white-space: nowrap; }
/* The separator travels with the part after it, so a line never starts or
   ends on a lone dot. */
.progress-entry-part + .progress-entry-part::before{ content: "· "; color: var(--muted); }
/* Coach view: who logged the entry, under the value. */
.progress-entry-by{ display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; font-weight: 400; }

/* Stats overview card: Training activity / Summary tabs, then the Week /
   Month / Year toggle; on a phone the toggle takes its own row. */
.stats-top-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.stats-top-head .stats-top-tabs{ margin:0; flex:0 1 auto; min-width:0; }
.stats-top-head .stats-top-periods{ margin:0; flex:0 0 auto; }
.stats-top-panel[hidden]{ display:none; }
.stats-top-panel > .progress-summary-grid:first-child{ margin-top:0; }
@media (max-width:560px){
  .stats-top-head .stats-top-periods{ width:100%; justify-content:space-between; }
  .stats-top-head .stats-top-periods > button{ flex:1 1 0; }
}

/* Stats: a week or month of training activity as a calendar. */
.activity-calendar{ display:grid; gap:6px; max-width:420px; margin:4px 0 12px; }
.activity-calendar-row{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; }
.activity-calendar-head span{ font-size:.7rem; font-weight:600; color:var(--muted); text-align:center; }
.activity-calendar .activity-calendar-day{
  display:grid; place-items:center; width:auto; height:auto; aspect-ratio:1;
  border-radius:8px; font-size:.78rem; font-weight:600; text-decoration:none;
  color:var(--ink); background:var(--heat-empty);
}
.activity-calendar .activity-calendar-day[data-level="1"]{ background:var(--heat-1); }
.activity-calendar .activity-calendar-day[data-level="2"]{ background:var(--heat-2); }
.activity-calendar .activity-calendar-day[data-level="3"]{ background:var(--heat-3); }
.activity-calendar .activity-calendar-day[data-level="4"]{ background:var(--heat-4); }
.activity-calendar .activity-calendar-day[data-level="3"],
.activity-calendar .activity-calendar-day[data-level="4"]{ color:#fff; }
/* The two lightest shades are light in both themes: dark purple numbers. */
.activity-calendar .activity-calendar-day[data-level="1"],
.activity-calendar .activity-calendar-day[data-level="2"]{ color:var(--heat-4); }
.activity-calendar .activity-calendar-day.is-off{ background:transparent; color:var(--muted); opacity:.45; }
.activity-calendar .activity-calendar-day.is-today{ outline:2px solid var(--progress-chart-line, #6ea103); outline-offset:2px; }
.activity-calendar.is-week{ max-width:520px; }

/* Volume against the period before: green up, muted down -- less volume is
   not a failure (a deload, a lighter week). */
.progress-volume-change{ display:inline-flex; align-items:flex-start; gap:4px; font-size:.75rem; line-height:1.35; color:var(--muted); }
.progress-volume-change .nav-icon-lucide{ width:14px; height:14px; flex:0 0 auto; margin-top:2px; }
.progress-volume-change.is-up{ color:#22c55e; } /* the weight card's "going the right way" green */

/* Disclosures everywhere (Settings, Log food, My foods, contacts, progress
   photos) open the way Stats' Effective sets does: one muted chevron that
   turns, not a + that becomes a -. */
html body .results-toggle-icon,
html body .results-toggle-icon.settings-toggle-icon{
  width:18px; height:18px; min-width:18px; flex:0 0 auto; margin-left:auto; padding:0;
  border:0 !important; border-radius:0; background:none !important; box-shadow:none !important;
  color:var(--muted) !important; transition:transform .16s ease;
}
html body .results-toggle-icon.is-open,
html body details[open] > summary .results-toggle-icon{ transform:rotate(180deg); }

/* Settings: the sections read as one grouped list, row by row with a divider
   between, instead of a stack of separate tall cards. */
.container > details.settings-section{
  margin-top:0; padding:0 1rem; border-radius:0; border-top-width:0;
}
.container > details.settings-section:first-of-type{
  margin-top:1rem; border-top-width:1px; border-radius:16px 16px 0 0;
}
.container > details.settings-section:last-of-type{ border-radius:0 0 16px 16px; }
.container > details.settings-section:first-of-type:last-of-type{ border-radius:16px; }
.container > details.settings-section > summary.settings-summary{ min-height:3.25rem; padding:.55rem 0; flex-wrap:nowrap; }
.container > .settings-section .settings-summary-head{ gap:.75rem; }
.container > .settings-section .settings-summary-icon,
html:not([data-theme="light"]) .container > .settings-section .settings-summary-icon{
  width:1.35rem; height:1.35rem; flex:0 0 1.35rem; border:0; border-radius:0; background:none; color:var(--muted);
}
.container > .settings-section .settings-summary-label{ font-size:.95rem; font-weight:600; }
.container > details.settings-section > .settings-body{
  margin:0 0 1rem; padding:.9rem 0 0; border-radius:0;
}
/* An open section's content sits under its row, not in a second filled box
   inside the list (beats the !important panel rules for both themes). */
html body.app[data-authenticated="1"] .container > details.settings-section > .settings-body{
  background:transparent !important; background-color:transparent !important;
  padding:.85rem 0 0 !important; border-radius:0 !important; margin:0 0 1rem;
}

/* Dashboard workout activity, drawn as Stats draws it: the calendar or the
   year grid fills the card; the year scrolls inside its own strip. */
.dashboard-activity-heatmap > .activity-calendar,
.dashboard-activity-heatmap > .progress-heatmap{ flex:1 1 auto; min-width:0; width:100%; }
.dashboard-activity-heatmap.is-year{ overflow:visible; padding-bottom:0; }
.dashboard-activity-heatmap > .activity-calendar{ margin:0; }

/* Settings on a phone: Subscription spans the page, lined up with the
   settings list beneath it. */
@media (max-width:720px){
  /* Page-head actions are a two-column grid on phones, made for a pair of
     buttons; Subscription is alone, so it takes one full column. */
  .page-head.settings-page-head > .settings-subscription-actions{ width:100%; flex:1 1 100%; grid-template-columns:minmax(0, 1fr); }
  html body .settings-page-head .settings-subscription-actions > .plan-cta{ width:100%; max-width:none; justify-content:center; }
}

/* Feed comments: replies sit indented under their comment with smaller
   avatars; reactions are small chips under the text; Reply and the react
   button share the quiet text-link row with Edit and Delete. */
.feed-comment-replies{ margin-left:44px; border-left:2px solid var(--border); padding-left:10px; }
.feed-comment-row.is-reply{ padding:6px 0; gap:10px; }
.feed-comment-row.is-reply .feed-comment-avatar{ flex-basis:24px; width:24px; height:24px; font-size:.62rem; }
.feed-comment-reactions{ display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.feed-comment-reactions:empty{ display:none; }
.feed-comment-reactions .feed-comment-reaction{
  display:inline-flex; align-items:center; gap:3px; padding:1px 8px;
  border:1px solid var(--border); border-radius:999px; background:transparent;
  font-size:.85rem; line-height:1.4; cursor:pointer; -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease;
}
.feed-comment-reactions .feed-comment-reaction:focus-visible{ outline:2px solid var(--brand); outline-offset:1px; }
.feed-comment-reactions .feed-comment-reaction.is-static{ cursor:default; }
.feed-comment-reactions .feed-comment-reaction b{ font-size:.72rem; font-weight:700; color:var(--muted); }
.feed-comment-reactions .feed-comment-reaction.is-mine{ border-color:var(--brand); }
.feed-comment-reactions .feed-comment-reaction.is-mine b{ color:var(--brand); }
.feed-comment-reactions .feed-comment-reaction:active,
.feed-comment-reactions .feed-comment-reaction.is-sent{ transform:scale(.9); }
.feed-comment-actions .feed-comment-react .nav-icon-lucide{ width:16px; height:16px; }
.feed-comment-emoji-picker{ margin-top:6px; }
.feed-comment-replying{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-top:6px; padding:4px 4px 4px 10px; border-radius:10px;
  background:var(--soft); color:var(--muted); font-size:.8rem;
}
.feed-comment-replying[hidden]{ display:none; }
.feed-comment-replying strong{ color:var(--ink); }
.feed-comment-replying .feed-comment-reply-cancel{
  display:inline-flex; align-items:center; justify-content:center; padding:4px; color:var(--muted);
  cursor:pointer; -webkit-tap-highlight-color:transparent; border-radius:999px;
}
.feed-comment-replying .feed-comment-reply-cancel:is(:hover, :focus-visible){ color:var(--ink); outline:none; }
.feed-comment-replying .feed-comment-reply-cancel .nav-icon-lucide{ width:14px; height:14px; }
/* Comment like: a plain thumbs-up that fills with the accent once liked. */
.feed-comment-actions .feed-comment-like .nav-icon-lucide{ width:16px; height:16px; }
html:not(#_) body.app[data-authenticated="1"] .feed-comment-actions .feed-comment-like.is-active{ color:var(--brand) !important; }
.feed-comment-actions .feed-comment-like.is-active .nav-icon-lucide{ fill:currentColor; fill-opacity:.25; }

/* Settings: App preferences, a row in the list that opens its own page --
   laid out like the sections around it, with an arrow instead of a chevron. */
.container > a.settings-section.settings-link-row{
  display:block; margin-top:0; padding:0 1rem; border-radius:0; border-top-width:0;
  color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent;
}
.container > a.settings-section.settings-link-row .settings-link-summary{
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  min-height:3.25rem; padding:.55rem 0;
}
.container > a.settings-section.settings-link-row .settings-link-go{ width:18px; height:18px; flex:0 0 auto; color:var(--muted); }
.container > a.settings-section.settings-link-row:is(:hover, :focus-visible){ background:var(--soft); }

/* Personal bests: one list with a row per lift -- the whole name (it wraps
   rather than being cut), the date, and the best on the right, bold. The row
   opens the trend. */
html body .history-pb-card .pb-list{
  display:block !important; gap:0; margin-top:12px; border:1px solid var(--border); border-radius:14px; overflow:hidden;
}
html body.app .history-pb-card .pb-list > .pb-row,
html[data-theme] body.app[data-authenticated="1"] .history-pb-card .pb-list > .pb-row{
  display:flex !important; align-items:center; gap:12px !important; width:100%; margin:0;
  padding:11px 12px 11px 14px !important; border:0 !important; border-radius:0 !important;
  border-top:1px solid var(--border) !important;
  background:transparent !important; background-image:none !important; box-shadow:none !important;
  color:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
html body.app .history-pb-card .pb-list > .pb-row:first-child,
html[data-theme] body.app[data-authenticated="1"] .history-pb-card .pb-list > .pb-row:first-child{ border-top:0 !important; }
html body.app .history-pb-card .pb-list > .pb-row:is(:hover, :focus-visible, :active),
html[data-theme] body.app[data-authenticated="1"] .history-pb-card .pb-list > .pb-row:is(:hover, :focus-visible, :active){
  background:var(--soft) !important; outline:none;
}
.history-pb-card .pb-row-body{ display:grid; gap:2px; flex:1 1 auto; min-width:0; }
/* The whole name, wrapping onto a second line if it must, never cut short
   (beats the authenticated-app ellipsis rule). */
body.app[data-authenticated="1"] .history-pb-card .pb-row-name,
.history-pb-card .pb-row-name{ font-size:.92rem; font-weight:600; line-height:1.3; color:var(--ink); white-space:normal !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere; }
.history-pb-card .pb-row-meta{ display:flex; align-items:center; gap:6px; font-size:.78rem; line-height:1.3; }
.history-pb-card .pb-row-new{
  padding:0 6px; border-radius:999px; font-size:.68rem; font-weight:700; line-height:1.5;
  color:#a16207; background:rgba(250,204,21,.18);
}
html[data-theme="dark"] .history-pb-card .pb-row-new{ color:#facc15; }
.history-pb-card .pb-row-value{ flex:0 0 auto; font-size:.95rem; font-weight:700; color:var(--ink); white-space:nowrap; }
.history-pb-card .pb-row-go{ flex:0 0 auto; width:16px; height:16px; color:var(--muted); }

/* Log food's Recent / Top matches / Favourites: one list with dividers and
   short rows, the food's calories at a glance before the details toggle. */
#food-results .food-list:not(.is-collapsed){
  display:block; gap:0; border:1px solid var(--border); border-radius:14px; overflow:hidden;
}
#food-results .food-list > .food-row-simple,
#food-results .food-list > .food-row-simple:is(:hover, :focus, :focus-visible, :active){
  padding:.55rem .75rem !important; border:0 !important; border-top:1px solid var(--border) !important;
  border-radius:0 !important; background:transparent !important; box-shadow:none !important;
}
#food-results .food-list > .food-row-simple:first-child{ border-top:0 !important; }
#food-results .food-list > .food-row-simple:is(:hover, :focus-visible){ background:var(--soft) !important; }
#food-results .food-title{ font-size:.92rem; flex:1 1 auto; min-width:0; }
#food-results .food-title-kcal{ flex:0 0 auto; font-size:.78rem; color:var(--muted); white-space:nowrap; }
#food-results .results-heading{ margin-top:.85rem; margin-bottom:.4rem; }

/* Athlete profiles (athlete_profile.html, athlete_connections.html): a person
   at a glance from the feed -- header, followers, Follow / Message, then their
   workouts or stats. Compact rows in one list, as Personal bests and Settings. */
.athlete-profile{ display:grid; gap:14px; max-width:640px; margin:0 auto; }
.athlete-topbar{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.athlete-topbar-title{ flex:1 1 auto; margin:0; font-size:1.15rem; }
.athlete-icon-btn{
  display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px;
  border-radius:999px; color:var(--ink); text-decoration:none; cursor:pointer; list-style:none;
  -webkit-tap-highlight-color:transparent;
}
.athlete-icon-btn::-webkit-details-marker{ display:none; }
.athlete-icon-btn:is(:hover, :focus-visible){ background:var(--soft); outline:none; }
.athlete-icon-btn .nav-icon-lucide{ width:20px; height:20px; }
.athlete-menu{ position:relative; }
.athlete-menu-list{
  position:absolute; right:0; top:42px; z-index:30; display:grid; gap:6px; min-width:200px; padding:8px;
  border:1px solid var(--border); border-radius:14px; background:var(--card); box-shadow:var(--shadow);
}
.athlete-menu-list form{ margin:0; }
.athlete-menu-list .athlete-menu-item{ width:100%; justify-content:flex-start; }
.athlete-menu-list .athlete-menu-item.is-danger{ color:#ef4444 !important; }
.athlete-head{ display:flex; align-items:center; gap:14px; }
.athlete-avatar{
  flex:0 0 72px; width:72px; height:72px; border-radius:50%; overflow:hidden;
  display:flex; align-items:center; justify-content:center; background:var(--soft);
  font-size:1.6rem; font-weight:700; color:var(--muted);
}
.athlete-avatar img{ width:100%; height:100%; object-fit:cover; }
.athlete-head-text{ min-width:0; }
.athlete-head-text h2{ margin:0; font-size:1.35rem; line-height:1.2; overflow-wrap:anywhere; }
.athlete-username{ font-size:.85rem; }
.athlete-head-meta{ display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:4px; font-size:.9rem; color:var(--muted); }
.athlete-followers{ display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; font-size:.92rem; }
.athlete-followers > .nav-icon-lucide{ width:16px; height:16px; color:var(--muted); margin-left:auto; }
.athlete-face-stack{ display:inline-flex; }
.athlete-face-stack .athlete-face + .athlete-face{ margin-left:-8px; }
.athlete-face{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:28px; height:28px;
  border-radius:50%; overflow:hidden; background:var(--soft); border:2px solid var(--card);
  font-size:.65rem; font-weight:700; color:var(--muted);
}
.athlete-face img{ width:100%; height:100%; object-fit:cover; }
.athlete-actions{ display:grid; grid-template-columns:repeat(auto-fit, minmax(0, 1fr)); gap:10px; }
.athlete-actions .athlete-action-form{ margin:0; display:grid; }
.athlete-actions .athlete-action{ width:100%; justify-content:center; }
.athlete-actions .athlete-action.is-static{ cursor:default; }
.athlete-self-note{ margin:-4px 0 0; font-size:.8rem; }
.athlete-tabs{ margin:2px 0 0; }
.athlete-list{ border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.athlete-post, .athlete-person, .athlete-stat-row{
  display:flex; align-items:center; gap:12px; padding:11px 14px; border-top:1px solid var(--border);
  color:inherit; text-decoration:none;
}
.athlete-list > :first-child{ border-top:0; }
.athlete-post:is(:hover, :focus-visible){ background:var(--soft); outline:none; }
.athlete-post .nav-icon-lucide{ width:16px; height:16px; color:var(--muted); flex:0 0 auto; }
.athlete-post-text{ display:grid; gap:2px; flex:1 1 auto; min-width:0; }
.athlete-post-text strong{ font-size:.92rem; }
.athlete-post-text .muted{ font-size:.78rem; overflow-wrap:anywhere; }
.athlete-stats h3{ margin:4px 0 8px; font-size:1rem; }
.athlete-figures{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-bottom:12px; }
.athlete-figures div{ display:grid; gap:2px; }
.athlete-figures span{ font-size:.78rem; }
.athlete-figures strong{ font-size:1.25rem; }
.athlete-figures small{ font-size:.75rem; color:var(--muted); font-weight:600; }
.athlete-chart{ margin-top:4px; }
.athlete-chart-note{ margin:4px 0 14px; font-size:.75rem; }
.athlete-stat-row .nav-icon-lucide{ width:16px; height:16px; color:var(--muted); flex:0 0 auto; }
.athlete-stat-row span{ flex:1 1 auto; font-size:.9rem; }
.athlete-stat-row strong{ font-size:.9rem; white-space:nowrap; }
.athlete-locked{
  display:grid; justify-items:center; gap:6px; padding:28px 16px; border:1px dashed var(--border);
  border-radius:14px; text-align:center; color:var(--muted);
}
.athlete-locked p{ margin:0; }
.athlete-empty{ margin:4px 0; }
.athlete-section-head{
  display:flex; justify-content:space-between; margin-top:6px; padding:0 2px;
  font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted);
}
.athlete-person{ padding:10px 12px 10px 14px; }
.athlete-person form{ margin:0; flex:0 0 auto; }
.athlete-person-link{ display:flex; align-items:center; gap:12px; flex:1 1 auto; min-width:0; color:inherit; text-decoration:none; }
.athlete-person-link .athlete-face{ width:40px; height:40px; border:0; font-size:.8rem; }
.athlete-person-text{ display:grid; gap:1px; min-width:0; }
.athlete-person-text strong{ font-size:.92rem; overflow-wrap:anywhere; }
.athlete-person-text .muted{ font-size:.78rem; }
.athlete-person .athlete-chip{ min-height:0; padding:.35rem .8rem; font-size:.8rem; white-space:nowrap; }
.athlete-person .athlete-chip.is-static{ cursor:default; }

/* Feed: a name or picture opens that person's profile. */
.feed-header a.feed-profile-link,
.feed-comment-row a.feed-profile-link{ color:inherit; text-decoration:none; }
.feed-header a.feed-name{ display:block; }
.athlete-actions .btn.athlete-action{ display:inline-flex; align-items:center; gap:8px; margin:0; }
.athlete-person .btn.athlete-chip{ margin:0; min-width:0; }
.athlete-person .athlete-you{ flex:0 0 auto; font-size:.8rem; padding-right:4px; }

/* Profile points: the total large, recent gains beside it, how they're
   earned in the info tip. Gold, as personal bests are marked elsewhere. */
.athlete-points{
  display:flex; align-items:center; gap:12px; margin:0 0 16px; padding:12px 14px;
  border:1px solid var(--border); border-radius:14px;
  background:linear-gradient(135deg, rgba(250,204,21,.10), transparent 60%);
}
.athlete-points-icon{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px;
  border-radius:12px; background:rgba(250,204,21,.16); color:#ca8a04;
}
html[data-theme="dark"] .athlete-points-icon{ color:#facc15; }
.athlete-points-icon .nav-icon-lucide{ width:20px; height:20px; }
.athlete-points-total{ display:grid; gap:0; flex:1 1 auto; min-width:0; }
.athlete-points-total .muted{ font-size:.78rem; }
.athlete-points-total strong{ font-size:1.5rem; line-height:1.15; }
.athlete-points-recent{ display:grid; gap:2px; text-align:right; font-size:.78rem; color:var(--muted); }
.athlete-points-recent b{ color:var(--ink); font-weight:700; }
.athlete-points-chip{ display:inline-flex; align-items:center; gap:4px; color:var(--ink); font-weight:600; }
.athlete-points-chip .nav-icon-lucide{ width:15px; height:15px; color:#ca8a04; }
html[data-theme="dark"] .athlete-points-chip .nav-icon-lucide{ color:#facc15; }

/* A picker whose field is still needed shows it, like a typed field. */
.select-sheet-field.is-invalid > select{ border-color:var(--color-danger) !important; }

/* Report a problem (report_problem.html) and the admin issues inbox. */
.report-problem-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.report-problem-kinds{
  border:0;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.report-problem-kinds legend{
  padding:0;
  margin-bottom:8px;
  font-weight:600;
}
.report-problem-kind{
  position:relative;
  cursor:pointer;
}
.report-problem-kind input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.report-problem-kind:has(input:focus-visible){
  outline:2px solid var(--brand);
  outline-offset:2px;
}
.report-problem-card textarea{
  width:100%;
  resize:vertical;
}
.report-problem-sent{
  align-items:center;
  text-align:center;
  padding:32px 16px;
}
.report-problem-sent p{ margin:0; }
.report-problem-sent-icon{
  color:var(--brand);
  font-size:2rem;
  line-height:0;
}
.report-problem-sent-icon svg{ width:40px; height:40px; }

.admin-unread-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:4px;
  border-radius:999px;
  background:var(--color-danger);
  color:var(--color-on-accent);
  font-size:0.75rem;
  font-weight:700;
  vertical-align:middle;
}
.issue-list{
  display:flex;
  flex-direction:column;
  margin-top:12px;
}
.issue-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 4px;
  border-top:1px solid var(--border);
  color:var(--ink);
  text-decoration:none;
}
.issue-row:first-child{ border-top:0; }
.issue-row-main{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.issue-row-main strong{
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.issue-row.is-unread .issue-row-main strong{ font-weight:700; }
.issue-row-main .muted{ font-size:0.8125rem; }
.issue-status{
  flex:none;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  font-size:0.75rem;
  font-weight:600;
}
.issue-status.is-new{
  background:var(--brand);
  border-color:var(--brand);
  color:var(--color-on-accent);
}
.issue-status.is-looking{
  border-color:var(--brand);
  color:var(--brand);
}
.issue-message{
  margin:0 0 16px;
  white-space:pre-wrap;
  font-size:1rem;
}
.issue-facts{
  display:grid;
  grid-template-columns:max-content 1fr;
  gap:8px 16px;
  margin:0;
  font-size:0.875rem;
}
.issue-facts dt{ color:var(--muted); }
.issue-facts dd{
  margin:0;
  overflow-wrap:anywhere;
}
.issue-errors{
  margin:0;
  padding-left:16px;
}
.issue-status-tabs{
  flex-wrap:wrap;
}
.issue-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
@media (max-width: 560px){
  .issue-facts{ grid-template-columns:1fr; gap:4px; }
  .issue-facts dd{ margin-bottom:8px; }
}

/* Dashboard card order and workout card choice (settings_preferences.html,
   card_sort.js). */
.dashboard-card-sort li{
  justify-content:flex-start;
  background:var(--card);
  touch-action:pan-y;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.dashboard-card-sort .dashboard-card-pref-text{
  flex:1 1 auto;
  min-width:0;
}
html:not(#_) body.app .dashboard-card-sort .dashboard-card-handle{
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:40px;
  margin:-4px 0 -4px -8px;
  padding:0;
  /* The global button rules use !important; a handle is not a button. */
  border:0 !important;
  border-radius:var(--radius-sm);
  background:transparent !important;
  color:var(--muted) !important;
  cursor:grab;
  touch-action:none;
  box-shadow:none !important;
}
html:not(#_) body.app .dashboard-card-sort .dashboard-card-handle:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:0;
}
.dashboard-card-sort.is-sorting{ cursor:grabbing; }
.dashboard-card-sort li.is-dragging{
  position:relative;
  z-index:2;
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow);
  transition:box-shadow .15s ease;
}
/* "Start a workout" (partials/dashboard_start_card.html): Up next's shape,
   with the week page's two ways in. On desktop it and Up next can both show:
   they take the first rows of the left column in the person's order, and the
   column of cards follows. */
@media (min-width: 1280px){
  body.user-dashboard-page .dashboard-grid > .dashboard-hero-card{ grid-row:auto; }
  body.user-dashboard-page .dashboard-grid > .dashboard-main-stack{ grid-row:auto; }
}
.dashboard-workout-feature[hidden]{ display:none !important; }
html:not(#_) body.app .dashboard-start-actions{
  flex-direction:row;
  justify-content:flex-end;
  gap:12px;
}
.dashboard-start-actions form{ margin:0; flex:1 1 0; display:flex; }
html:not(#_) body.app .dashboard-start-actions > *{ flex:1 1 0; min-width:0; }
html:not(#_) body.app .dashboard-start-actions .dashboard-workout-cta{ width:100%; }
.dashboard-start-routine{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

/* Upgrade to Pro (locked pages, Plans, upgrade_unavailable): gold, the
   paywall's colour. Two ids' weight to clear the theme-wide button rules. */
html:not(#_):not(#__) body.app .upgrade-cta.upgrade-cta{
  background:var(--color-upgrade) !important;
  background-image:none !important;
  border-color:var(--color-upgrade) !important;
  color:var(--color-on-upgrade) !important;
}
html:not(#_):not(#__) body.app .upgrade-cta.upgrade-cta :is(span, svg, .nav-icon-lucide){
  color:var(--color-on-upgrade) !important;
}
html:not(#_):not(#__) body.app .upgrade-cta.upgrade-cta:is(:hover, :focus-visible, :active){
  background:var(--color-upgrade-hover) !important;
  border-color:var(--color-upgrade-hover) !important;
}

/* Start a workout and Library have no muscle figure: their words take the
   whole width rather than leaving its column empty. */
html body.app.user-dashboard-page[data-authenticated="1"] :is(.dashboard-start-card, .dashboard-library-card) .dashboard-workout-feature-top{
  grid-template-columns:minmax(0, 1fr);
}

/* Locked pages on phones (premium_locked.html): the whole card, upgrade
   button included, in view without scrolling on most phones. */
@media (max-width: 640px){
  .premium-locked-head{ margin-bottom:0; }
  .premium-locked{ margin-top:8px; }
  .premium-locked .settings-feature-lock-card{
    gap:14px;
    padding:18px;
  }
  .premium-locked .settings-feature-lock-icon{
    width:38px;
    height:38px;
  }
  .premium-locked .settings-feature-lock-list li{ padding:9px 0; }
}
/* Short phones: the feature names alone, so the button still shows. */
@media (max-width: 640px) and (max-height: 760px){
  .premium-locked .settings-feature-lock-list li small{ display:none; }
  .premium-locked .settings-feature-lock-list li{ padding:8px 0; }
}

/* Back arrow and page name across the top on phones (partials/page_topbar.html),
   for the pages Settings opens. Wider screens keep each page's own head. */
.page-topbar{ display:none; }
@media (max-width: 640px){
  .page-topbar{
    display:grid;
    grid-template-columns:44px minmax(0, 1fr) 44px;
    align-items:center;
    min-height:52px;
    margin:0 0 16px;
    border-bottom:1px solid var(--border);
  }
  .page-topbar-back{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    margin-left:-10px;
    border-radius:var(--radius-sm);
    color:var(--ink);
    text-decoration:none;
  }
  .page-topbar-back:is(:hover, :focus-visible){
    background:var(--soft);
    outline:none;
  }
  .page-topbar-back .nav-icon-lucide{ width:26px; height:26px; }
  .page-topbar-title{
    margin:0;
    color:var(--ink);
    font-size:1.0625rem;
    font-weight:600;
    text-align:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  /* The page head below keeps only its description. */
  .page-topbar + .page-head h2,
  .page-topbar + .page-head .page-actions{ display:none !important; }
  .page-topbar + .page-head{ margin-top:0; }
}

/* Feed: you at a glance, a compact profile header (feed.html .feed-me). */
html:not(#_) body.app .feed-page .feed-me{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0;
  padding:12px 12px 12px 16px;
}
/* Kept close: the head, your card, stories and the posts read as one column. */
html:not(#_) body.app .feed-page{row-gap:8px}
html:not(#_) body.app .feed-page > .page-head{margin-bottom:0}
html:not(#_) body.app .feed-page > .page-head h2{margin:0}
html:not(#_) body.app .feed-page .feed-me-avatar{
  flex:0 0 56px;
  width:56px;
  height:56px;
  font-size:1.2rem;
  text-decoration:none;
}
.feed-me-main{ flex:1 1 auto; min-width:0; display:grid; gap:6px; }
.feed-me-name{ display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; }
.feed-me-name > a{ min-width:0; color:var(--ink); text-decoration:none; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.feed-me-stats{ display:flex; gap:20px; }
.feed-me-stats a{
  position:relative;
  display:grid;
  color:var(--ink);
  text-decoration:none;
  line-height:1.2;
  -webkit-tap-highlight-color:transparent;
}
.feed-me-stats strong{ display:inline-flex; align-items:center; gap:6px; font-size:1rem; font-weight:700; }
.feed-me-stats a > span:not(.feed-people-badge){ font-size:.75rem; color:var(--muted); }
.feed-me-stats a:is(:hover, :focus-visible) > span:not(.feed-people-badge){ color:var(--ink); }
.feed-me-stats a:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; border-radius:4px; }
.feed-me-find{ flex:none; align-self:flex-start; }
/* Stories (feed.html): a ring round a picture means a story to watch; grey
   once watched. Yours is the picture on your card, with + to add one. */
.feed-me-story{ position:relative; flex:none; }
.story-ring{
  --story-gap:var(--card);
  display:inline-flex;
  padding:2px;
  border:0;
  border-radius:50%;
  background:conic-gradient(from 200deg, var(--brand), var(--violet), var(--accent), var(--brand));
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.story-ring.is-seen{ background:var(--border); }
.story-ring > .athlete-avatar{ box-shadow:0 0 0 2px var(--story-gap); }
.story-ring:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
/* Your story: your picture flips like a coin to its photo, holds, and spins
   on round to your picture again, every few seconds. Your border (from the
   shop) stays put round it. Still with reduced motion. */
html:not(#_):not(#__) body.app .feed-me-story-btn{
  position:relative;
  border-radius:50% !important;
  background:var(--soft) !important;
  color:var(--muted);
  cursor:pointer;
  perspective:300px;
}
html:not(#_):not(#__) body.app .feed-me-story-btn:focus:not(:focus-visible){ outline:none !important; }
/* Keep your shop border (drawn as a box-shadow; animated ones add a ring). */
html:not(#_):not(#__) body.app .feed-me-story-btn[class*="cosmetic-border--"]{
  box-shadow:0 0 0 3px var(--card), 0 0 0 5px var(--cosmetic-ring, transparent) !important;
}
.feed-me-coin{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  transform-style:preserve-3d;
}
.feed-me-coin-face{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:50%;
  background:var(--soft);
  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
}
.feed-me-coin-face img{ width:100%; height:100%; object-fit:cover; }
.feed-me-coin-back{ transform:rotateY(180deg); }
@media (prefers-reduced-motion: no-preference){
  .feed-me-coin{ animation:story-coin 7s ease-in-out 1.5s infinite; }
}
@keyframes story-coin{
  0%, 58%{ transform:rotateY(0deg); }
  66%, 86%{ transform:rotateY(180deg); }
  94%, 100%{ transform:rotateY(360deg); }
}
html:not(#_) body.app .feed-page button.story-add{
  position:absolute;
  right:-2px;
  bottom:-2px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  min-height:0;
  padding:0;
  border:2px solid var(--card);
  border-radius:50%;
  background:var(--brand);
  color:var(--color-on-accent);
  box-shadow:none;
}
.story-add .nav-icon-lucide{ width:10px; height:10px; stroke-width:3.5; }
/* A larger tap target than the badge itself. */
.story-add::after{ content:""; position:absolute; inset:-10px; }

.story-strip{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding:2px 16px 4px;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
}
.story-strip::-webkit-scrollbar{ display:none; }
html:not(#_) body.app .feed-page button.story-strip-item{
  display:grid;
  justify-items:center;
  gap:4px;
  flex:none;
  width:76px;
  min-height:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  color:var(--ink);
}
.story-strip .story-ring{ --story-gap:var(--bg); }
.story-avatar{ flex:0 0 60px; width:60px; height:60px; font-size:1rem; }
.story-strip-name{
  display:block;
  width:76px;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.75rem;
  color:var(--muted);
}

.story-share{
  width:min(92vw, 420px);
  padding:0;
  border:1px solid var(--border);
  border-radius:var(--radius-lg, 16px);
  background:var(--card);
  color:var(--ink);
}
.story-share::backdrop{ background:rgba(0, 0, 0, .6); }
.story-share-body{ display:grid; gap:12px; padding:16px; }
.story-share-body img{ width:100%; max-height:60vh; object-fit:contain; border-radius:12px; background:#000; }
.story-share-note{ margin:0; font-size:.85rem; }
.story-share-actions{ display:flex; justify-content:flex-end; gap:8px; }

/* The viewer fills the screen on phones; a phone-shaped frame elsewhere. */
.story-viewer{
  width:100vw;
  max-width:100vw;
  position:fixed;
  inset:0 auto auto 0;
  height:var(--story-viewer-height,100dvh);
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  background:#000;
  color:#fff;
}
.story-viewer::backdrop{ background:#000; }
.story-viewer-frame{
  position:relative;
  isolation:isolate;
  width:min(100vw, calc(var(--story-viewer-height,100dvh) * 9 / 16));
  height:100%;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding-top:env(safe-area-inset-top);
}
.story-viewer-image{ position:relative;z-index:0;max-width:100%;max-height:100%;object-fit:contain;transform:translateZ(0);backface-visibility:hidden;transition:none; }
.story-progress{
  position:absolute;
  top:calc(env(safe-area-inset-top) + 8px);
  left:8px;
  right:8px;
  z-index:2;
  display:flex;
  gap:4px;
}
.story-progress-seg{ flex:1; height:3px; border-radius:2px; background:rgba(255, 255, 255, .35); overflow:hidden; }
.story-progress-seg > span{ display:block; height:100%; background:#fff; }
.story-viewer-head{
  position:absolute;
  top:calc(env(safe-area-inset-top) + 18px);
  left:12px;
  right:4px;
  z-index:3;
  display:flex;
  align-items:center;
  gap:8px;
  text-shadow:0 1px 3px rgba(0, 0, 0, .6);
}
.story-viewer-avatar{ flex:0 0 32px; width:32px; height:32px; font-size:.75rem; }
.story-viewer-profile{ display:flex; align-items:center; gap:8px; min-width:0; color:#fff; text-decoration:none; font-size:.9rem; }
.story-viewer-profile strong{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.story-viewer-profile:focus:not(:focus-visible),
.story-viewer-frame:focus{ outline:none; }
.story-viewer-profile:focus-visible{ outline:2px solid #fff; outline-offset:2px; border-radius:999px; }
.story-viewer-age{ flex:1; min-width:0; opacity:.75; font-size:.8rem; white-space:nowrap; }
html:not(#_) body.app .story-viewer-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  min-height:0;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  box-shadow:none;
  color:#fff;
}
.story-viewer-btn[hidden]{ display:none !important; }
.story-viewer-btn .nav-icon-lucide{ width:22px; height:22px; filter:drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
html:not(#_) body.app .story-tap{
  position:absolute;
  top:72px;
  bottom:0;
  z-index:1;
  min-height:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  -webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;
  user-select:none;
}
.story-tap--back{ left:0; width:35%; }
.story-tap--next{ right:0; width:65%; }
.story-tap:focus-visible{ outline:2px solid #fff; outline-offset:-4px; }

/* Story controls are not app buttons: undo the global button look (which
   uses !important) for them alone. */
html:not(#_):not(#__) body.app :is(.story-ring, .story-add, .story-strip-item, .story-viewer-btn, .story-tap, .athlete-story-thumb, .feed-me-story-btn){
  min-height:0 !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  background-color:transparent !important;
  padding:0 !important;
  color:inherit;
}
html:not(#_):not(#__) body.app :is(.story-ring, .story-add, .story-viewer-btn){ border-radius:50% !important; }
html:not(#_):not(#__) body.app :is(.story-tap, .story-strip-item){ border-radius:0 !important; overflow:visible !important; }
html:not(#_):not(#__) body.app .story-ring{
  padding:4px !important;
  background:conic-gradient(from 200deg, var(--brand), var(--accent), var(--violet), var(--brand)) !important;
}
html:not(#_):not(#__) body.app .story-ring.is-seen{ background:var(--border) !important; }
html:not(#_):not(#__) body.app .story-add{
  background:var(--brand) !important;
  border:2px solid var(--card) !important;
  color:var(--color-on-accent);
}
/* White like the other viewer controls (the app's bins are red elsewhere). */
html:not(#_):not(#__) body.app .story-viewer-btn{ color:#fff !important; }
html:not(#_):not(#__) body.app .story-viewer-btn .nav-icon-lucide{ color:#fff !important; stroke:#fff !important; width:22px !important; height:22px !important; }
html:not(#_):not(#__) body.app :is(.story-viewer-btn, .story-tap)[hidden]{ display:none !important; }

/* A profile's live stories, top of its Workouts tab (athlete_profile_body.html). */
.athlete-stories{ display:grid; gap:8px; }
.athlete-story-row{ display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px; }
.athlete-story-row::-webkit-scrollbar{ display:none; }
html:not(#_):not(#__) body.app .athlete-story-thumb{
  position:relative;
  flex:none;
  width:76px;
  height:128px;
  overflow:hidden;
  border-radius:12px !important;
  outline:2px solid var(--brand);
  outline-offset:2px;
  background:var(--soft) !important;
  cursor:pointer;
}
html:not(#_):not(#__) body.app .athlete-story-thumb.is-seen{ outline-color:var(--border); }
.athlete-story-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.athlete-story-thumb > span{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:12px 6px 6px;
  background:linear-gradient(transparent, rgba(0, 0, 0, .6));
  color:#fff;
  font-size:.6875rem;
  font-weight:600;
  text-align:left;
}

.issue-story-image{ display:block; max-width:min(100%, 320px); margin:12px 0; border-radius:12px; background:#000; }

/* Phones: edge to edge, like the feed's posts below it. */
@media (max-width: 640px){
  html:not(#_) body.app .feed-page .feed-me{
    margin-inline:0;
    border-radius:0;
    border-inline:0;
    box-shadow:none;
  }
}
@media (max-width: 380px){
  .feed-me-stats{ gap:14px; }
}
.feed-people-badge{
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:var(--color-danger);
  color:var(--color-on-accent);
  font-size:.6875rem;
  font-weight:700;
}

/* People page (athlete_connections.html): five at a time,
   with Show more. */
.contacts-page-hidden{ display:none !important; }
.contacts-show-more{
  display:flex;
  width:100%;
  justify-content:center;
  margin-top:12px;
}

.athlete-search{ margin:0 0 12px; }
/* Followers page: on phones the shared top bar replaces its own head row. */
@media (max-width: 640px){
  .page-topbar + .athlete-connections > .athlete-topbar{ display:none; }
  .page-topbar + .leaderboard > .athlete-topbar{ display:none; }
}

/* Streak badges on feed posts and profiles (feed.html, athlete_profile.html,
   services/streaks.py). The flame runs
   from amber at a 2 streak to deep red at the top (--streak-heat 0 to 1),
   a step warmer every day or week. */
.streak-badge{
  --streak-hue:calc(42 - 38 * var(--streak-heat, 0));
  --streak-colour:hsl(var(--streak-hue) 92% calc(56% - 6% * var(--streak-heat, 0)));
  display:inline-flex;
  align-items:center;
  gap:3px;
  height:20px;
  padding:0 7px 0 5px;
  border-radius:999px;
  background:color-mix(in srgb, var(--streak-colour) calc(12% + 14% * var(--streak-heat, 0)), transparent);
  color:var(--ink);
  font-size:.6875rem;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}
.streak-badge .nav-icon-lucide{
  width:13px;
  height:13px;
  color:var(--streak-colour);
  fill:color-mix(in srgb, var(--streak-colour) calc(20% + 60% * var(--streak-heat, 0)), transparent);
}
.feed-time:has(.streak-badge){ flex-wrap:wrap; row-gap:4px; }

/* Comeback and momentum achievements on feed posts (feed.html). */
.feed-milestones{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 8px;
}
.feed-milestone{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:26px;
  padding:0 10px 0 8px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--milestone-colour) 35%, transparent);
  background:color-mix(in srgb, var(--milestone-colour) 12%, transparent);
  color:var(--ink);
  font-size:.75rem;
  font-weight:700;
}
.feed-milestone--comeback{ --milestone-colour:#22c55e; }
.feed-milestone--momentum{ --milestone-colour:var(--brand); }
.feed-milestone .nav-icon-lucide{
  width:14px;
  height:14px;
  color:var(--milestone-colour);
}
/* Once, the first time a post is seen (feed.html watchBadges). */
@media (prefers-reduced-motion: no-preference){
  :is(.streak-badge, .feed-milestone).is-fresh .nav-icon-lucide{
    animation:badge-pop .9s cubic-bezier(.2, .8, .2, 1) both;
  }
  .streak-badge.is-fresh .nav-icon-lucide{ animation-name:badge-flicker; }
}
@keyframes badge-pop{
  0%{ transform:scale(.4) rotate(-12deg); opacity:0; }
  55%{ transform:scale(1.3) rotate(6deg); opacity:1; }
  100%{ transform:scale(1) rotate(0); }
}
@keyframes badge-flicker{
  0%{ transform:scale(.5) translateY(3px); opacity:0; }
  40%{ transform:scale(1.35) translateY(-2px); opacity:1; }
  60%{ transform:scale(.95) rotate(-6deg); }
  80%{ transform:scale(1.08) rotate(4deg); }
  100%{ transform:scale(1) rotate(0); }
}
/* People: four tabs fit on narrow phones. */
@media (max-width: 380px){
  html:not(#_) body.app .athlete-connections .athlete-tabs .progress-subtab-btn{ padding-left:8px !important; padding-right:8px !important; }
}

/* Points shop cosmetics (services/points_shop.py). Borders ring the avatar,
   with a gap in the card colour; accents colour a profile's decorative bits
   (avatar tint, title, active tab, points star) and never the app theme;
   titles sit under the username. Dark and light each get a readable shade. */
.cosmetic-border--violet_outline{ --cosmetic-ring:#8b5cf6; }
.cosmetic-border--ice_blue{ --cosmetic-ring:#7dd3fc; }
.cosmetic-border--copper{ --cosmetic-ring:#c47a45; }
.cosmetic-border--gold{ --cosmetic-ring:#d4a72c; }
[class*="cosmetic-border--"]{
  box-shadow:0 0 0 3px var(--card), 0 0 0 5px var(--cosmetic-ring);
}
/* Animated borders: a ring drawn round the avatar that turns (--ring-turn).
   Each sets its colours (--ring) and pace; the top ones add a second ring or
   a glint. They hold still with reduced motion. */
@property --ring-turn{ syntax:"<angle>"; inherits:false; initial-value:0deg; }
@property --ring-turn-back{ syntax:"<angle>"; inherits:false; initial-value:360deg; }
:is(.cosmetic-border--animated_violet, .cosmetic-border--animated_ice, .cosmetic-border--animated_ember, .cosmetic-border--animated_gold, .cosmetic-border--rainbow, .cosmetic-border--aurora, .cosmetic-border--prism){
  position:relative;
  overflow:visible !important;
  box-shadow:0 0 0 3px var(--card);
  --ring-width:2px;
  --ring-speed:6s;
}
:is(.cosmetic-border--animated_violet, .cosmetic-border--animated_ice, .cosmetic-border--animated_ember, .cosmetic-border--animated_gold, .cosmetic-border--rainbow, .cosmetic-border--aurora, .cosmetic-border--prism) > img{ border-radius:50%; }
:is(.cosmetic-border--animated_violet, .cosmetic-border--animated_ice, .cosmetic-border--animated_ember, .cosmetic-border--animated_gold, .cosmetic-border--rainbow, .cosmetic-border--aurora, .cosmetic-border--prism)::before,
.cosmetic-border--aurora::after,
.cosmetic-border--prism::after{
  content:"";
  position:absolute;
  inset:-5px;
  z-index:1;
  pointer-events:none;
  border-radius:50%;
  background:conic-gradient(from var(--ring-turn), var(--ring));
  /* Only the outer edge: the ring, with the avatar left clear inside. */
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - var(--ring-width)), #000 calc(100% - var(--ring-width)));
  mask:radial-gradient(farthest-side, transparent calc(100% - var(--ring-width)), #000 calc(100% - var(--ring-width)));
}
.cosmetic-border--animated_violet{ --ring:#8b5cf6, #c4b5fd, #6d28d9, #8b5cf6; }
.cosmetic-border--animated_ice{ --ring:#0ea5e9, #e0f2fe, #7dd3fc, #38bdf8, #0ea5e9; --ring-speed:5s; }
.cosmetic-border--animated_ember{ --ring:#dc2626, #f97316, #fdba74, #ea580c, #dc2626; --ring-speed:4.5s; }
.cosmetic-border--animated_gold{ --ring:#a16207, #facc15, #fef3c7, #d4a72c, #a16207; --ring-speed:5s; }
.cosmetic-border--rainbow{ --ring:#ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444; --ring-speed:4s; }
/* Aurora: an outer ring one way and a finer inner ring the other. */
.cosmetic-border--aurora{ --ring:#22c55e, #14b8a6, #8b5cf6, #06b6d4, #22c55e; --ring-speed:5s; box-shadow:0 0 0 4px var(--card); }
.cosmetic-border--aurora::before{ inset:-6px; --ring-width:2px; }
.cosmetic-border--aurora::after{
  inset:-3px;
  --ring-width:1.5px;
  background:conic-gradient(from var(--ring-turn-back), #a78bfa, #34d399, #67e8f9, #a78bfa);
}
/* Prism: a thicker rainbow with a point of light circling it. */
.cosmetic-border--prism{ --ring:#ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444; --ring-speed:3.5s; --ring-width:3px; box-shadow:0 0 0 3px var(--card); }
.cosmetic-border--prism::before{ inset:-6px; }
.cosmetic-border--prism::after{
  inset:-6px;
  --ring-width:3px;
  background:conic-gradient(from var(--ring-turn-back), transparent 0deg, rgba(255,255,255,.95) 8deg, transparent 22deg, transparent 360deg);
}
@media (prefers-reduced-motion: no-preference){
  :is(.cosmetic-border--animated_violet, .cosmetic-border--animated_ice, .cosmetic-border--animated_ember, .cosmetic-border--animated_gold, .cosmetic-border--rainbow, .cosmetic-border--aurora, .cosmetic-border--prism)::before{ animation:ring-turn var(--ring-speed) linear infinite; }
  .cosmetic-border--aurora::after{ animation:ring-turn-back 7s linear infinite; }
  .cosmetic-border--prism::after{ animation:ring-turn-back 2.6s linear infinite; }
}
@keyframes ring-turn{ to{ --ring-turn:360deg; } }
@keyframes ring-turn-back{ to{ --ring-turn-back:0deg; } }

.profile-accent--amethyst{ --profile-accent:#81b430; }
.profile-accent--ocean{ --profile-accent:#8dc337; }
.profile-accent--emerald{ --profile-accent:#34d399; }
.profile-accent--sunset{ --profile-accent:#fb923c; }
html[data-theme="light"] .profile-accent--amethyst{ --profile-accent:#4a6d03; }
html[data-theme="light"] .profile-accent--ocean{ --profile-accent:#4e6f18; }
html[data-theme="light"] .profile-accent--emerald{ --profile-accent:#51721e; }
html[data-theme="light"] .profile-accent--sunset{ --profile-accent:#c2410c; }
[class*="profile-accent--"] .athlete-avatar{
  background:color-mix(in srgb, var(--profile-accent) 22%, var(--soft));
  color:var(--ink);
}
[class*="profile-accent--"] .profile-title:not([class*="profile-title--"]){
  border-color:color-mix(in srgb, var(--profile-accent) 45%, transparent);
  color:var(--profile-accent);
}
[class*="profile-accent--"] .athlete-points-chip .nav-icon-lucide{ color:var(--profile-accent) !important; }
html:not(#_) body.app [class*="profile-accent--"] .athlete-tabs .progress-subtab-btn.active{
  border-bottom-color:var(--profile-accent) !important;
}

.profile-title{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin-top:4px;
  padding:2px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.02em;
}
.profile-title[hidden]{ display:none; }

/* The shop page (points_shop.html). */
.shop{ display:flex; flex-direction:column; gap:16px; }
.shop-balance{ display:flex; align-items:center; gap:12px; }
.shop-balance > div{ display:flex; flex-direction:column; flex:1 1 auto; }
.shop-balance strong{ font-size:1.5rem; line-height:1.2; }
.shop-balance-icon{
  display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px;
  border-radius:12px; background:var(--soft); color:#facc15;
}
html[data-theme="light"] .shop-balance-icon{ color:#ca8a04; }
.shop-lifetime{ font-size:.8125rem; white-space:nowrap; }
.shop-preview{ display:flex; align-items:center; gap:16px; }
.shop-preview-avatar{ flex:0 0 56px; width:56px; height:56px; font-size:1.25rem; }
.shop-preview-text{ display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
.shop-preview-text strong{ overflow-wrap:anywhere; }
.shop-preview-label{ align-self:flex-start; font-size:.75rem; }
.shop-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; }
.shop-item{ position:relative; display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:14px; }
.shop-item.is-equipped{ border-color:var(--brand); }
.shop-item.is-previewing{ outline:2px solid var(--brand); outline-offset:2px; }
html:not(#_) body.app .shop-item-preview{
  display:flex; align-items:center; justify-content:center; height:72px;
  border:0 !important; border-radius:var(--radius-sm); background:var(--soft) !important;
  box-shadow:none !important; cursor:pointer; color:var(--ink) !important;
}
.shop-sample-avatar{
  display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px;
  border-radius:50%; background:var(--card); color:var(--muted); font-weight:700;
}
.shop-sample-accent{ display:inline-flex; flex-direction:column; align-items:center; gap:6px; color:var(--profile-accent, var(--muted)); }
.shop-sample-accent .nav-icon-lucide{ width:22px; height:22px; }
.shop-sample-accent span{ width:40px; height:3px; border-radius:2px; background:var(--profile-accent, var(--border)); }
.shop-sample-title{ margin:0; }
.shop-item-text{ display:flex; flex-direction:column; gap:2px; }
.shop-price{ display:inline-flex; align-items:center; gap:4px; color:var(--muted); font-size:.8125rem; }
.shop-price .nav-icon-lucide{ width:13px; height:13px; }
.shop-item form{ margin:0; }
.shop-action{ width:100%; justify-content:center; }
.shop-short{ font-size:.8125rem; text-align:center; padding:8px 0; }
.shop-equipped{
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  color:var(--brand); font-size:.8125rem; font-weight:600;
}
.shop-equipped .nav-icon-lucide{ width:14px; height:14px; }
.shop-entry{ display:inline-flex; align-items:center; gap:6px; margin-top:8px; }

/* Your own profile: Edit profile (and Followers) as compact buttons, not a
   full-width bar. */
.athlete-actions--self{ display:flex; flex-wrap:wrap; gap:8px; }
html:not(#_) body.app .athlete-actions--self .athlete-action{
  width:auto !important;
  min-height:36px !important;
  height:36px;
  padding:0 14px !important;
  font-size:.875rem !important;
}
.athlete-actions--self .athlete-action .nav-icon-lucide{ width:15px; height:15px; }
.settings-profile-card form{ display:flex; flex-direction:column; gap:12px; }
.settings-profile-card input[type="file"]{ width:100%; max-width:100%; box-sizing:border-box; min-width:0; }
.settings-profile-card label{ min-width:0; }

/* Profile spacing (athlete_profile_body.html, used by the profile page and
   the People You tab): the body lays its parts out with room between them,
   and Stats' parts each get their own space. */
.athlete-profile-body{ display:grid; gap:16px; min-width:0; }
.athlete-profile-body .athlete-head{ gap:16px; }
.athlete-profile-body .athlete-head-meta{ gap:6px 12px; margin-top:8px; }
.athlete-profile-body .profile-title{ margin-top:6px; }
.athlete-profile-body .athlete-followers{ padding:4px 0; }
.athlete-profile-body .athlete-self-note{ margin:-6px 0 0; }
.athlete-profile-body .athlete-tabs{ margin-top:4px; }
.athlete-stats{ display:grid; gap:16px; }
.athlete-stats .athlete-points{ margin:0; padding:14px 16px; }
.athlete-stats .shop-entry{ justify-self:start; margin:-4px 0 0; }
.athlete-stats h3{ margin:4px 0 -4px; }
.athlete-stats .athlete-figures{ margin:0; gap:12px; }
.athlete-stats .athlete-chart-note{ margin:-8px 0 0; }
.athlete-stat-rows .athlete-stat-row{ padding:14px 16px; }
.athlete-you{ padding-top:8px; }
/* Feed: a person's border round their picture or initials (feed.html). */
.feed-avatar[class*="cosmetic-border--"] > :is(img, .feed-avatar-placeholder){ border-radius:50%; }

/* Points tab (athlete_profile_body.html): earned and to spend side by side,
   a split bar and list of sources, and a stacked bar per month. One colour
   per source, readable on both themes. */
.points-source--training{ --source:#659306; background:var(--source); }
.points-source--bests{ --source:#f59e0b; background:var(--source); }
.points-source--streak{ --source:#ef4444; background:var(--source); }
.points-source--earlier{ --source:#707471; background:var(--source); }
.athlete-points-pair{ display:grid; gap:12px; }
@media (min-width: 641px){ .athlete-points-pair{ grid-template-columns:1fr 1fr; } }
.athlete-points--spend{ background:linear-gradient(135deg, rgba(101,147,6,.10), transparent 60%); }
.athlete-points--spend .athlete-points-icon{ background:rgba(101,147,6,.16); color:#659306; }
html[data-theme="dark"] .athlete-points--spend .athlete-points-icon{ color:#9cd73d; }
.athlete-shop-btn{ display:inline-flex; align-items:center; gap:6px; flex:none; white-space:nowrap; }
.athlete-shop-btn .nav-icon-lucide{ width:16px; height:16px; }
.points-split{ display:flex; gap:2px; height:12px; border-radius:999px; overflow:hidden; background:var(--soft); }
.points-split-part{ min-width:4px; }
.points-sources .athlete-stat-row{ align-items:center; }
.points-swatch{ flex:none; width:12px; height:12px; border-radius:4px; }
.points-source-text{ display:flex; flex-direction:column; flex:1 1 auto; min-width:0; }
.points-source-text small{ font-size:.75rem; }
.points-sources strong small{ font-weight:600; margin-left:4px; }
.points-months{
  display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:10px; align-items:end;
  height:170px; padding:12px; border:1px solid var(--border); border-radius:14px;
}
.points-month{ display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; min-width:0; }
.points-month-total{ font-size:.75rem; font-weight:700; color:var(--ink); min-height:1em; }
.points-month-bar{
  flex:1 1 auto; width:min(28px, 100%); display:flex; flex-direction:column-reverse;
  border-radius:6px; overflow:hidden; background:var(--soft);
}
.points-month-bar > span{ display:block; width:100%; }
.points-month-label{ font-size:.75rem; }
.athlete-stat-rows .athlete-stat-row > .points-swatch{ flex:0 0 12px !important; width:12px !important; max-width:12px; height:12px; padding:0; }

/* Titles warm up the further up the ladder they are (points_shop.CATALOGUE):
   silver, steel, teal, green, violet, magenta, gold, then a fiery gradient
   for Final Boss and a shimmering one for GOAT. Each has a darker shade in
   light mode. A title keeps its colour whatever accent is worn. */
.profile-title[class*="profile-title--"]{
  color:var(--title-colour);
  border-color:color-mix(in srgb, var(--title-colour) 45%, transparent);
  background:color-mix(in srgb, var(--title-colour) 10%, transparent);
}
.profile-title--title_main_character{ --title-colour:#d1d5d2; }
.profile-title--title_no_days_off{ --title-colour:#9bd73c; }
.profile-title--title_certified_beast{ --title-colour:#94ce38; }
.profile-title--title_different_breed{ --title-colour:#4ade80; }
.profile-title--title_untouchable{ --title-colour:#81b430; }
.profile-title--title_main_event{ --title-colour:#f472b6; }
.profile-title--title_living_legend{ --title-colour:#facc15; }
.profile-title--title_final_boss{ --title-colour:#fb923c; }
.profile-title--title_goat{ --title-colour:#fde68a; }
.profile-title--title_muel{ --title-colour:#a0dd3e; }   /* exclusive, plain */
html[data-theme="light"] .profile-title--title_muel{ --title-colour:#4e6f18; }
html[data-theme="light"] .profile-title--title_main_character{ --title-colour:#525552; }
html[data-theme="light"] .profile-title--title_no_days_off{ --title-colour:#496d02; }
html[data-theme="light"] .profile-title--title_certified_beast{ --title-colour:#52731f; }
html[data-theme="light"] .profile-title--title_different_breed{ --title-colour:#15803d; }
html[data-theme="light"] .profile-title--title_untouchable{ --title-colour:#4a6d03; }
html[data-theme="light"] .profile-title--title_main_event{ --title-colour:#be185d; }
html[data-theme="light"] .profile-title--title_living_legend{ --title-colour:#a16207; }
html[data-theme="light"] .profile-title--title_final_boss{ --title-colour:#c2410c; }
html[data-theme="light"] .profile-title--title_goat{ --title-colour:#a16207; }
.profile-title.profile-title--title_final_boss,
.profile-title.profile-title--title_goat{
  /* The gradient fills the letters; a faint tint fills the chip behind. */
  -webkit-text-fill-color:transparent;
  background-image:var(--title-ink), linear-gradient(color-mix(in srgb, var(--title-colour) 10%, transparent), color-mix(in srgb, var(--title-colour) 10%, transparent));
  -webkit-background-clip:text, padding-box;
  background-clip:text, padding-box;
}
.profile-title--title_final_boss{ --title-ink:linear-gradient(90deg, #fbbf24, #f97316, #ef4444); }
html[data-theme="light"] .profile-title--title_final_boss{ --title-ink:linear-gradient(90deg, #b45309, #c2410c, #b91c1c); }
.profile-title.profile-title--title_goat{
  --title-ink:linear-gradient(90deg, #fde68a, #f59e0b, #ec4899, #659306, #83b632, #fde68a);
  background-size:200% 100%, 100% 100%;
}
html[data-theme="light"] .profile-title--title_goat{ --title-ink:linear-gradient(90deg, #a16207, #c2410c, #be185d, #4a6d03, #53761d, #a16207); }
@media (prefers-reduced-motion: no-preference){
  .profile-title.profile-title--title_goat{ animation:title-shimmer 4s linear infinite; }
}
@keyframes title-shimmer{ to{ background-position:-200% 0, 0 0; } }
/* The Creator: an exclusive title (points_shop.EXCLUSIVE), never sold.
   Holographic letters that drift, a ring that turns, a glint that sweeps
   across, and a soft glow. All of it holds still with reduced motion. */
@property --creator-turn{ syntax:"<angle>"; inherits:false; initial-value:0deg; }
.profile-title.profile-title--title_the_creator{
  --title-colour:#fbbf24;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  padding:3px 11px;
  border-color:transparent;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  -webkit-text-fill-color:transparent;
  background-image:
    linear-gradient(100deg, #fff7d6, #fbbf24, #f472b6, #81b430, #97d337, #fbbf24, #fff7d6),
    linear-gradient(rgba(22,25,22,.78), rgba(22,25,22,.78));
  background-size:300% 100%, 100% 100%;
  -webkit-background-clip:text, padding-box;
  background-clip:text, padding-box;
  filter:drop-shadow(0 0 6px rgba(251, 191, 36, .35));
}
/* The ring: a turning gradient, shown only as the chip's edge. */
.profile-title.profile-title--title_the_creator::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  padding:1.5px;
  border-radius:inherit;
  background:conic-gradient(from var(--creator-turn), #fbbf24, #f472b6, #81b430, #97d337, #fbbf24);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events:none;
}
/* The glint. */
.profile-title.profile-title--title_the_creator::after{
  content:"";
  position:absolute;
  top:-2px;
  bottom:-2px;
  left:-60%;
  width:40%;
  background:linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform:skewX(-20deg);
  opacity:0;
  pointer-events:none;
}
@media (prefers-reduced-motion: no-preference){
  .profile-title.profile-title--title_the_creator{
    animation:title-shimmer 6s linear infinite, creator-glow 3s ease-in-out infinite;
  }
  .profile-title.profile-title--title_the_creator::before{ animation:creator-turn 4s linear infinite; }
  .profile-title.profile-title--title_the_creator::after{ animation:creator-glint 4.5s ease-in-out 1s infinite; }
}
@keyframes creator-turn{ to{ --creator-turn:360deg; } }
@keyframes creator-glint{
  0%{ left:-60%; opacity:0; }
  8%{ opacity:1; }
  30%, 100%{ left:130%; opacity:0; }
}
@keyframes creator-glow{
  0%, 100%{ filter:drop-shadow(0 0 4px rgba(251, 191, 36, .25)); }
  50%{ filter:drop-shadow(0 0 10px rgba(244, 114, 182, .45)); }
}
/* Chief Tester: exclusive too, a step below The Creator. Teal-to-green
   letters that drift, a glowing edge that breathes, and the same glint;
   no turning ring. Still with reduced motion. */
.profile-title.profile-title--title_chief_tester{
  --title-colour:#94ce38;
  position:relative;
  overflow:hidden;
  padding:3px 10px;
  border-color:color-mix(in srgb, #94ce38 60%, transparent);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  -webkit-text-fill-color:transparent;
  background-image:
    linear-gradient(100deg, #b9fd52, #94ce38, #34d399, #8dc337, #b9fd52),
    linear-gradient(rgba(22,25,22,.72), rgba(22,25,22,.72));
  background-size:300% 100%, 100% 100%;
  -webkit-background-clip:text, padding-box;
  background-clip:text, padding-box;
  box-shadow:0 0 6px rgba(148,206,56,.25);
}
.profile-title.profile-title--title_chief_tester::after{
  content:"";
  position:absolute;
  top:-2px;
  bottom:-2px;
  left:-60%;
  width:35%;
  background:linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform:skewX(-20deg);
  opacity:0;
  pointer-events:none;
}
@media (prefers-reduced-motion: no-preference){
  .profile-title.profile-title--title_chief_tester{
    animation:title-shimmer 7s linear infinite, tester-breathe 3.5s ease-in-out infinite;
  }
  .profile-title.profile-title--title_chief_tester::after{ animation:creator-glint 6s ease-in-out 2s infinite; }
}
@keyframes tester-breathe{
  0%, 100%{ box-shadow:0 0 4px rgba(148,206,56,.2); }
  50%{ box-shadow:0 0 10px rgba(148,206,56,.45); }
}
/* Narrower in a shop card's sample. */
.shop-item-preview .profile-title:is(.profile-title--title_the_creator, .profile-title--title_chief_tester){ padding:3px 8px; font-size:.6875rem; letter-spacing:.05em; }
.shop-exclusive{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#fbbf24;
  font-size:.8125rem;
  font-weight:700;
}
.shop-exclusive .nav-icon-lucide{ width:14px; height:14px; }
.profile-title{ white-space:nowrap; }
.shop-category-help{ margin:-4px 0 0; font-size:.875rem; }
/* The shop preview shows what an accent colours: the points star and a tab line. */
.shop-preview-details{ display:flex; align-items:center; gap:12px; margin-top:4px; font-size:.8125rem; }
.shop-preview-tab{
  padding-bottom:2px;
  border-bottom:2px solid var(--profile-accent, #7bac2c);
  color:var(--ink);
  font-weight:600;
}
.shop-preview .athlete-points-chip, .shop-preview-label{ white-space:nowrap; }
.settings-profile-view{ display:block; margin-bottom:16px; border:1px solid var(--border); border-radius:14px; overflow:hidden; }

/* Onboarding: choose a starter plan (register_plan.html). Category tabs, then
   the programme and the week to start from. */
.starter-plan form{ display:grid; gap:16px; }
.starter-plan-tabs{ margin:0; overflow-x:auto; scrollbar-width:none; }
/* Five categories fit across a phone without scrolling. */
html:not(#_):not(#__) body.app .starter-plan-tabs .progress-subtab-btn{ padding-inline:8px !important; flex:1 1 auto; }
.starter-plan-tabs::-webkit-scrollbar{ display:none; }
.starter-plan-panel{ display:grid; gap:12px; }
.starter-plan-panel[hidden], .starter-plan-week[hidden]{ display:none; }
.starter-plan-about{ margin:0; font-size:.9rem; }
.starter-plan-panel label{ margin:0; }
.starter-plan-summary{ margin:0; font-size:.9rem; color:var(--muted); }
.starter-plan-actions{ display:grid; gap:8px; }
.starter-plan-actions > button{ width:100%; justify-content:center; }
.page-head h2.field-label-row{ display:flex; align-items:center; gap:8px; }
.onboarding-prefs{ display:grid; gap:12px; }
.onboarding-prefs-continue{ width:100%; justify-content:center; }

/* Library Plans and Exercises sit flat on the page like Routines: no card,
   no panel header (the Library tabs already say where you are) and the
   search is a plain field, the same as Search routines. */
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel){
  margin-top: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) > .library-panel-head{
  display: none !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) .library-master-body{
  display: block !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) :is(.library-modern-list, .exercise-list-modern){
  border-top: 0 !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) .library-search-input-wrap{
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) .library-search-input-wrap input{
  min-height: 2.75rem !important;
  padding-top: .625rem !important;
  padding-bottom: .625rem !important;
  border: 1px solid #e5e9e5 !important;
  border-radius: var(--radius-sm, 12px) !important;
  background: #fff !important;
  color: #161916 !important;
}
html[data-theme="dark"]:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) .library-search-input-wrap input{
  border-color: rgba(111,155,41,.18) !important;
  background: rgba(111,155,41,.06) !important;
  color: var(--color-text-primary, #f0f4f8) !important;
}
html:not(#_):not(#__) body.app[data-authenticated="1"] .coach-library-page :is(#user-training-library, #coach-training-library, #user-exercise-panel, #coach-exercise-panel, #coach-locker-panel, #client-locker-panel) .library-search-input-wrap input:focus{
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--ring) !important;
}

/* Leaderboard (leaderboard.html): your community by lifetime points, with a
   gold, silver and bronze cup for the top three. */
.leaderboard{
  --medal-gold: #e8b923;
  --medal-silver: #adb0ad;
  --medal-bronze: #c27c3e;
}
.leaderboard-list{ list-style:none; margin:16px 0 0; padding:0; border-top:1px solid var(--border); }
.leaderboard-row{
  display:grid; grid-template-columns:40px minmax(0, 1fr) auto; align-items:center; gap:12px;
  padding:12px 4px; border-bottom:1px solid var(--border);
}
.leaderboard-row.is-me{ background:var(--soft); border-radius:12px; border-bottom-color:transparent; padding-inline:8px; }
.leaderboard-place{ display:flex; justify-content:center; }
.leaderboard-number{ font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums; }
.leaderboard-cup{
  display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%;
  background:color-mix(in srgb, var(--cup) 18%, transparent); color:var(--cup);
}
.leaderboard-cup .nav-icon-lucide{ width:18px; height:18px; }
.leaderboard-cup--gold{ --cup: var(--medal-gold); }
.leaderboard-cup--silver{ --cup: var(--medal-silver); }
.leaderboard-cup--bronze{ --cup: var(--medal-bronze); }
.leaderboard-person{ display:flex; align-items:center; gap:12px; min-width:0; color:inherit; text-decoration:none; }
.leaderboard-person .athlete-face{ width:40px; height:40px; border:0; font-size:.8rem; }
.leaderboard-row.is-me .athlete-face{ background:var(--card); }
.leaderboard-about{ margin:8px 0 0; font-size:.9rem; }
.leaderboard-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.leaderboard-row.is-podium .leaderboard-name{ font-weight:700; }
.leaderboard-you{
  display:inline-block; margin-left:6px; padding:1px 8px; border-radius:999px; font-size:.7rem; font-weight:700;
  background:var(--brand); color:#fff; vertical-align:middle;
}
.leaderboard-points{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.leaderboard-points strong{ font-size:1rem; }
.leaderboard-points small{ color:var(--muted); font-weight:600; }
.leaderboard-empty{ padding:16px 4px; }


/* Library exercise rows: only the pencil opens the editor (base.html). It
   gets a soft round highlight on hover and while open, never a focus box on
   tap; keyboard focus keeps a visible ring. */
.exercise-row-summary{ cursor:default; -webkit-tap-highlight-color:transparent; }
.exercise-row-summary:focus{ outline:none; }
html:not(#_):not(#__) body.app .exercise-row-card .library-row-edit-icon{
  width:36px !important; height:36px !important; min-width:36px !important; min-height:36px !important;
  padding:0 !important; border:0 !important; border-radius:50% !important;
  background:transparent !important; box-shadow:none !important; outline:none !important;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
  transform:none !important;
  transition:background-color .2s ease, color .2s ease !important;
}
html:not(#_):not(#__) body.app .exercise-row-card .library-row-edit-icon:hover,
html:not(#_):not(#__) body.app .exercise-row-card[open] .library-row-edit-icon{
  background:var(--soft) !important;
}
html:not(#_):not(#__) body.app .exercise-row-card .library-row-edit-icon:focus-visible{
  box-shadow:0 0 0 2px var(--ring) !important;
}

/* Library tab switch placeholder (partials/library_tabs.html). */
.library-skeleton{ display:grid; gap:0; border-top:1px solid var(--border); }
.library-skeleton-row{ display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--border); }
.library-skeleton-block,
.library-skeleton-lines span{
  background:linear-gradient(90deg, rgba(159,163,160,.18), rgba(159,163,160,.33), rgba(159,163,160,.18));
  background-size:280% 100%;
  animation:messages-skeleton-wave 1.2s linear infinite;
}
.library-skeleton-block{ flex:0 0 auto; width:44px; height:44px; border-radius:12px; }
.library-skeleton-lines{ flex:1 1 auto; display:grid; gap:8px; }
.library-skeleton-lines span{ display:block; height:.7rem; border-radius:999px; width:70%; }
.library-skeleton-lines span + span{ width:45%; }
@media (prefers-reduced-motion: reduce){
  .library-skeleton-block, .library-skeleton-lines span{ animation:none; }
}

/* Exercise categories (static/exercise_groups.js): a full-width header per
   category that opens its list, 10 at a time. */
.coach-library-page .exercise-category-group{ display:block; gap:0; border-bottom:1px solid var(--color-border); }
.coach-library-page .exercise-category-group + .exercise-category-group{ margin-top:0; padding-top:0; border-top:0; }
html:not(#_):not(#__) body.app .exercise-category-toggle{
  display:flex !important; align-items:center; gap:12px; width:100% !important; min-height:56px !important;
  padding:12px 4px !important; margin:0 !important; border:0 !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important; color:var(--color-text-primary) !important;
  font:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent;
  transition:background-color .2s ease !important;
}
@media (hover: hover){ html:not(#_):not(#__) body.app .exercise-category-toggle:hover{ background:var(--soft) !important; } }
html:not(#_):not(#__) body.app .exercise-category-toggle:focus-visible{ box-shadow:inset 0 0 0 2px var(--ring) !important; }
.exercise-category-toggle strong{ flex:1 1 auto; font-size:1rem; }
.exercise-category-icon{
  display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px;
  background:var(--soft); color:var(--color-text-secondary); flex:0 0 auto;
}
.exercise-category-icon svg{ width:18px; height:18px; }
.exercise-category-chevron{ display:inline-flex; color:var(--color-text-secondary); transition:transform .2s ease; }
.exercise-category-chevron svg{ width:18px; height:18px; }
.exercise-category-group.is-open .exercise-category-chevron{ transform:rotate(180deg); }
.exercise-category-body{ padding:0 0 12px 12px; }
.exercise-category-body .library-plan-section + .library-plan-section{ margin-top:12px; }
.exercise-category-more{ margin-top:12px; }
.exercise-category-status{ margin:8px 0 0; }
@media (prefers-reduced-motion: reduce){ .exercise-category-chevron{ transition:none; } }


/* ── Coach screens, refreshed to match the rest of the app ───────────────
   Flat surfaces and the shared button colours instead of the old navy
   gradients and glossy shadows. Layout is unchanged. */

/* The main action on a coach page fills the width, like the Library's
   (its colours come from .pill-link). */
html:not(#_):not(#__) body.app :is(.coach-directory-add, .coach-kanban-summary .coach-kanban-new-btn){
  display:flex !important; align-items:center; justify-content:center; gap:8px; width:100% !important;
  box-shadow:none !important; background-image:none !important; list-style:none;
}
.coach-directory-add::-webkit-details-marker{ display:none; }

/* Panels and menus: plain cards, not navy gradients. */
html:not(#_):not(#__) body.app :is(.coach-directory-invite-panel, .coach-directory-more-menu){
  background:var(--card) !important; background-image:none !important;
  border:1px solid var(--color-border) !important; box-shadow:var(--shadow-soft, 0 8px 24px rgba(0,0,0,.18)) !important;
}

/* Client cards in the directory: a flat list split by lines, like the Library. */
html:not(#_):not(#__) body.app .coach-directory-card{
  background:transparent !important; background-image:none !important; box-shadow:none !important;
  border:0 !important; border-bottom:1px solid var(--color-border) !important; border-radius:0 !important;
}

/* Tasks: a page heading and action like other pages, and lanes as light outlines. */
html:not(#_):not(#__) body.app .coach-kanban-summary{
  background:transparent !important; background-image:none !important; border:0 !important;
  box-shadow:none !important; padding:0 !important;
}
html:not(#_):not(#__) body.app .coach-kanban-lane{
  background:transparent !important; background-image:none !important; box-shadow:none !important;
  border:1px solid var(--color-border) !important;
}
html:not(#_):not(#__) body.app .coach-kanban-add-btn{
  background:transparent !important; background-image:none !important; box-shadow:none !important; border:0 !important;
}

/* Embedded screens (embed_shell.html) have no app bar to clear. */
html:not(#_) body.embed-shell-app > main.shell{ margin-top:0 !important; padding-top:0 !important; }

/* Coach pop-ups and editors: shared card colours instead of navy gradients. */
html:not(#_):not(#__) body.app :is(.coach-client-payment-modal-card, .coach-directory-payment-automation-card){
  background:var(--card) !important; background-image:none !important;
}
html:not(#_):not(#__) body.app :is(
  .coach-payment-automation-client, .coach-payment-automation-confirm,
  .coach-directory-payment-automation-client, .coach-directory-payment-automation-confirm,
  .coach-automation-brand-preview, .coach-automation-content-body-block, .coach-automation-emoji-grid,
  .coach-automation-recurring-grid, .coach-automation-switch-card
){
  background:var(--soft) !important; background-image:none !important;
  border:1px solid var(--color-border) !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app .coach-automation-modal-actions{ background:transparent !important; background-image:none !important; }
html:not(#_):not(#__) body.app .coach-client-payments-panel::before{ display:none !important; }
html:not(#_):not(#__) body.app .coach-client-payment-modal-card .pill-link{ background-image:none !important; box-shadow:none !important; }

/* Task pop-up buttons use the app's button colours. */
html:not(#_):not(#__) body.app .task-action:not(.coach-kanban-add-btn):not(.coach-kanban-new-btn):not(.coach-kanban-edit-btn):not(.coach-kanban-delete-btn){
  background:var(--ui-btn-default-bg) !important; background-image:none !important; box-shadow:none !important;
  color:var(--ui-btn-default-fg) !important; border:0 !important;
}
html:not(#_):not(#__):not(#___) body.app .task-action.task-action-primary{
  background:var(--ui-btn-primary-bg) !important; color:var(--ui-btn-primary-fg) !important;
}
html:not(#_):not(#__)[data-theme] #task-modal .modal-card{
  background:var(--card) !important; border-color:var(--color-border) !important; box-shadow:var(--shadow-soft) !important;
}
html:not(#_):not(#__) #task-modal :is(input, textarea, select):not(:focus){ background:var(--soft) !important; border-color:var(--color-border) !important; }

/* Task card menu: a plain icon, no box. */
html:not(#_):not(#__) body.app .coach-kanban-edit-btn{
  background:transparent !important; border:0 !important; box-shadow:none !important; outline:0;
  color:var(--muted) !important; width:32px; height:32px; margin:-6px -6px 0 0; border-radius:999px;
}
html:not(#_):not(#__) body.app .coach-kanban-edit-btn:hover{ color:var(--text) !important; background:var(--ui-btn-default-bg) !important; }
html:not(#_):not(#__) body.app .coach-kanban-edit-btn svg{ width:18px; height:18px; }

/* Task form buttons: same shape, primary save, red delete. */
html:not(#_):not(#__) body.app #task-modal .modal-actions .task-action{
  flex:1 1 0; min-height:44px; border-radius:var(--radius-md, 12px) !important; font-weight:600;
  display:inline-flex; align-items:center; justify-content:center; padding:0 16px;
}
html:not(#_):not(#__):not(#___) body.app .task-action.task-action-danger{
  background:var(--ui-btn-danger-bg) !important; color:var(--ui-btn-danger-fg) !important;
}
/* Task form sits below the app bar so its title and close button stay visible. */
html:not(#_):not(#__) body.app #task-modal.is-open{ padding:72px 12px 12px; box-sizing:border-box; }
html:not(#_):not(#__) body.app #task-modal .modal-card{ max-height:100%; overflow-y:auto; margin:0 auto; }

/* Coach accounts: one icon colour throughout, white in dark mode and the main
   text colour in light mode. The app bar, bottom nav and sidebar are dark in
   both themes and icons on filled primary or danger buttons follow the
   button's own text colour, so those keep their own, as do the nutrition
   macro icons, which are colour-coded like the client sees them. */
html:not(#_):not(#__) body.app.is-coach-account svg.lucide:not(:is(.appbar, .header-nav, .desktop-sidebar, .ring-label, .target-rings, .macro-legend, [class*="macropro-stat-card"]) svg){ color:var(--color-text-primary) !important; }
html:not(#_):not(#__) body.app.is-coach-account :is(.btn-primary, .task-action-primary, .task-action-danger, .is-danger, .danger, [class*="btn-danger"]) svg.lucide{ color:inherit !important; }

/* Four Library tabs (with Locker) share one row: a little less padding and
   slightly smaller text so the longest label fits on small phones. */
html:not(#_):not(#__) body.app .routine-library-tabs:has(> a:nth-child(4)) > a{
  --ui-btn-padding-x:2px !important; --ui-btn-font-size:.8125rem !important; min-width:0;
}

/* Share a Locker file (coach_locker.html): a plain sheet below the app bar.
   The list and options scroll; the Share button stays at the bottom. */
html:not(#_):not(#__) body.app .share-sheet.is-open{
  padding:72px 12px 12px; box-sizing:border-box; align-items:flex-start;
}
html:not(#_):not(#__) body.app .share-sheet .share-sheet-card{
  display:flex; flex-direction:column; width:min(480px, 100%); max-height:100%; margin:0 auto; padding:0 !important;
  overflow:hidden; background:var(--card) !important; background-image:none !important;
  border:1px solid var(--color-border) !important; border-radius:var(--radius-lg, 16px) !important; box-shadow:var(--shadow-soft) !important;
}
.share-sheet-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:16px 16px 12px; border-bottom:1px solid var(--color-border);
}
.share-sheet-title{ display:grid; gap:2px; min-width:0; }
.share-sheet-title strong{ font-size:1.05rem; }
.share-sheet-file{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.share-sheet-form{ display:flex; flex-direction:column; min-height:0; flex:1 1 auto; margin:0; }
.share-sheet-body{
  flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  display:flex; flex-direction:column; gap:12px; padding:16px;
}
.share-sheet-body > *{ flex-shrink:0; }
.share-sheet-tools{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.share-sheet-link{ color:var(--brand); font-weight:600; font-size:.875rem; cursor:pointer; }
.share-sheet-clients{ display:grid; max-height:240px; overflow-y:auto; border-top:1px solid var(--color-border); }
.share-sheet-client{
  display:flex; align-items:center; gap:12px; padding:10px 8px; margin:0; border-radius:0;
  border-bottom:1px solid var(--color-border); cursor:pointer;
}
.share-sheet-client:has(input:checked){ background:var(--soft); }
.share-sheet-client input{ width:20px; height:20px; margin:0; flex:0 0 auto; accent-color:var(--brand); }
.share-sheet-avatar{
  width:32px; height:32px; border-radius:999px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  background:var(--soft); font-size:.75rem; font-weight:700;
}
.share-sheet-client-name{ display:grid; min-width:0; }
.share-sheet-client-name > *{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.share-sheet-field{ display:grid; gap:6px; margin:0; font-weight:600; }
.share-sheet-field textarea{ width:100%; resize:vertical; font-weight:400; }
.share-sheet-option{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.share-sheet-option > span{ display:grid; gap:2px; }
.share-sheet-actions{ padding:12px 16px 16px; border-top:1px solid var(--color-border); }
.share-sheet-actions .btn{ width:100%; min-height:44px; }
.share-sheet-actions .btn:disabled{ opacity:.5; cursor:not-allowed; }

/* Coach / Admin beside the wordmark: quiet text on the same line, set off
   by a thin rule, rather than a coloured pill. It takes the wordmark's own
   colour, faded, so it reads on every header and sidebar in both themes. */
html:not(#_):not(#__) body.app :is(.logo-text, .desktop-sidebar-logo-title){ white-space:nowrap; }
html:not(#_):not(#__) body.app :is(.logo-text, .desktop-sidebar-logo-title) .coach-badge{
  display:inline-block; vertical-align:baseline; margin-left:.5rem; padding:0 0 0 .5rem; border-radius:0;
  border-left:1px solid currentColor; background:none !important; color:inherit;
  opacity:.65; font-size:.72em; font-weight:500; letter-spacing:.02em; text-transform:none; line-height:1;
}

/* Exercise search while editing a workout (day rows and the plan editor):
   flat rows like the exercise library - the name, then the category in
   small muted text, divided by thin lines - instead of dark boxed cards. */
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results){
  gap:0 !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result{
  display:flex !important; align-items:center; width:100%; min-height:0 !important; margin:0 !important;
  padding:10px 6px !important; border:0 !important; border-bottom:1px solid var(--color-border) !important;
  border-radius:0 !important; background:transparent !important; background-image:none !important; box-shadow:none !important;
  color:var(--text) !important; text-align:left;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result:last-child{
  border-bottom:0 !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result:is(:hover, :focus-visible, .is-keyboard-active){
  background:var(--soft) !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result-main{
  display:grid !important; grid-template-columns:28px minmax(0, 1fr) !important; align-items:center; gap:12px !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result-icon{
  width:28px !important; height:28px !important; border-radius:999px !important; background:var(--soft) !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result-copy{
  display:grid; gap:2px !important; min-width:0;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .plan-exercise-search-result-name{
  font-size:.9rem !important; font-weight:600 !important; line-height:1.25 !important;
}
html:not(#_):not(#__) body.app :is(.off-plan-autocomplete-results, .movement-autocomplete-results) .exercise-category-pill{
  display:block; padding:0 !important; border:0 !important; background:none !important;
  font-size:.75rem !important; font-weight:500 !important; color:var(--muted) !important; letter-spacing:0; text-transform:none;
}

/* While a search list is open under an exercise's name, the row's info,
   save, edit and remove icons stay at the top instead of re-centring. */
html:not(#_):not(#__) body.app .exercise-row-title-bar:has(.off-plan-autocomplete-results:not([hidden])){
  align-items:flex-start !important;
}
html:not(#_):not(#__) body.app .exercise-row-title-bar:has(.off-plan-autocomplete-results:not([hidden])) > *{
  align-self:flex-start !important;
}
html:not(#_):not(#__) body.app .exercise-row-title-bar:has(.off-plan-autocomplete-results:not([hidden])) > :not(:has(.off-plan-autocomplete)):not([hidden]){
  min-height:44px !important; display:inline-flex !important; align-items:center !important;
}
html:not(#_):not(#__) body.app .workout-builder-page .movement-autocomplete-results{
  background:var(--card) !important; border:1px solid var(--color-border) !important; box-shadow:var(--shadow-soft) !important; padding:4px !important;
}

/* Week / Month activity calendar (dashboard and Stats) on desktop: it fills
   its card's width, each day stretching sideways at a fixed height rather
   than staying a small square (phones keep the squares). */
@media (min-width: 821px){
  html:not(#_) body.app .activity-calendar{ max-width:none; width:100%; flex:1 1 auto; }
  html:not(#_) body.app .activity-calendar .activity-calendar-day{ aspect-ratio:auto; height:52px; }
  html:not(#_) body.app .activity-calendar.is-month .activity-calendar-day{ height:44px; }
}

/* ── Activity detail (activity_detail.html) ─────────────────────────────
   The route's slow-to-fast steps: one blue, light to dark on light themes
   and dark to light on dark ones, so "faster" is always the stronger colour
   against the page (checked for step contrast in both themes). */
:root{ --speed-0:#86b6ef; --speed-1:#5598e7; --speed-2:#2a78d6; --speed-3:#1c5cab; --speed-4:#104281; }
html[data-theme="dark"]{ --speed-0:#184f95; --speed-1:#256abf; --speed-2:#3987e5; --speed-3:#6da7ec; --speed-4:#9ec5f4; }

.activity-detail{ display:grid; gap:20px; }
.activity-detail .athlete-topbar{ display:flex; align-items:center; gap:12px; }
.activity-detail-when{ margin:2px 0 0; }
.activity-detail-stats{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:12px;
}
.activity-detail-stats > div{
  display:grid; gap:4px; padding:12px 16px; border:1px solid var(--color-border); border-radius:var(--radius-md, 12px); background:var(--card);
}
.activity-detail-stats span{ font-size:.8rem; }
.activity-detail-stats strong{ font-size:1.25rem; line-height:1.2; }
.activity-detail-stats small{ font-size:.75rem; font-weight:500; color:var(--muted); }
.activity-detail-map{
  height:min(60vh, 420px); border-radius:var(--radius-lg, 16px); overflow:hidden; border:1px solid var(--color-border);
}
.activity-speed-legend{ display:flex; align-items:center; gap:6px; margin-top:-8px; }
.activity-speed-swatch{ display:inline-block; width:24px; height:8px; border-radius:4px; }
.activity-detail-note{ margin:0; }
.activity-chart h3, .activity-splits h3{ margin:0 0 8px; font-size:1rem; }
.activity-chart-plot{ position:relative; }
.activity-chart-plot svg{ display:block; overflow:visible; touch-action:pan-y; }
.activity-chart-grid{ stroke:var(--color-border); stroke-width:1; }
.activity-chart-label{ fill:var(--muted); font-size:11px; }
.activity-chart-line{ fill:none; stroke:var(--speed-2); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.activity-splits-table{ width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.activity-splits-table th, .activity-splits-table td{ padding:8px 6px; border-bottom:1px solid var(--color-border); text-align:left; font-size:.9rem; }
.activity-splits-table thead th{ color:var(--muted); font-weight:600; font-size:.75rem; }
.activity-split-bar-cell{ width:40%; }
.activity-split-bar{ display:block; height:12px; border-radius:0 4px 4px 0; background:var(--speed-2); min-width:2px; }
.activity-detail > .athlete-topbar{ justify-content:flex-start; }
.activity-detail > .athlete-topbar > div{ flex:1 1 auto; min-width:0; }
html[data-theme="dark"] .activity-detail-map .leaflet-tile-pane{ filter: invert(.9) hue-rotate(180deg) saturate(.65) brightness(.72) contrast(1.12); }
/* On phones the shared top bar names the activity; keep just its date line. */
@media (max-width: 640px){
  .page-topbar + .activity-detail > .athlete-topbar .athlete-icon-btn,
  .page-topbar + .activity-detail > .athlete-topbar .athlete-topbar-title{ display:none; }
}

/* "View activity" (feed post and History day): a full-width button with the
   same breathing room as the card's other sections. */
html:not(#_):not(#__) body.app .feed-activity-detail-link{
  display:flex !important; align-items:center; justify-content:center; gap:8px; width:100%; margin:12px 0 4px !important;
}
html:not(#_):not(#__) body.app .history-external-list .activity-link{
  display:inline-flex !important; align-items:center; gap:8px; margin-top:12px !important;
}

/* Coach pop-ups on phones: they start below the app bar, fit the screen's
   width and scroll inside themselves, so a title, a field or the confirm
   button is never under the bar or off the edge. */
@media (max-width: 820px){
  html:not(#_):not(#__) body.app.is-coach-account .modal.is-open{
    display:flex !important; align-items:flex-start !important; justify-content:center !important;
    padding:72px 12px 12px !important; box-sizing:border-box !important; overflow:hidden !important;
  }
  html:not(#_):not(#__) body.app.is-coach-account .modal.is-open > .modal-card{
    position:relative !important; inset:auto !important; transform:none !important;
    width:100% !important; max-width:560px !important; max-height:100% !important; min-width:0 !important;
    margin:0 auto !important; box-sizing:border-box !important; overflow-y:auto !important; overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  }
  html:not(#_):not(#__) body.app.is-coach-account .modal.is-open > .modal-card *{ max-width:100%; min-width:0; box-sizing:border-box; }
}
/* The page container layers itself (z-index:1), which kept an open pop-up
   under the bottom nav; while one is open it stops doing so. */
html:not(#_):not(#__) body.app.is-coach-account main.shell > .container:has(.modal.is-open){ z-index:auto !important; }

/* A button marked hidden stays hidden: the app's button styles set display
   with !important, which otherwise beat the hidden attribute (a category's
   "Load 10 more" kept showing after everything had loaded). */
html:not(#_):not(#__) body.app :is(button, .pill-link, .btn, [role="button"])[hidden]{ display:none !important; }

/* No phone tap-highlight box on anything tappable: Android paints a big blue
   rectangle over expandable rows (summary), role="button" elements and labels
   unless told not to. Client rows get a subtle press shade instead; keyboard
   focus still shows its outline. */
summary, [role="button"], label, details{ -webkit-tap-highlight-color: transparent; }
html:not(#_) body.app .coach-directory-card-summary{ transition: background-color .15s ease; border-radius: var(--radius-md, 12px); }
html:not(#_) body.app .coach-directory-card-summary:active{ background: var(--soft); }
html:not(#_) body.app .coach-directory-card-summary:focus:not(:focus-visible){ outline: none; }

/* Payment timeline (coach client page, Payments): one compact row per
   payment - type, date and method; amount; status; edit and delete. */
.payment-timeline-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
html:not(#_):not(#__) body.app .payment-timeline-export{ display:inline-flex !important; align-items:center; gap:6px; min-height:36px !important; padding:0 14px !important; }
.payment-timeline-filter{ display:block; margin:12px 0 4px; }
.payment-timeline-filter select{ width:100%; max-width:280px; }
.payment-timeline{ list-style:none; margin:0; padding:0; }
.payment-timeline-row{
  display:grid; grid-template-columns:minmax(0, 1fr) auto auto auto; align-items:center; gap:12px;
  padding:12px 0; border-bottom:1px solid var(--color-border);
}
.payment-timeline-row[hidden]{ display:none; }
.payment-timeline-row:last-child{ border-bottom:0; }
.payment-timeline-main, .payment-timeline-amount{ display:grid; gap:2px; min-width:0; }
.payment-timeline-main > *{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.payment-timeline-amount{ text-align:right; font-variant-numeric:tabular-nums; }
.payment-timeline-row .coach-client-payment-row-actions{ display:flex; gap:4px; }
html:not(#_):not(#__) body.app .payment-timeline-more{ display:flex; width:100%; justify-content:center; margin-top:12px; }
@media (max-width: 560px){
  .payment-timeline-row{ grid-template-columns:minmax(0, 1fr) auto; row-gap:6px; }
  .payment-timeline-row .coach-client-payment-status{ justify-self:start; }
  .payment-timeline-row .coach-client-payment-row-actions{ justify-self:end; }
}
@media (max-width: 560px){
  .payment-timeline-row .coach-client-payment-row-actions{ width:100%; justify-content:flex-end; }
}

/* Messages: one header (title + icon actions) and one row of tabs. */
.messages-head{ display:flex !important; align-items:center; justify-content:space-between; gap:12px; }
.messages-head h2{ margin:0; font-size:1.5rem; }
.messages-head-actions{ display:flex; align-items:center; gap:4px; }
.messages-head-actions > details{ position:relative; }
.messages-head-actions > details > summary{ list-style:none; }
.messages-head-actions > details > summary::-webkit-details-marker{ display:none; }
html:not(#_):not(#__) body.app .messages-head-icon{
  position:relative; display:inline-flex !important; align-items:center; justify-content:center;
  width:40px; height:40px; min-height:40px !important; padding:0 !important; border-radius:999px !important;
  background:transparent !important; border:0 !important; box-shadow:none !important; color:var(--text) !important; cursor:pointer;
}
html:not(#_):not(#__) body.app .messages-head-icon:hover,
html:not(#_):not(#__) body.app details[open] > .messages-head-icon{ background:var(--soft) !important; }
.messages-head-badge{
  position:absolute; top:2px; right:2px; min-width:16px; height:16px; padding:0 4px; border-radius:999px;
  background:var(--brand); color:#fff; font-size:.65rem; font-weight:700; line-height:16px; text-align:center;
}
.messages-head-badge:empty, #messages-locker-count[data-zero]{ display:none; }
.messages-head-actions .messages-shortcut-menu{
  position:absolute; right:0; top:calc(100% + 6px); z-index:40; width:min(320px, calc(100vw - 32px));
  background:var(--card); border:1px solid var(--color-border); border-radius:var(--radius-md, 12px); box-shadow:var(--shadow-soft);
}
.messages-head-tabs{ margin:8px 0 12px; }
.messages-tab-count{
  display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:4px;
  border-radius:999px; background:var(--brand); color:#fff; font-size:.7rem; font-weight:700;
}
html:not(#_):not(#__) body.app .messages-head{ flex-wrap:nowrap !important; flex-direction:row !important; }
html:not(#_):not(#__) body.app .messages-head h2{ flex:1 1 auto; min-width:0; width:auto !important; }
html:not(#_):not(#__) body.app .messages-head-actions{ flex:0 0 auto; }
html:not(#_):not(#__) body.app .messages-head-tabs{
  flex-wrap:nowrap !important; overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
}
html:not(#_):not(#__) body.app .messages-head-tabs::-webkit-scrollbar{ display:none; }
html:not(#_):not(#__) body.app .messages-head-tabs > *{ flex:0 0 auto; white-space:nowrap; }
html:not(#_):not(#__) body.app .messages-head{ width:100% !important; padding:4px 0 0 !important; margin:0 !important; min-height:0 !important; }
html:not(#_):not(#__) body.app .messages-head-tabs{ margin:4px 0 12px !important; }
html:not(#_):not(#__) body.app #messages-chats-panel > .messages-search{ margin-top:0 !important; padding-top:0 !important; }

/* Broadcasts (messages_broadcasts.html): the app's cards, fields and buttons
   instead of navy gradient panels, with a back arrow to Messages. */
html:not(#_):not(#__) body.app .broadcasts-hero{ display:flex !important; flex-direction:row !important; align-items:flex-start !important; justify-content:flex-start !important; gap:12px; }
html:not(#_):not(#__) body.app .broadcasts-hero h1{ margin:0; font-size:1.5rem; }
html:not(#_):not(#__) body.app .broadcasts-hero p{ margin:4px 0 0; color:var(--muted); }
html:not(#_):not(#__) body.app :is(.broadcasts-panel, .broadcasts-group-card){
  background:var(--card) !important; background-image:none !important; border:1px solid var(--color-border) !important;
  border-radius:var(--radius-lg, 16px) !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app .broadcasts-panel :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea){
  background:var(--soft) !important; background-image:none !important; border:1px solid var(--color-border) !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app :is(.broadcasts-picker, .broadcasts-picker-body, .broadcasts-member-option){
  background:transparent !important; background-image:none !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app .broadcasts-picker{ border:1px solid var(--color-border) !important; border-radius:var(--radius-md, 12px) !important; }
html:not(#_):not(#__) body.app .broadcasts-member-option{ border-radius:var(--radius-md, 12px) !important; }
html:not(#_):not(#__) body.app .broadcasts-member-option:has(input:checked){ background:var(--soft) !important; }
html:not(#_):not(#__) body.app .broadcasts-primary-btn{
  background:var(--ui-btn-primary-bg) !important; background-image:none !important; color:var(--ui-btn-primary-fg) !important; border:0 !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app :is(.broadcasts-secondary-btn, .broadcasts-inline-btn){
  background:var(--ui-btn-default-bg) !important; background-image:none !important; color:var(--ui-btn-default-fg) !important; border:0 !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app .broadcasts-inline-btn.danger{ color:var(--color-danger, #ef4444) !important; }
html:not(#_):not(#__) body.app .broadcasts-primary-btn{
  --ui-btn-bg:var(--ui-btn-primary-bg); --ui-btn-fg:var(--ui-btn-primary-fg); --ui-btn-hover-bg:var(--ui-btn-primary-bg);
  --_ui-btn-bg:var(--ui-btn-primary-bg); --_ui-btn-fg:var(--ui-btn-primary-fg); --_ui-btn-hover-bg:var(--ui-btn-primary-bg);
}

/* A client's day by meal, on the coach's view of their nutrition. */
.snapshot-meal-list.is-breakdown{ display:grid; gap:12px; }
.snapshot-meal-detail{ border:1px solid var(--color-border); border-radius:var(--radius-md, 12px); padding:10px 12px; background:var(--card); }
.snapshot-meal-detail header{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.snapshot-meal-detail .snapshot-meal-kcal{ margin-left:auto; font-variant-numeric:tabular-nums; }
.snapshot-meal-items{ list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px; }
.snapshot-meal-items li{ display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:12px; align-items:baseline; font-size:.9rem; }
.snapshot-meal-food{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.snapshot-meal-items li > span:last-child{ font-variant-numeric:tabular-nums; text-align:right; min-width:64px; }
.snapshot-meal-empty{ margin:6px 0 0; }

/* Map credit: an "i" in the map's corner; tapping it shows the credit in the
   app's info popover and tapping away hides it (static/info_tip.js). */
.map-with-credit{ position:relative; }
.map-credit{ position:absolute; right:8px; bottom:8px; z-index:500; display:inline-flex; }
.map-credit .macropro-tip{
  display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:999px;
  background:color-mix(in srgb, var(--card) 88%, transparent); border:1px solid var(--color-border); color:var(--text);
}
.gps-recorder-map .map-credit{ bottom:auto; top:64px; right:12px; }
.feed-map-modal-body{ position:relative; }

/* Activity charts: the selected point, guides and tooltip as on the app's
   other charts (progress-chart-*), shown while inspecting. */
.activity-chart-shell{ position:relative; }
.activity-chart-pick{ visibility:hidden; pointer-events:none; }
.activity-chart-pick.is-visible{ visibility:visible; }
.activity-chart-pick .progress-chart-point-halo{ opacity:1; }

/* Share Payment Info: standard switches for the custom details and each way
   of sending, and a full-width primary button on a plain footer. */
html:not(#_):not(#__) body.app .coach-payment-share-actions{
  display:grid !important; gap:12px; background:transparent !important; background-image:none !important;
  border-top:1px solid var(--color-border) !important; padding:12px 16px 16px !important; box-shadow:none !important;
}
html:not(#_):not(#__) body.app .coach-payment-share-delivery{ display:grid !important; gap:10px; }
html:not(#_):not(#__) body.app .coach-payment-share-footer-actions{ display:block !important; width:100%; }
html:not(#_):not(#__) body.app #coach-payment-share-send-btn{
  width:100% !important; min-height:44px; background-image:none !important; box-shadow:none !important; border:0 !important;
  --ui-btn-bg:var(--ui-btn-primary-bg); --ui-btn-fg:var(--ui-btn-primary-fg); --ui-btn-hover-bg:var(--ui-btn-primary-bg);
  --_ui-btn-bg:var(--ui-btn-primary-bg); --_ui-btn-fg:var(--ui-btn-primary-fg); --_ui-btn-hover-bg:var(--ui-btn-primary-bg);
  background:var(--ui-btn-primary-bg) !important; color:var(--ui-btn-primary-fg) !important;
}
html:not(#_):not(#__) body.app .coach-payment-share-override{ background:var(--soft) !important; background-image:none !important; border:1px solid var(--color-border) !important; box-shadow:none !important; }
html:not(#_):not(#__) body.app .coach-payment-share-delivery{ grid-template-columns:minmax(0, 1fr) !important; display:grid !important; }
html:not(#_):not(#__) body.app .coach-payment-share-footer-meta{ width:100% !important; display:grid !important; gap:10px; }
html:not(#_):not(#__) body.app .coach-payment-share-delivery .share-sheet-option{ width:100%; }
html:not(#_):not(#__) body.app .coach-payment-share-actions{ justify-items:stretch !important; padding-left:20px !important; padding-right:20px !important; }
html:not(#_):not(#__) body.app .coach-payment-share-actions > *{ margin:0 !important; max-width:none !important; justify-self:stretch !important; width:100% !important; }
html:not(#_):not(#__) body.app .coach-payment-share-actions{ grid-template-columns:minmax(0, 1fr) !important; justify-content:stretch !important; }
/* The map credit: a short line in the map's corner on desktop, where there is
   room; on phones it sits behind the "i" instead (OSM's guidance allows a
   collapsed credit where space is tight). */
@media (min-width: 821px){ .map-credit{ display:none !important; } }
@media (max-width: 820px){ .leaflet-control-attribution{ display:none !important; } }
/* Leaflet's credit carries a tiny flag icon; map-sized SVG rules (the feed's)
   must not blow it up. */
html:not(#_) .leaflet-control-attribution svg{ width:12px !important; height:8px !important; display:inline !important; position:static !important; }

/* The info popover opens above pop-ups and expanded maps, so an "i" inside
   one (a map's credit) shows its text instead of opening behind it. */
html:not(#_) .macropro-tip-popover{ z-index:9000 !important; }

/* Map zoom buttons: a little space between + and -. */
html:not(#_) .leaflet-control-zoom.leaflet-bar{ display:flex; flex-direction:column; gap:6px; border:0 !important; box-shadow:none !important; background:transparent !important; }
html:not(#_) .leaflet-control-zoom.leaflet-bar a{ border-radius:8px !important; border:0 !important; box-shadow:0 1px 4px rgba(0,0,0,.25); }

/* Five or more feed posts or notifications: a plain coloured dot instead of
   a number, as Android does when there are many. */
html:not(#_) .nav-badge.is-dot{
  min-width:10px !important; width:10px !important; height:10px !important; padding:0 !important;
  border-radius:999px !important; font-size:0 !important; line-height:0 !important;
}
html:not(#_) .appbar-icon-btn .nav-badge.is-dot{ top:8px !important; right:9px !important; box-shadow:none !important; }

/* Profile-photo cropper: one direct-manipulation surface in both app themes. */
.avatar-crop-dialog{
  --avatar-crop-scrim:rgba(0,0,0,.58);
  --avatar-crop-outline:rgba(255,255,255,.8);
  box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);
  margin:auto;padding:24px;overflow:auto;overscroll-behavior:contain;
  background:var(--color-bg-primary);color:var(--color-text-primary);border:1px solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow);
}
.avatar-crop-dialog::backdrop{background:var(--avatar-crop-scrim);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.avatar-crop-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}
.avatar-crop-header h2{margin:0 0 8px;font-size:22px;font-weight:700;line-height:1.2;letter-spacing:-.025em}
.avatar-crop-header p{margin:0;color:var(--color-text-secondary);font-size:14px;line-height:1.5}
.avatar-crop-stage{position:relative;width:min(100%,44dvh);aspect-ratio:1;margin:0 auto;overflow:hidden;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-bg-secondary);isolation:isolate}
.avatar-crop-stage canvas{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:none;cursor:grab;outline-offset:-4px}
.avatar-crop-stage canvas.is-dragging{cursor:grabbing}
.avatar-crop-mask{position:absolute;inset:0;border:1px solid var(--avatar-crop-outline);border-radius:50%;box-shadow:0 0 0 160px var(--avatar-crop-scrim);pointer-events:none}
.avatar-crop-zoom{position:absolute;right:12px;bottom:12px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--color-border);border-radius:var(--radius-sm);box-shadow:var(--shadow-soft);background:var(--color-bg-primary)}
html:not(#_):not(#__) body.app .avatar-crop-dialog :is(.avatar-crop-close,.avatar-crop-zoom button){
  box-sizing:border-box;display:grid!important;place-items:center;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  padding:0!important;margin:0!important;flex-shrink:0;border:0!important;border-radius:0!important;
  color:var(--color-text-primary)!important;background:var(--color-bg-primary)!important;box-shadow:none!important;opacity:1!important;
}
html:not(#_):not(#__) body.app .avatar-crop-dialog .avatar-crop-close{border-radius:50%!important;background:var(--color-bg-secondary)!important}
html:not(#_):not(#__) body.app .avatar-crop-dialog .avatar-crop-zoom button+button{border-top:1px solid var(--color-border)!important}
html:not(#_):not(#__) body.app .avatar-crop-dialog .avatar-crop-zoom button:disabled{color:var(--color-text-secondary)!important;opacity:.45!important;cursor:default}
html:not(#_):not(#__) body.app .avatar-crop-dialog :is(.avatar-crop-close,.avatar-crop-zoom button):hover:not(:disabled){background:var(--color-bg-secondary)!important}
.avatar-crop-dialog :is(button,canvas):focus-visible{outline:2px solid var(--color-accent)!important;outline-offset:-3px}
.avatar-crop-dialog svg{width:20px;height:20px;stroke-width:1.8;color:inherit}
.avatar-crop-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:min(100%,44dvh);margin:12px auto 20px;color:var(--color-text-secondary);font-size:13px;line-height:20px}
.avatar-crop-caption>span{display:flex;align-items:center;gap:8px}
.avatar-crop-caption svg{width:16px;height:16px}
.avatar-crop-touch-help{display:none}
@media(pointer:coarse){.avatar-crop-desktop-help{display:none}.avatar-crop-touch-help{display:inline}}
.avatar-crop-caption output{font-variant-numeric:tabular-nums;font-weight:600;color:var(--color-text-primary)}
.avatar-crop-actions{display:flex;gap:12px;padding-top:20px;border-top:1px solid var(--color-border)}
.avatar-crop-actions button{flex:1;--ui-btn-radius:var(--radius-sm)}
@media(max-width:480px){
  .avatar-crop-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px}
  .avatar-crop-header{margin-bottom:16px}
  .avatar-crop-header h2{font-size:20px}
  .avatar-crop-caption{margin-bottom:16px}
  .avatar-crop-actions{padding-top:16px}
}
.history-workout-disclosure .feed-muscle-summary{margin:12px 0}

/* The photo editor stays neutral in both themes so photo colours remain true. */
.story-editor,.story-editor-audience{display:none}
:root{--story-composer-bg:#08090c}
.story-share.is-mobile-editor{
  --story-editor-bg:var(--story-composer-bg);
  --story-editor-ink:#fff;
  --story-editor-muted:rgba(255,255,255,.65);
  --story-editor-scrim:rgba(19,22,20,.72);
  --story-editor-line:rgba(255,255,255,.2);
  --story-editor-selected:rgba(255,255,255,.14);
  --story-editor-danger:var(--danger,#ef4444);
  position:fixed;box-sizing:border-box;width:100vw;max-width:none;height:var(--story-editor-height,100dvh);max-height:none;
  margin:0;padding:max(8px,env(safe-area-inset-top)) 0 max(12px,env(safe-area-inset-bottom));
  inset:0 auto auto 0;border:0;border-radius:0;background:var(--story-editor-bg);color:var(--story-editor-ink);overflow:clip;
}
.story-share.is-mobile-editor .story-share-body{box-sizing:border-box;height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:16px;padding:0 4px}
.story-share.is-mobile-editor [data-story-share-preview],.story-share.is-mobile-editor .story-share-note{display:none}
html:not(#_) body.app .story-share.is-mobile-editor [data-story-share-cancel]{display:none!important}
.story-share.is-mobile-editor .story-editor{min-width:0;min-height:0;display:grid;position:relative}
.story-editor-viewport{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;overflow:clip}
.story-editor-frame{position:relative;isolation:isolate;flex:none;overflow:hidden;border-radius:var(--radius-lg,24px);background:var(--story-editor-bg)}
.story-editor-frame canvas{display:block;width:100%;height:100%;touch-action:none}
.story-editor-frame [data-story-photo]{position:absolute;inset:0;z-index:0;pointer-events:none;transform:translateZ(0);backface-visibility:hidden}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor [data-story-canvas]{position:relative;z-index:1;background:transparent!important}
.story-editor-frame :is(.story-editor-tool,.story-editor-trash,.story-editor-gesture-hint){z-index:3}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-tool{
  --ui-btn-radius:50%;--ui-icon-btn-radius:50%;--ui-btn-default-bg:var(--story-editor-scrim);--ui-btn-default-fg:var(--story-editor-ink);
  position:absolute;top:12px;width:48px!important;height:48px!important;padding:0!important;display:grid!important;place-items:center;
  border:1px solid var(--story-editor-line)!important;border-radius:50%!important;color:var(--story-editor-ink)!important;background:var(--story-editor-scrim)!important;box-shadow:none!important;
  font:500 26px/1 Inter,Arial,sans-serif!important;min-width:48px!important;min-height:48px!important;
}
.story-editor-back{left:12px}.story-editor-add{right:12px}
.story-editor-tool svg{width:24px;height:24px;stroke-width:1.8}
.story-editor-trash{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:none;color:var(--story-editor-ink);font-size:14px;white-space:nowrap}
.story-editor-trash svg{box-sizing:content-box;width:24px;height:24px;padding:16px;border:1px solid var(--story-editor-line);border-radius:50%;background:var(--story-editor-scrim)}
.story-editor-trash.is-over svg{background:var(--story-editor-danger);border-color:var(--story-editor-danger)}
.story-editor-trash[hidden],.story-editor-panel[hidden]{display:none!important}
.story-editor-panel{position:absolute;inset:0 0 auto;margin:0 auto;width:min(100%,520px);height:100%;z-index:3;padding:8px;box-sizing:border-box;pointer-events:none}
.story-editor-panel :is(.story-editor-panel-head,.story-editor-writing,.story-editor-controls){pointer-events:auto}
.story-editor-panel-head{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 8px;color:var(--story-editor-muted);font-size:14px;font-weight:500}
.story-editor-writing{position:absolute;left:0;top:0;width:var(--story-text-max,90%);display:flex;justify-content:center;transform:translate(calc(var(--story-text-x,50%) - 50%),calc(var(--story-text-y,30%) - 50%)) rotate(var(--story-text-rotate,0rad));transition:transform 200ms cubic-bezier(.2,.8,.2,1)}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel textarea{
  box-sizing:border-box;width:100%;min-height:0;max-height:none;resize:none;margin:0;border:0!important;
  color:var(--story-editor-ink);background:transparent!important;line-height:1.2;box-shadow:none!important;outline:none!important;caret-color:var(--story-editor-ink);text-shadow:0 1px 3px var(--story-editor-bg);
}
.story-editor-panel textarea::placeholder{color:var(--story-editor-muted)}
.story-editor-controls{position:absolute;inset:0 8px auto;transform:translateY(calc(var(--story-visible-height,100dvh) - 100% - 8px));max-height:max(44px,calc(var(--story-visible-height,100dvh) - 152px));overflow:auto;min-width:0;box-sizing:border-box;padding:8px 12px;background:var(--story-editor-scrim);border:1px solid var(--story-editor-line);border-radius:var(--radius-lg,20px)}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel button{
  --ui-btn-radius:var(--radius-sm,12px);--ui-icon-btn-radius:var(--radius-sm,12px);
  min-height:44px!important;min-width:44px!important;padding:8px 12px!important;border:0!important;border-radius:var(--radius-sm,12px)!important;
  color:var(--story-editor-ink)!important;background:transparent!important;box-shadow:none!important;white-space:nowrap;font-size:16px;line-height:1.2;
}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel button[aria-pressed="true"]{background:var(--story-editor-ink)!important;color:var(--story-editor-bg)!important}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel-head button{display:grid!important;place-items:center;padding:8px!important;border-radius:50%!important;background:var(--story-editor-selected)!important}
.story-editor-panel-head button svg{width:24px;height:24px}
.story-editor-fonts{display:flex;gap:8px;overflow-x:auto;padding:0 0 12px;scrollbar-width:none;scroll-snap-type:x proximity}
.story-editor-fonts::-webkit-scrollbar{display:none}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-fonts button{flex:0 0 auto;min-width:88px!important;border:1px solid var(--story-editor-line)!important;font-size:18px;font-family:inherit;scroll-snap-align:center}
.story-editor-colours{display:flex;align-items:center;gap:8px;margin:0 0 8px}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel .story-editor-swatch[aria-pressed]{position:relative;display:grid!important;place-items:center;width:36px!important;height:44px!important;min-width:28px!important;padding:0!important;border:0!important;background:transparent!important;border-radius:50%!important}
.story-editor-swatch>span{content:"";width:22px;height:22px;border-radius:50%;background:var(--story-swatch);border:1px solid var(--story-editor-line);box-sizing:border-box}
.story-editor-swatch[aria-pressed="true"]>span{outline:2px solid var(--story-editor-ink);outline-offset:4px}
.story-editor-format{display:flex;gap:8px;align-items:center;border-top:1px solid var(--story-editor-line);padding-top:8px}
.story-editor-alignment{position:relative;width:44px;height:44px;display:grid;place-items:center;flex-shrink:0;margin:0}
.story-editor-format svg{width:22px;height:22px}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel button svg{color:inherit!important;stroke:currentColor!important}
.story-editor-alignment svg{display:none}
.story-editor-alignment[data-alignment="center"] [data-lucide="align-center"],.story-editor-alignment[data-alignment="left"] [data-lucide="align-left"],.story-editor-alignment[data-alignment="right"] [data-lucide="align-right"]{display:block}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-alignment select{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer}
.story-editor-size{display:flex;align-items:center;gap:8px;font-size:12px;margin:0;min-width:0;flex:1}
.story-editor-size>span:last-child{font-size:20px}
.story-editor-size input{flex:1;min-width:32px;width:100%;accent-color:var(--story-editor-ink)}
.story-share.is-mobile-editor .story-share-actions{display:flex;flex-direction:column-reverse;align-items:stretch;gap:8px;padding:0 16px 4px}
.story-share.is-mobile-editor .story-editor-audience{display:block;color:var(--story-editor-muted);font-size:12px;line-height:16px;text-align:center}
.story-editor-audience>span{padding:0 4px}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor [data-story-share-go]{
  --ui-btn-primary-bg:var(--story-editor-ink);--ui-btn-primary-fg:var(--story-editor-bg);--ui-btn-primary-hover-bg:var(--story-editor-ink);--ui-btn-radius:999px;
  position:relative;min-height:56px!important;width:100%!important;max-width:none!important;border:0!important;border-radius:var(--ui-btn-radius)!important;color:var(--story-editor-bg)!important;background:var(--story-editor-ink)!important;display:flex!important;align-items:center;justify-content:center;gap:12px;padding:8px 52px!important;font-size:16px;font-weight:700;
}
.story-share.is-mobile-editor .story-share-thumbnail{position:absolute;display:block;left:10px;width:36px;height:36px;border-radius:50%;background:var(--story-editor-bg);border:1px solid var(--story-editor-line)}
.story-share.is-mobile-editor .story-share-arrow{position:absolute;display:block;right:20px;font-size:24px;line-height:1}
.story-share.is-mobile-editor.is-editing .story-share-actions{visibility:hidden;pointer-events:none}
.story-share.is-mobile-editor::backdrop{background:var(--story-editor-bg)}
.story-share.is-mobile-editor.is-editing .story-editor-tool{visibility:hidden}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor :is(button,input,select):focus-visible{outline:2px solid var(--story-editor-ink)!important;outline-offset:3px}
.story-editor-alignment:focus-within{outline:2px solid var(--story-editor-ink);outline-offset:3px;border-radius:var(--radius-sm)}


.story-editor-gesture-hint{max-width:calc(100% - 32px);width:max-content;text-align:center;line-height:1.4;display:none;position:absolute;bottom:20px;left:50%;transform:translateX(-50%);padding:8px 12px;border-radius:var(--radius-lg);color:var(--story-editor-ink);background:var(--story-editor-scrim);font-size:12px;white-space:normal;pointer-events:none}
.story-editor:not(.has-pinched):not(.is-transforming) .story-editor-gesture-hint{display:block}
.story-share.is-editing .story-editor-gesture-hint{display:none!important}
.story-upload-status{position:fixed;z-index:80;right:16px;bottom:calc(88px + env(safe-area-inset-bottom));box-sizing:border-box;width:min(380px,calc(100vw - 32px));display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--color-bg-primary);color:var(--color-text-primary);border:1px solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow);isolation:isolate}
.story-upload-status>img{width:44px;height:56px;object-fit:cover;border-radius:var(--radius-sm);flex-shrink:0}
.story-upload-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.story-upload-copy strong{font-size:14px;font-weight:600;line-height:1.3}
.story-upload-copy>span{font-size:12px;line-height:1.4;color:var(--color-text-secondary)}
.story-upload-status[data-state="uploading"]::after{content:"";box-sizing:border-box;flex-shrink:0;width:20px;height:20px;border:2px solid var(--color-border);border-top-color:var(--color-accent);border-radius:50%;animation:story-upload-spin 1s linear infinite}
.story-upload-actions{display:flex;align-items:center;gap:4px}
.story-upload-actions[hidden]{display:none!important}
html:not(#_):not(#__) body.app .story-upload-actions button{display:grid!important;place-items:center;width:auto!important;min-width:40px!important;min-height:44px!important;padding:8px!important;color:var(--color-text-primary)!important;font-size:14px;font-weight:600;background:var(--color-bg-secondary)!important;border:0!important;border-radius:var(--radius-sm)!important}
@keyframes story-upload-spin{to{transform:rotate(360deg)}}
@media(min-width:768px){.story-upload-status{right:24px;bottom:24px}}
@media(prefers-reduced-motion:reduce){.story-upload-status[data-state="uploading"]::after{animation:none}}

html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-photo-reset{top:72px;right:12px}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-photo-reset[hidden]{display:none!important}

/* Calendar actions and expanded sets stay on their workout card's surface. */
html:not(#_):not(#__) body.app.history-page .history-workout-delete{
  --ui-btn-bg:transparent;--ui-btn-hover-bg:transparent;--ui-btn-active-bg:transparent;
  --ui-btn-default-bg:transparent;--ui-btn-default-hover-bg:transparent;
  --ui-icon-btn-hover-bg:transparent;--ui-icon-btn-active-bg:transparent;
  background:transparent!important;background-image:none!important;box-shadow:none!important;
}
html:not(#_):not(#__) body.app.history-page .history-workout-delete:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}

/* The profile preview is a plain settings link, including its eye icon. */
html:not(#_):not(#__) body.app a.settings-profile-view,
html:not(#_):not(#__) body.app a.settings-profile-view .settings-summary-icon{
  background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;
}
html:not(#_):not(#__) body.app a.settings-profile-view:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
/* Story thumbnails keep the person's equipped ring still while the photo flips. */
.story-strip{padding:8px 12px 4px;margin:0;gap:12px;scroll-snap-type:x proximity;align-items:flex-start}
.story-strip .story-avatar{position:relative;perspective:300px}
.story-strip .story-ring{position:relative}
.story-strip .story-strip-item{scroll-snap-align:start}
html:not(#_):not(#__) body.app .story-strip .story-ring:is(.has-custom-border,.story-ring-empty){background:transparent!important}
html:not(#_):not(#__) body.app .story-strip .story-avatar[class*="cosmetic-border--"]{box-shadow:0 0 0 3px var(--story-gap),0 0 0 5px var(--cosmetic-ring,transparent)!important}
.story-strip .feed-me-coin{animation-delay:var(--story-delay,1.5s)}
.story-strip-self{position:relative;flex:none;width:76px}
html:not(#_):not(#__) body.app .feed-page .story-strip-self button.story-add{top:52px;right:2px;bottom:auto}

html:not(#_):not(#__) body.app .feed-page .story-strip-item:focus-visible{outline:2px solid var(--color-accent)!important;outline-offset:4px}
html:not(#_):not(#__) body.app .feed-page .story-strip button.story-strip-item{
  display:grid!important;grid-template-columns:76px;grid-template-rows:auto auto;justify-items:center;align-content:start;
  width:76px!important;min-width:76px!important;height:auto!important;max-height:none!important;gap:4px!important;
}
.story-strip .story-strip-name{flex:none;min-width:0;line-height:1.3}
html:not(#_):not(#__) body.app .feed-page .story-strip{box-sizing:border-box;max-width:100%;padding:8px 12px 4px!important}

/* Story hearts animate over the image without moving the image or tap zones. */
.story-viewer{--story-viewer-bg:#000;--story-viewer-ink:#fff;--story-reply-glass:color-mix(in srgb,var(--story-viewer-bg) 60%,transparent);--story-reply-line:color-mix(in srgb,var(--story-viewer-ink) 32%,transparent);--story-heart-color:var(--color-danger,#ef4444);--story-heart-shadow:0 4px 12px rgba(0,0,0,.4)}
.story-heart-burst{position:absolute;z-index:4;left:50%;top:50%;width:96px;height:96px;opacity:0;transform:translate(-50%,-50%);pointer-events:none;color:var(--story-heart-color);filter:drop-shadow(var(--story-heart-shadow))}
.story-heart-burst svg{display:block;width:100%;height:100%;fill:currentColor;stroke:currentColor;stroke-width:1.5}
html:not(#_):not(#__) body.app .story-viewer .story-like{position:absolute;z-index:4;bottom:calc(20px + env(safe-area-inset-bottom));right:16px;width:44px!important;height:44px!important;min-height:44px!important}
html:not(#_):not(#__) body.app .story-viewer .story-like[aria-pressed="true"] .nav-icon-lucide{fill:var(--story-heart-color)!important;color:var(--story-heart-color)!important;stroke:var(--story-heart-color)!important}
.story-like:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.story-viewer .story-tap{touch-action:manipulation}

/* Keep the photo's geometry still through loading and keyboard dismissal. */
html:not(#_):not(#__) body.app .story-share.is-mobile-editor,
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-frame{transition:none!important;animation:none!important}
.story-editor.is-photo-loading :is([data-story-canvas],[data-story-photo]){visibility:hidden}
/* Story text colour: a wheel (hue around, strength outwards) with a brightness
   bar, white and black to hand, and a background that cycles off, solid, shaded. */
.story-editor{--story-wheel-hues:conic-gradient(#f00,#ff0,#0f0,#b5f948,#416102,#f0f,#f00)}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel .story-editor-wheel-toggle{display:grid!important;place-items:center;width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;border:0!important;border-radius:50%!important;background:var(--story-wheel-hues)!important}
.story-editor-wheel-toggle>span{width:24px;height:24px;border-radius:50%;background:var(--story-wheel-colour,#fff);border:2px solid var(--story-editor-bg);box-sizing:border-box}
.story-editor-wheel-toggle[aria-expanded="true"]{outline:2px solid var(--story-editor-ink);outline-offset:2px}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel .story-editor-background{display:flex!important;align-items:center;gap:8px;margin-left:auto;min-height:44px!important;padding:0 12px 0 6px!important;border:1px solid var(--story-editor-line)!important;border-radius:999px!important}
.story-editor-background>span{display:grid;place-items:center;width:32px;height:32px;border-radius:var(--radius-sm,8px);font:700 18px/1 Inter,Arial,sans-serif;color:var(--story-editor-ink);border:1px dashed var(--story-editor-muted);box-sizing:border-box}
.story-editor-background>small{font-size:13px;font-weight:500}
.story-editor-background[data-mode="solid"]>span{background:var(--story-editor-ink);color:var(--story-editor-bg);border:0}
.story-editor-background[data-mode="shade"]>span{background:var(--story-editor-scrim);border:1px solid var(--story-editor-ink)}
.story-editor-wheel[hidden]{display:none!important}
.story-editor-wheel{display:flex;align-items:center;gap:16px;padding:4px 4px 12px}
.story-editor-wheel-disc{position:relative;flex:none;width:132px;height:132px;border-radius:50%;background:radial-gradient(closest-side,#fff,rgba(255,255,255,0)),var(--story-wheel-hues);touch-action:none;cursor:crosshair}
.story-editor-wheel-disc::after{content:"";position:absolute;inset:0;border-radius:50%;background:#000;opacity:var(--story-wheel-dark,0);pointer-events:none}
.story-editor-wheel-side{flex:1;min-width:0;display:grid;gap:16px;justify-items:start}
.story-editor-wheel-preview{width:44px;height:44px;border-radius:50%;border:2px solid var(--story-editor-ink);box-sizing:border-box}
.story-editor-wheel-light{position:relative;width:100%;height:24px;border-radius:999px;background:linear-gradient(90deg,#000,var(--story-wheel-hue,#fff));border:1px solid var(--story-editor-line);box-sizing:border-box;touch-action:none;cursor:pointer}
.story-editor-wheel-knob{position:absolute;z-index:1;top:50%;width:20px;height:20px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.5),0 1px 4px rgba(0,0,0,.5);transform:translate(-50%,-50%);pointer-events:none;box-sizing:border-box}
.story-editor-wheel-disc:focus-visible,.story-editor-wheel-light:focus-visible{outline:2px solid var(--story-editor-ink);outline-offset:3px}
/* With a background, the text box hugs the words (where the browser can size it to its content). */
/* The text box hugs the words, where the browser can size it to its content. */
@supports(field-sizing:content){html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel textarea{field-sizing:content;width:auto;min-width:2ch;max-width:100%;overflow:hidden}}
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-panel textarea.has-backing{text-shadow:none}
@media(prefers-reduced-motion:reduce){.story-editor-writing{transition:none}}
/* The open wheel takes the font row's place, so the tools don't grow over the photo. */
.story-editor.is-wheel-open .story-editor-fonts{display:none}

/* As the keyboard closes, Android grows the page before redrawing it and shows the
   page background in the new space; with the composer open, that matches the composer. */
html:not(#_):not(#__):has(.story-share.is-mobile-editor[open]),
html:not(#_):not(#__):has(.story-share.is-mobile-editor[open]) body{background:var(--story-composer-bg)!important;background-image:none!important}

/* While the keyboard is up the photo shrinks to stay whole above it (story_editor.js
   sets the scale); typing dims it, as the text is the focus. */
html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-frame{transform-origin:50% 0;will-change:transform;transition:transform 200ms cubic-bezier(.2,.8,.2,1)!important}
.story-share.is-mobile-editor .story-editor-frame::after{content:"";position:absolute;inset:0;z-index:2;background:var(--story-editor-bg);opacity:0;pointer-events:none;transition:opacity 150ms ease-out}
.story-share.is-mobile-editor.is-editing .story-editor-frame::after{opacity:.4}
@media(prefers-reduced-motion:reduce){html:not(#_):not(#__) body.app .story-share.is-mobile-editor .story-editor-frame{transition:none!important}.story-share.is-mobile-editor .story-editor-frame::after{transition:none}}

/* Story replies share the viewer's unobtrusive controls and theme-aware input surface. */
html:not(#_):not(#__) body.app .story-viewer .story-reply{position:absolute;z-index:4;bottom:calc(20px + env(safe-area-inset-bottom));right:68px;width:44px!important;height:44px!important;min-height:44px!important}
.story-reply-form{position:absolute;z-index:5;bottom:calc(12px + env(safe-area-inset-bottom) + var(--story-reply-lift,0px));left:12px;right:12px;box-sizing:border-box;padding:0;background:transparent;color:var(--story-viewer-ink);border:0;border-radius:var(--radius-lg);box-shadow:none}
.story-reply-form[hidden]{display:none!important}
.story-reply-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:0 4px;text-shadow:var(--story-heart-shadow)}
.story-reply-avatar{width:28px;height:28px;flex:0 0 28px;font-size:12px}
.story-reply-recipient{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:14px;line-height:20px}
.story-reply-recipient>span{display:none}
.story-reply-recipient strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.story-reply-compose{display:flex;align-items:flex-end;gap:8px;padding:4px;background:var(--story-reply-glass);border:1px solid var(--story-reply-line);border-radius:var(--radius-lg)}
.story-reply-compose:focus-within{border-color:var(--story-viewer-ink)}
html:not(#_):not(#__) body.app .story-viewer .story-reply-form textarea{box-sizing:border-box;flex:1;min-width:0;width:100%;height:44px;min-height:44px;max-height:128px;resize:none;margin:0;padding:10px 12px;font:inherit;font-size:16px;line-height:24px;background:transparent!important;color:var(--story-viewer-ink)!important;border:0!important;border-radius:0!important;box-shadow:none!important;outline:none!important}
.story-reply-form textarea::placeholder{color:var(--story-viewer-ink);opacity:.75}
html:not(#_):not(#__) body.app .story-viewer .story-reply-form .story-viewer-btn,
html:not(#_):not(#__) body.app .story-viewer .story-reply-form .nav-icon-lucide{color:var(--story-viewer-ink)!important;stroke:var(--story-viewer-ink)!important;filter:none}
html:not(#_):not(#__) body.app .story-viewer .story-reply-form [data-story-reply-send]{width:44px!important;height:44px!important;min-width:44px!important;flex:0 0 44px;background:var(--color-accent)!important;color:var(--color-on-accent)!important;transition:opacity 120ms ease-out,transform 120ms ease-out}
html:not(#_):not(#__) body.app .story-viewer .story-reply-form [data-story-reply-send] .nav-icon-lucide{color:var(--color-on-accent)!important;stroke:var(--color-on-accent)!important}
.story-reply-form [data-story-reply-send]:disabled{opacity:.4;cursor:default}
.story-reply-form [data-story-reply-send]:active:not(:disabled){transform:scale(.96)}
.story-reply-form .story-viewer-btn:focus-visible{outline:2px solid var(--color-accent)!important;outline-offset:2px}
.story-reply-form p{margin:8px 0 0;padding:8px;background:var(--story-reply-glass);border-radius:var(--radius-sm);font-size:.875rem;line-height:1.4;color:var(--color-danger)}
.story-reply-form p:empty{display:none}
@media(prefers-reduced-motion:reduce){.story-reply-form [data-story-reply-send]{transition:none!important;transform:none!important}}
.message-story-context{display:flex;align-items:center;gap:8px;font-size:.8rem;color:inherit;opacity:.8;margin-bottom:8px}
.message-story-context .nav-icon-lucide{width:16px;height:16px}

/* Profile privacy uses the existing switch rows; search results stay quiet and compact. */
.profile-privacy-row{margin-top:16px;padding-top:16px;border-top:1px solid var(--color-border)}
.profile-privacy-row>div{flex:1;min-width:0}
.settings-profile-preview-row{display:flex;align-items:center;gap:8px}
.settings-profile-preview-row>.settings-profile-view{flex:1;min-width:0}
.settings-profile-preview-row>.macropro-tip{flex:0 0 auto;margin-right:12px}
.contacts-suggest-avatar{display:flex;text-decoration:none;color:inherit}
.contacts-suggest-avatar:focus-visible{outline:2px solid var(--color-accent);outline-offset:4px}
.contacts-suggest-avatar img,.contacts-follow-match .contacts-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.contacts-follow-match:empty{display:none}
.contacts-follow-match-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;margin-top:12px;border-top:1px solid var(--color-border)}
.contacts-follow-match-row>.contacts-person{min-width:0;color:inherit;text-decoration:none}
.contacts-follow-match-row .contacts-avatar{flex-shrink:0;overflow:hidden}
.contacts-follow-match-row .contacts-person-copy{min-width:0}
.contacts-follow-match-row .contacts-person-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.contacts-person-copy .contacts-match-label{font-size:12px;color:var(--color-text-secondary)}
.contacts-match-empty{margin:12px 0 0;font-size:13px}
.settings-profile-preview-row>.settings-profile-view{margin-bottom:0}
.settings-profile-preview-row{margin-bottom:16px}
html:not(#_) body.app .profile-privacy-card .privacy-card-head strong{color:var(--color-text-primary)!important}

html:not(#_):not(#__) body.app .story-viewer .story-reply-recipient strong{color:var(--story-viewer-ink)!important}
@media(prefers-reduced-transparency:reduce){.story-reply-compose{background:var(--story-viewer-bg);backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Keep IME-dismissed controls separate from photo textures on mobile WebViews. */
html:not(#_):not(#__) body.app .story-share.is-mobile-editor :is(.story-editor-panel,.story-editor-controls,.story-editor-tool),
html:not(#_):not(#__) body.app .story-viewer .story-reply-compose{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

.profile-bio-field textarea{resize:vertical;min-height:88px}
.profile-bio-count{display:block;text-align:right;font-size:12px;line-height:20px;color:var(--color-text-secondary)}
.athlete-bio{margin:8px 0 16px;font-size:14px;line-height:1.5;color:var(--color-text-primary);overflow-wrap:anywhere}

/* The RepTotal wordmark wherever the default brand name is shown (base.html
   brand_text): heavy italic, "Total" in the readable lime. Coach business
   names stay plain text. */
html:not(#_) .brand-wordmark{
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: none;
}
html:not(#_) .brand-wordmark > span{ color: var(--color-accent); }
