/* Fitness Tracker v3.14.1 patch layer.
   Mobile-first fixes: final blue theme override, template list compacting,
   drop-set mobile layout, and icon/art consistency. */
:root{
  --brand:#168568!important;
  --brand-2:#28A17E!important;
  --brand-deep:#11674F!important;
  --brand-soft:#E6F6EE!important;
  --ft-green:#168568!important;
  --ft-green-strong:#11674F!important;
  --fit-primary:#168568!important;
  --fit-primary-dark:#11674F!important;
  --fit-primary-soft:#E6F6EE!important;
  --fit-border-green:#CBE9DA!important;
}
html[data-theme="dark"]{
  --brand:#6CE0B5!important;
  --brand-2:#39B98F!important;
  --brand-deep:#B9F4D8!important;
  --brand-soft:#1E3B34!important;
  --ft-green:#6CE0B5!important;
  --ft-green-strong:#B9F4D8!important;
  --fit-primary:#6CE0B5!important;
  --fit-primary-dark:#B9F4D8!important;
  --fit-primary-soft:#1E3B34!important;
  --fit-border-green:#466358!important;
}
/* Force old legacy “green” semantic pieces to follow the new blue brand. */
.home-sync-note strong,
.home-advice-list strong,
.train-mini-stats strong,
.train-mini-stats b,
.plan-card .eyebrow,
.training-target-note strong,
.notice.success,
.backup-success,
.template-item-main small strong,
.template-item-main .success-text,
.text-success,
.success-text,
.status-ok,
.status-success,
[class*="success"],
[class*="ok-state"]{
  color:var(--brand-deep)!important;
}
.notice.success,
.backup-success{
  background:var(--brand-soft)!important;
  border-color:var(--line-strong)!important;
}
.primary-btn,
.home-primary-cta,
.bottom-nav.bottom-nav-v3 .bottom-nav-add b,
body .mobile-live-entry,
body[data-page="/mobile-train"] .mobile-live-dock a.main b{
  background:#168568!important;
  border-color:#168568!important;
}
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .home-primary-cta,
html[data-theme="dark"] .bottom-nav.bottom-nav-v3 .bottom-nav-add b,
html[data-theme="dark"] body .mobile-live-entry,
html[data-theme="dark"] body[data-page="/mobile-train"] .mobile-live-dock a.main b{
  background:#39B98F!important;
  border-color:#39B98F!important;
}
/* Unify art/icon containers so transparent PNG/WebP assets look intentional. */
.exercise-art,
.exercise-art.large,
.mini-icon,
.mobile-live-art,
.category-icon,
[data-live-art]{
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--brand-soft) 68%,var(--card)),var(--card-soft))!important;
  border:1px solid var(--line)!important;
  box-shadow:none!important;
}
.mini-icon,
.template-item-row .mini-icon,
.plan-item-row .mini-icon,
.history-exercise-name .mini-icon,
.dashboard-card .mini-icon{
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  padding:4px!important;
}
.exercise-art,
.mobile-live-art,
.exercise-card .exercise-art.large{
  border-radius:15px!important;
}
.exercise-img,
.category-icon-img,
.exercise-svg{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
}
.exercise-svg{
  padding:10px!important;
  stroke:var(--brand-deep)!important;
  color:var(--brand-deep)!important;
}
/* Template page mobile card reflow. */
.plan-item-row,
.template-item-row.template-item-row-v3.plan-item-row{
  align-items:start!important;
}
.plan-item-row .template-item-main{
  min-width:0!important;
}
.plan-item-row .template-item-main strong{
  display:block!important;
  font-size:15px!important;
  line-height:1.35!important;
  color:var(--text)!important;
  word-break:break-word!important;
}
.plan-item-row .template-item-main small,
.plan-item-row .template-item-main em{
  display:block!important;
  color:var(--muted)!important;
  line-height:1.45!important;
  word-break:break-word!important;
}
.plan-item-row .template-item-edit > summary{
  min-height:36px!important;
  padding:7px 12px!important;
  border-radius:12px!important;
  border:1px solid var(--line)!important;
  background:var(--card)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
@media(max-width:760px){
  body[data-page="/templates"] .plan-item-row{
    grid-template-columns:30px 42px minmax(0,1fr) 34px!important;
    gap:8px!important;
    padding:10px!important;
    border:1px solid var(--line)!important;
    border-radius:16px!important;
    background:var(--card-soft)!important;
  }
  body[data-page="/templates"] .plan-item-row > .plan-order-badge{
    grid-column:1!important;grid-row:1!important;align-self:start!important;
  }
  body[data-page="/templates"] .plan-item-row > .mini-icon{
    grid-column:2!important;grid-row:1!important;
  }
  body[data-page="/templates"] .plan-item-row > .template-item-main{
    grid-column:3 / 5!important;grid-row:1!important;padding-top:1px!important;
  }
  body[data-page="/templates"] .plan-item-row > .plan-item-order-actions{
    grid-column:1 / 3!important;grid-row:2!important;display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important;
  }
  body[data-page="/templates"] .plan-item-order-actions form{width:100%!important}
  body[data-page="/templates"] .plan-move-btn{
    width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;
    border-radius:11px!important;
  }
  body[data-page="/templates"] .plan-item-row > .template-item-edit{
    grid-column:3!important;grid-row:2!important;width:100%!important;
  }
  body[data-page="/templates"] .plan-item-row > .template-item-edit > summary{
    width:100%!important;min-height:36px!important;padding:7px 10px!important;
  }
  body[data-page="/templates"] .plan-item-row > form:last-child{
    grid-column:4!important;grid-row:2!important;width:34px!important;justify-self:end!important;
  }
  body[data-page="/templates"] .plan-item-row > form:last-child .icon-btn{
    width:34px!important;min-width:34px!important;height:36px!important;min-height:36px!important;
    border-radius:11px!important;
  }
}
@media(max-width:390px){
  body[data-page="/templates"] .plan-item-row{
    grid-template-columns:28px 38px minmax(0,1fr) 32px!important;
    gap:7px!important;
  }
  body[data-page="/templates"] .plan-item-row .mini-icon{
    width:38px!important;min-width:38px!important;height:38px!important;
  }
  body[data-page="/templates"] .plan-item-row .template-item-main strong{font-size:14px!important}
  body[data-page="/templates"] .plan-item-row .template-item-main small,
  body[data-page="/templates"] .plan-item-row .template-item-main em{font-size:12px!important}
}
/* Mobile quick log: make the row denser and the drop-set editor easier to use. */
body[data-page="/mobile-train"] .mobile-live-panel-head strong{font-size:14px!important}
body[data-page="/mobile-train"] .mobile-live-panel-head span{font-size:11px!important;line-height:1.45!important;color:var(--muted)!important}
body[data-page="/mobile-train"] .mobile-live-set-list .set-head{
  margin-bottom:4px!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row{
  gap:6px!important;
  padding:7px!important;
  border-radius:16px!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-index{
  border-radius:11px!important;
  background:var(--brand-soft)!important;
  color:var(--brand-deep)!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-type-wrap,
body[data-page="/mobile-train"] .mobile-live-flat-set-row > input,
body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-row-controls{
  min-width:0!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row .set-type-wrap{
  border-radius:11px!important;
  overflow:hidden!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row .set-type-select{
  text-align:center!important;
  font-weight:760!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row .set-type-short{
  font-weight:800!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-row-controls{
  display:grid!important;
  grid-template-columns:30px 28px!important;
  align-items:center!important;
  justify-content:end!important;
  gap:5px!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row .set-complete-btn,
body[data-page="/mobile-train"] .mobile-live-flat-set-row .remove-set{
  margin:0!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row .remove-set{
  color:var(--danger)!important;
  background:var(--card)!important;
}
body[data-page="/mobile-train"] .mobile-live-flat-set-row.has-drop-stages{
  padding-bottom:9px!important;
}
body[data-page="/mobile-train"] .drop-stage-editor{
  margin-top:7px!important;
  padding:10px!important;
  border-radius:14px!important;
  background:color-mix(in srgb,var(--brand-soft) 34%,var(--card))!important;
  border:1px solid var(--line)!important;
}
body[data-page="/mobile-train"] .drop-stage-head{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:3px!important;
}
body[data-page="/mobile-train"] .drop-stage-head strong{font-size:13px!important}
body[data-page="/mobile-train"] .drop-stage-head small{font-size:11px!important;line-height:1.45!important}
body[data-page="/mobile-train"] .drop-stage-list{gap:6px!important}
body[data-page="/mobile-train"] .drop-stage-row{
  grid-template-columns:40px minmax(0,1fr) minmax(0,.92fr) 30px!important;
  gap:6px!important;
}
body[data-page="/mobile-train"] .drop-stage-index{
  min-height:36px!important;
  border-radius:10px!important;
}
body[data-page="/mobile-train"] .drop-stage-row label > span{
  top:4px!important;
  left:8px!important;
}
body[data-page="/mobile-train"] .drop-stage-row input{
  height:38px!important;
  min-height:38px!important;
  padding:13px 8px 2px!important;
}
body[data-page="/mobile-train"] .drop-stage-remove{
  width:30px!important;min-width:30px!important;height:36px!important;border-radius:10px!important;
}
body[data-page="/mobile-train"] .drop-stage-add{
  min-height:36px!important;
  border-style:dashed!important;
  border-color:var(--brand-2)!important;
  color:var(--brand-deep)!important;
}
@media(max-width:760px){
  body[data-page="/mobile-train"] .mobile-live-set-list .set-head.set-row-with-type,
  body[data-page="/mobile-train"] .mobile-live-set-list .set-row-with-type.mobile-live-flat-set-row[data-set-row]{
    grid-template-columns:32px 42px minmax(54px,1fr) minmax(44px,.92fr) minmax(40px,.72fr) 58px!important;
    gap:5px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-index,
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-type-wrap,
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_weight],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_reps],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_rpe],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-row-controls{
    height:40px!important;min-height:40px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-type-wrap{
    width:42px!important;min-width:42px!important;max-width:42px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-index{
    width:32px!important;min-width:32px!important;max-width:32px!important;
  }
}
@media(max-width:390px){
  body[data-page="/mobile-train"] .mobile-live-set-list .set-head.set-row-with-type,
  body[data-page="/mobile-train"] .mobile-live-set-list .set-row-with-type.mobile-live-flat-set-row[data-set-row]{
    grid-template-columns:30px 38px minmax(48px,1fr) minmax(40px,.88fr) minmax(36px,.66fr) 54px!important;
    gap:4px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row{
    padding:6px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-type-wrap{
    width:38px!important;min-width:38px!important;max-width:38px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-index{
    width:30px!important;min-width:30px!important;max-width:30px!important;height:38px!important;min-height:38px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_weight],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_reps],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > input[name=set_rpe],
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-row-controls,
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-type-wrap{
    height:38px!important;min-height:38px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row > .set-row-controls{
    grid-template-columns:28px 22px!important;
    width:54px!important;min-width:54px!important;max-width:54px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row .set-complete-btn{
    width:28px!important;min-width:28px!important;max-width:28px!important;height:38px!important;min-height:38px!important;
  }
  body[data-page="/mobile-train"] .mobile-live-flat-set-row .remove-set{
    width:22px!important;min-width:22px!important;max-width:22px!important;height:38px!important;min-height:38px!important;font-size:16px!important;
  }
  body[data-page="/mobile-train"] .drop-stage-editor{padding:9px!important}
  body[data-page="/mobile-train"] .drop-stage-row{
    grid-template-columns:34px minmax(0,1fr) minmax(0,.86fr) 26px!important;
    gap:5px!important;
  }
  body[data-page="/mobile-train"] .drop-stage-index,
  body[data-page="/mobile-train"] .drop-stage-remove{height:34px!important;min-height:34px!important}
  body[data-page="/mobile-train"] .drop-stage-row input{height:36px!important;min-height:36px!important}
}
/* Keep duration/cardio mobile rows aligned after the new compact layout. */
@media(max-width:760px){
  body[data-page="/mobile-train"] .record-type-form[data-record-type=duration] .mobile-live-set-list .set-row-with-type.mobile-live-flat-set-row[data-set-row],
  body[data-page="/mobile-train"] .record-type-form[data-record-type=duration] .mobile-live-set-list .set-head.set-row-with-type{
    grid-template-columns:32px 40px minmax(58px,1fr) minmax(42px,.72fr) 58px!important;
  }
  body[data-page="/mobile-train"] .record-type-form[data-record-type=cardio] .mobile-live-set-list .set-row-with-type.mobile-live-flat-set-row[data-set-row],
  body[data-page="/mobile-train"] .record-type-form[data-record-type=cardio] .mobile-live-set-list .set-head.set-row-with-type{
    grid-template-columns:28px 36px minmax(48px,1fr) minmax(48px,1fr) minmax(38px,.72fr) 54px!important;
  }
}
