:root {
  --bg-primary: #000000;
  --bg-card: #090a0f;
  --border-color: rgba(148, 163, 184, 0.14);
}

*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 140ms;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: #f1f5f9;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.amber-glow {
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.22);
}

/* Zero-Scrollbar Architecture & Stable Viewport */
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
}

button,
a,
[role="button"],
input,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Tactile Press Micro-interaction (Jitter-free & Sub-pixel stable) */
.btn-press {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 75ms ease, background-color 75ms ease, border-color 75ms ease, opacity 75ms ease;
  will-change: transform;
}

.btn-press:active {
  transform: scale(0.97);
}

/* Stepper buttons: hardware-accelerated tight scale to prevent text or card reflow */
.stepper-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 60ms ease, background-color 60ms ease;
  will-change: transform;
}

.stepper-btn:active {
  transform: scale(0.92);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Custom Scrollbar for OLED Dark Theme Modals (Desktop) */
@media (min-width: 641px) {
  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  ::-webkit-scrollbar-track {
    background: #09090b;
  }
  ::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 9999px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
  }
}

@media (max-width: 640px) {
  html {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
  body {
    min-height: calc(100dvh + 1px);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }
  * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .capture-bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    background: rgba(9, 10, 15, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .capture-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    background: rgba(24, 24, 27, 0.7) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  }
}

/* Synchronized One-World Horizon Ambient Background lives in /core-base.css */

/* ------------------------------------------------------------- */
/* WORKOUT TRANSITIONS: TIER 1 (SET STEP) & TIER 2 (EXERCISE)   */
/* ------------------------------------------------------------- */

#workout-carousel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
}

#mobile-cards-container {
  min-height: 188px;
}

/* ------------------------------------------------------------- */
/* 2-CARD CONVEYOR BELT ANIMATION                                */
/* ------------------------------------------------------------- */

.conveyor-outgoing-top {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  pointer-events: none !important;
  z-index: 10;
  will-change: transform, opacity, filter;
}

/* Vertical Conveyor Slide (Crisp Mechanical Queue) */
@keyframes conveyorOutUpA {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  100% { transform: translate3d(0, -95%, 0) scale(0.96); opacity: 0; }
}
@keyframes conveyorPromoteUpA {
  0% { transform: translate3d(0, var(--conveyor-dy, 96px), 0) scale(0.985); opacity: 0.92; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}
@keyframes conveyorEnterBottomA {
  0% { transform: translate3d(0, 36px, 0) scale(0.97); opacity: 0; }
  35% { opacity: 0.4; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}
@keyframes conveyorPromoteDownA {
  0% { transform: translate3d(0, -64px, 0) scale(0.97); opacity: 0; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}
@keyframes conveyorPushDownA {
  0% { transform: translate3d(0, calc(var(--conveyor-dy, 96px) * -1), 0); opacity: 0.9; }
  100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

.conveyor-anim-A-out-fwd {
  animation: conveyorOutUpA 270ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.conveyor-anim-A-top-fwd {
  animation: conveyorPromoteUpA 290ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}
.conveyor-anim-A-bot-fwd {
  animation: conveyorEnterBottomA 310ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}
.conveyor-anim-A-top-bwd {
  animation: conveyorPromoteDownA 270ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.conveyor-anim-A-bot-bwd {
  animation: conveyorPushDownA 270ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .conveyor-outgoing-top,
  [class*="conveyor-anim-"] {
    animation: none !important;
  }
}

@keyframes counterTick {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.08); color: #fef08a; }
  100% { transform: scale(1); color: #fbbf24; }
}

.counter-tick {
  animation: counterTick 160ms ease-out forwards;
  display: inline-block;
  will-change: transform, color;
}

/* Tier 2: Milestone Header Glow */
@keyframes milestoneHeaderGlow {
  0% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); border-color: rgba(148, 163, 184, 0.14); }
  35% { box-shadow: 0 0 24px rgba(16, 185, 129, 0.65); border-color: rgba(52, 211, 153, 0.9); }
  100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); border-color: rgba(148, 163, 184, 0.14); }
}

.header-milestone-glow {
  animation: milestoneHeaderGlow 600ms ease-out forwards;
}

/* Sleek Floating Milestone Toast */
.exercise-milestone-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
}

.exercise-milestone-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.exercise-milestone-toast.exit {
  transform: translateX(-50%) translateY(-16px);
  opacity: 0;
  transition: transform 240ms ease-in, opacity 240ms ease-in;
}

.milestone-content {
  background: rgba(9, 10, 15, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 26px rgba(16, 185, 129, 0.28);
  border-radius: 9999px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.milestone-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34d399;
}

.milestone-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-input {
  font-size: 1rem;
  line-height: 1.25;
  min-height: 48px;
  box-sizing: border-box;
}

.cal-input:focus-visible,
.cal-radio-input:focus-visible + .cal-radio-label {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.cal-radio-input:checked + .cal-radio-label {
  background: rgba(245, 158, 11, 0.95);
  color: #09090b;
  border-color: rgba(251, 191, 36, 0.8);
  font-weight: 700;
}

/* Branded Workout Split Selector (with Customizable <select> + Native Fallback) */
.workout-shell {
  container-type: inline-size;
  container-name: workout;
}

.workout-card-inline {
  container-type: inline-size;
}

.workout-inline-title {
  font-size: clamp(0.75rem, 3.8vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.workout-inline-title[data-len="med"] {
  font-size: clamp(0.72rem, 3.3vw, 0.95rem);
  letter-spacing: -0.025em;
}

.workout-inline-title[data-len="long"] {
  font-size: clamp(0.68rem, 2.9vw, 0.875rem);
  letter-spacing: -0.03em;
}

@supports (font-size: 1cqi) {
  .workout-inline-title {
    font-size: clamp(0.75rem, 4.3cqi, 1.05rem);
  }
  .workout-inline-title[data-len="med"] {
    font-size: clamp(0.72rem, 3.7cqi, 0.95rem);
  }
  .workout-inline-title[data-len="long"] {
    font-size: clamp(0.68rem, 3.2cqi, 0.875rem);
  }
}

/* Desktop 3-Card Grid Tiles (Size-Aware Stacked Hierarchy — Zero Title Crushing or Selection Jump) */
.workout-desktop-view .wk-desk-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.875rem;
  border-radius: 1rem;
  border: 1px solid rgba(39, 39, 42, 0.88);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.workout-desktop-view .wk-desk-card--done {
  background: rgba(24, 24, 27, 0.9);
  border-color: rgba(16, 185, 129, 0.42);
}

.workout-desktop-view .wk-desk-card--upcoming {
  background: rgba(24, 24, 27, 0.46);
  border-color: rgba(39, 39, 42, 0.88);
}

.workout-desktop-view .wk-desk-card--prime-active {
  background: rgba(6, 78, 59, 0.36);
  border-color: rgba(16, 185, 129, 0.92);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 12px 28px -10px rgba(16, 185, 129, 0.3);
}

.workout-desktop-view .wk-desk-card--lift-active {
  background: rgba(9, 9, 11, 0.96);
  border-color: rgba(245, 158, 11, 0.92);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 12px 28px -10px rgba(245, 158, 11, 0.28);
}

.workout-desktop-view .wk-desk-card--mob-active {
  background: rgba(30, 27, 75, 0.44);
  border-color: rgba(99, 102, 241, 0.88);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.32), 0 12px 26px -10px rgba(99, 102, 241, 0.26);
}

.workout-desktop-view .wk-desk-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  min-height: 1.5rem;
  margin-bottom: 0.5rem;
}

.workout-desktop-view .wk-desk-card-title {
  display: block;
  width: 100%;
  font-size: 0.9375rem;
  line-height: 1.28;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  word-break: normal;
}

.workout-desktop-view .wk-desk-card-title[data-len="long"] {
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

@supports (font-size: 1cqi) {
  @container (max-width: 195px) {
    .workout-desktop-view .wk-desk-card-title {
      font-size: 0.84rem;
    }
    .workout-desktop-view .wk-desk-card-title[data-len="long"] {
      font-size: 0.8rem;
    }
  }
  @container (min-width: 215px) {
    .workout-desktop-view .wk-desk-card-title {
      font-size: 0.975rem;
    }
    .workout-desktop-view .wk-desk-card-title[data-len="long"] {
      font-size: 0.905rem;
    }
  }
}

.workout-desktop-view .wk-desk-card-foot {
  margin-top: auto;
  padding-top: 0.625rem;
}

.workout-desktop-view .wk-desk-prime-cues {
  font-size: 0.75rem;
  line-height: 1.42;
}

.workout-desktop-view .wk-desk-stat-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  background: rgba(9, 9, 11, 0.55);
  border: 1px solid rgba(39, 39, 42, 0.75);
}

.workout-desktop-view .wk-desk-stepper-stack {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.workout-desktop-view .wk-desk-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  padding: 0.3rem 0.4rem;
  border-radius: 0.75rem;
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid rgba(39, 39, 42, 0.95);
}

html.force-mobile-view:not(.is-android-pip) {
  background: #04060b !important;
}

.wk-body {
  padding-top: 0.5rem;
}

@media (min-width: 641px) {
  html:not(.force-mobile-view):not(.is-android-pip) body.wk-body:not(.force-mobile-view) {
    padding-top: 0.75rem;
  }
}

html.force-mobile-view:not(.is-android-pip) body,
html:not(.is-android-pip) body.force-mobile-view {
  width: var(--mobile-frame-w, 360px) !important;
  max-width: var(--mobile-frame-w, 360px) !important;
  margin: 42px auto 32px !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 26px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78), 0 0 0 6px rgba(15, 23, 42, 0.92) !important;
  min-height: var(--mobile-frame-h, 800px) !important;
  overflow-x: hidden !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  padding-top: 0.5rem !important;
  padding-bottom: 7rem !important;
}

html.is-android-pip,
html.is-android-pip body {
  width: 100vw !important;
  max-width: none !important;
  min-height: 0 !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

html.is-android-pip body > *:not(#workout-corner-hud) {
  display: none !important;
}

/* Container-Aware Mobile vs Desktop Visibility (100% Parity for Real Phone + ?mobile=1) */
.wk-header {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  margin-bottom: 0.4375rem;
}

.wk-header:has(#lift-subbar.hidden) {
  margin-bottom: 0.3125rem;
}

.wk-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
}

.wk-top-cluster {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.wk-subbar {
  padding: 0.25rem 0.3125rem;
  border-radius: 0.875rem;
}

.wk-subbar--lift:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
}

.wk-subbar .core-status-pill {
  height: 1.75rem;
  padding: 0 0.4375rem;
  font-size: 0.7rem;
  gap: 0.25rem;
}

.wk-subbar-seg {
  height: 1.75rem;
}

.wk-cardio-seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1875rem;
  min-width: 8.625rem;
  padding: 0.125rem;
}

.wk-cardio-seg-btn {
  padding-inline: 0.4375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wk-cardio-view:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.wk-cardio-view > .wk-subbar--cardio {
  margin-bottom: -0.1875rem;
}

.wk-top-icon-btn {
  width: 1.875rem;
  height: 1.875rem;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wk-top-icon-btn svg {
  width: 58%;
  height: 58%;
  display: block;
}

.wk-top-icon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.wk-top-icon-btn:active {
  transform: scale(0.95);
}

.wk-top-bar-height {
  height: 1.875rem;
  font-size: 0.6875rem;
}

.wk-top-seg-btn {
  padding-inline: 0.4375rem;
  font-size: 0.6875rem;
}

.wk-top-pill {
  height: 1.875rem;
  padding-inline: 0.4375rem;
  font-size: 0.6875rem;
}

.wk-top-progress-btn {
  width: 1.875rem;
  height: 1.875rem;
  padding-inline: 0;
  font-size: 0.6875rem;
}

.workout-mobile-view {
  display: block;
}

.workout-mobile-only-flex {
  display: inline-flex;
}

.workout-desktop-view {
  display: none;
}

.workout-desktop-only-inline {
  display: none;
}

.rest-clock-display {
  font-size: clamp(3.35rem, 13vw, 3.85rem);
}

.session-clock-display {
  font-size: clamp(2.5rem, 9.75vw, 2.9rem);
}

.cardio-clock-display {
  font-size: clamp(3.75rem, 15vw, 4.5rem);
}

/* Modern @container queries so component layout responds to actual shell width */
.wk-app-brand-wrap {
  cursor: default !important;
}

.wk-app-brand-wrap .core-today-split-cap {
  display: none !important;
}

@container workout (max-width: 395px) {
  .wk-app-brand-wrap {
    padding: 4px 6px !important;
    gap: 0 !important;
  }
  .wk-app-brand-wrap .wk-brand-label {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .wk-app-brand-wrap {
    padding: 4px 6px !important;
    gap: 0 !important;
  }
  .wk-app-brand-wrap .wk-brand-label {
    display: none !important;
  }
}

body.force-mobile-view .wk-app-brand-wrap {
  padding: 4px 6px !important;
  gap: 0 !important;
}

body.force-mobile-view .wk-app-brand-wrap .wk-brand-label {
  display: none !important;
}

@container workout (min-width: 580px) {
  .workout-mobile-view,
  .workout-mobile-only-flex {
    display: none;
  }
  .workout-desktop-view {
    display: block;
  }
  .workout-desktop-only-inline {
    display: inline;
  }
  .wk-header {
    gap: 0.375rem;
    margin-bottom: 0.5rem;
  }
  .wk-header:has(#lift-subbar.hidden) {
    margin-bottom: 0.375rem;
  }
  .wk-top-cluster {
    gap: 0.375rem;
  }
  .wk-subbar {
    padding: 0.25rem 0.375rem;
  }
  .wk-subbar--lift:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
  }
  .wk-subbar .core-status-pill {
    height: 1.875rem;
    padding: 0 0.65rem;
    font-size: 0.76rem;
    gap: 0.4rem;
  }
  .wk-subbar-seg {
    height: 1.875rem;
  }
  .wk-cardio-seg {
    min-width: 11.25rem;
  }
  .wk-cardio-view > .wk-subbar--cardio {
    margin-bottom: -0.125rem;
  }
  .wk-top-icon-btn {
    width: 2.0625rem;
    height: 2.0625rem;
    border-radius: 10px;
  }
  .wk-top-bar-height,
  .wk-top-pill {
    height: 2.0625rem;
    font-size: 0.75rem;
  }
  .wk-top-pill,
  .wk-top-seg-btn {
    padding-inline: 0.5625rem;
    font-size: 0.75rem;
  }
  .wk-top-progress-btn {
    width: auto;
    height: 2.0625rem;
    padding-inline: 0.5625rem;
    font-size: 0.75rem;
  }
  .rest-clock-display {
    font-size: clamp(4.5rem, 10cqi, 5.5rem);
  }
  .session-clock-display {
    font-size: clamp(3.375rem, 7.5cqi, 4.125rem);
  }
  .cardio-clock-display {
    font-size: clamp(5rem, 12cqi, 6.25rem);
  }
}

/* 2-Pose Exercise Diagram Transitions & Gallery Controls */
.wk-vis-svg-sm {
  height: 88px;
}
.wk-vis-svg-md {
  height: 104px;
}
.wk-vis-svg-lg {
  height: 140px;
}
.wk-vis-demo-btn {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: #a5f3fc;
  transition: background-color 150ms ease, color 150ms ease;
}
.wk-vis-demo-btn:hover {
  background: rgba(6, 182, 212, 0.26);
  color: #ecfeff;
}
.wk-vis-gal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.wk-vis-gal-pill {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  border: 1px solid rgba(63, 63, 70, 0.85);
  background: #18181b;
  color: #a1a1aa;
  transition: all 140ms ease;
}
.wk-vis-gal-pill:hover {
  color: #f4f4f5;
  border-color: #52525b;
}
.wk-vis-gal-pill[data-active="1"] {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #09090b;
}
.wk-vis-gal-stepper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.wk-vis-gal-nav-prev {
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  font-size: 0.75rem;
  font-weight: 700;
}
.wk-vis-gal-nav-prev:hover {
  background: #27272a;
  color: #ffffff;
}
.wk-vis-gal-nav-next {
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  background: #f59e0b;
  border: 1px solid #fbbf24;
  color: #09090b;
  font-size: 0.75rem;
  font-weight: 800;
}
.wk-vis-gal-nav-next:hover {
  background: #fbbf24;
}
.wk-vis-gal-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  background: rgba(24, 24, 27, 0.75);
  border: 1px solid rgba(39, 39, 42, 0.85);
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.wk-vis-gal-row:hover {
  border-color: #3f3f46;
  background: rgba(39, 39, 42, 0.65);
}
.wk-vis-gal-row[data-vis-active="1"] {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.55);
}
.wk-alt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.wk-alt-pill {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  border: 1px solid rgba(63, 63, 70, 0.85);
  background: #09090b;
  color: #d4d4d8;
  transition: all 140ms ease;
}
.wk-alt-pill:hover {
  border-color: #71717a;
  color: #ffffff;
}
.wk-alt-pill[data-active="1"] {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}

@media (prefers-reduced-motion: no-preference) {
  .wk-vis-stage .wk-vis-pose-start,
  .wk-vis-stage .wk-vis-pose-peak,
  .wk-vis-stage .wk-vis-lat-glow {
    transition: opacity 240ms ease, fill-opacity 240ms ease;
  }
}
.wk-vis-stage[data-pose="start"] .wk-vis-pose-start {
  opacity: 1;
}
.wk-vis-stage[data-pose="start"] .wk-vis-pose-peak {
  opacity: 0;
}
.wk-vis-stage[data-pose="peak"] .wk-vis-pose-start {
  opacity: 0;
}
.wk-vis-stage[data-pose="peak"] .wk-vis-pose-peak {
  opacity: 1;
}
.wk-vis-stage[data-pose="peak"] .wk-vis-lat-glow {
  fill-opacity: 0.82;
}

/* Hide floating Vault edge tab while Workout modal sheets are open */
body:has(#history-modal:not(.hidden), #protocol-modal:not(.hidden), #complete-modal:not(.hidden), #restart-modal:not(.hidden)) .vault-edge-tab {
  opacity: 0;
  pointer-events: none;
}

/* Progression Ledger: Multi-Exercise Trends Chart */
.wk-trends-presets {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 0.125rem;
  scrollbar-width: none;
}
.wk-trends-axis-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 0.4375rem;
  font-size: 0.625rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  white-space: nowrap;
}
.wk-trends-presets::-webkit-scrollbar {
  display: none;
}
.wk-trends-preset-pill {
  padding: 0.3125rem 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  border: 1px solid rgba(63, 63, 70, 0.85);
  background: #18181b;
  color: #a1a1aa;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.wk-trends-preset-pill:hover {
  color: #f4f4f5;
  border-color: #52525b;
}
.wk-trends-preset-pill[data-active="1"] {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #09090b;
}
.wk-trends-hud-card {
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid rgba(39, 39, 42, 0.9);
  border-radius: 0.875rem;
  padding: 0.5rem 0.6875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wk-trends-hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.wk-trends-hud-list {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}
.wk-trends-hud-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0.375rem;
  margin-inline: -0.375rem;
  width: calc(100% + 0.75rem);
  border-radius: 0.5rem;
  text-align: left;
  transition: background-color 120ms ease;
}
.wk-trends-hud-row:hover,
.wk-trends-hud-row:active {
  background: rgba(39, 39, 42, 0.7);
}
.wk-trends-hud-row.is-carried {
  opacity: 0.72;
}
.wk-trends-solo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.125rem;
}
.wk-trends-back-btn {
  padding: 0.1875rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
}
.wk-trends-swatch {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}
.wk-trends-pct-pill {
  padding: 0.0625rem 0.375rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
}
.wk-trends-pct-pill.is-pos {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}
.wk-trends-pct-pill.is-neg {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}
.wk-trends-pct-pill.is-flat {
  background: rgba(63, 63, 70, 0.45);
  color: #a1a1aa;
}
.wk-trends-chart-card {
  background: rgba(9, 9, 11, 0.92);
  border: 1px solid rgba(39, 39, 42, 0.9);
  border-radius: 0.875rem;
  padding: 0.5rem 0.5rem 0.375rem;
}
.wk-trends-axis-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-inline: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.625rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #71717a;
}
.wk-trends-svg {
  display: block;
  height: auto;
  touch-action: pan-y;
  cursor: crosshair;
}
.wk-trends-chips-wrap {
  padding-top: 0.125rem;
}
.wk-trends-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.wk-trends-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  padding: 0.3125rem 0.5625rem;
  border-radius: 0.625rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  border: 1px solid rgba(39, 39, 42, 0.95);
  background: rgba(24, 24, 27, 0.65);
  color: #71717a;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.wk-trends-chip[data-active="1"] {
  background: rgba(24, 24, 27, 0.98);
  border-color: rgba(82, 82, 91, 0.95);
  color: #f4f4f5;
}
.wk-trends-chip-delta {
  font-size: 0.625rem;
  color: #a1a1aa;
  flex-shrink: 0;
}
.wk-trends-chip[data-active="1"] .wk-trends-chip-delta {
  color: #fbbf24;
}



