/* v164 (Nick's feedback batch 1) */
/* 2: schedule top panel fixed, calendar scrolls with the page (Day and Week) */
.sched-top.v164-stick{position:sticky;top:0;z-index:30;background:var(--bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:0;margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px;box-shadow:0 1px 0 var(--line)}
.sc-scroll.v164-flow{max-height:none!important;overflow-y:visible;overscroll-behavior:auto}
.sc-scroll.v164-flow .sc-head,.sc-scroll.v164-flow .wk-dhead{position:relative;z-index:6;will-change:transform}
.sc-scroll.v164-flow .sc-gut .sc-head{z-index:7}
.sc-scroll.v164-flow.v164-pinned .sc-head,.sc-scroll.v164-flow.v164-pinned .wk-dhead{box-shadow:0 2px 4px rgba(15,23,42,.08)}
/* 3: compliance page = dashboard compliance view, filters on one line */
.v164-comp-bar{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 0 6px;padding:2px 0}
.v164-comp-bar::-webkit-scrollbar{display:none}
.v164-comp-bar .dash-sf{display:flex;flex-wrap:nowrap;gap:5px;margin:0;align-items:center;flex:1 1 auto;min-width:0}
.v164-comp-bar .comp-sortsel{display:flex;margin:0;flex:1 1 0;min-width:0}
.v164-comp-bar .comp-sortsel>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.v164-comp-bar select{font-size:12.5px;min-height:32px;height:32px;padding:4px 18px 4px 7px;width:100%!important;min-width:0;max-width:none;margin:0;text-overflow:ellipsis;-webkit-appearance:none;appearance:none;background:var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 6px center;border:1px solid var(--line);border-radius:10px;color:var(--text)}
.v164-comp-bar .dash-sf-custom input{font-size:12px;height:32px;padding:2px 4px;width:auto}
.v164-comp-bar>*:last-child{flex:none;margin-left:auto}
.v164-comp-list{padding:6px 14px!important}
.v164-comp-list .comp-line{display:block;padding:8px 0;color:inherit;text-decoration:none}
.v164-comp-done{margin-top:2px;font-size:11.5px}
/* 4: week schedule */
.sc-body.v164-tap{cursor:pointer}
.v164-now{position:absolute;left:0;right:0;height:2px;background:var(--red,#e11d48);z-index:4;pointer-events:none}
/* ===== v164b: workout builder (phone first, Everfit-style) ===== */
.v164-bx .voice-card[hidden],.v164-bx .mv-card[hidden]{display:none!important}
.v164-bx .voice-card{position:relative}
.v164-vclose{position:absolute;top:6px;right:6px}
.v164-plus-row{display:flex;justify-content:center;margin:2px 0 12px}
.v164-plus{width:52px;height:52px;border-radius:50%;border:0;background:var(--blue,#0b63f6);color:#fff;display:grid;place-items:center;box-shadow:0 4px 12px rgba(11,99,246,.3);cursor:pointer}
.v164-bx .bx-item-head{display:flex;align-items:center;gap:8px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.v164-thumb{flex:none;width:44px;height:44px;border-radius:10px;overflow:hidden;position:relative;cursor:pointer;background:var(--soft)}
.v164-thumb .lib-thumb{width:44px;height:44px;border-radius:10px;background:#e8eefb;color:#475569}
.v164-thumb .lib-thumb-ph svg{width:20px;height:20px}
.v164-thumb.v164-novid::after{content:"";position:absolute;right:3px;top:3px;width:8px;height:8px;border-radius:50%;background:var(--amber,#f59e0b);box-shadow:0 0 0 2px var(--card,#fff)}
.v164-bx .bx-ex-name{font-size:15px;line-height:1.25}
/* 8: link icon between exercises */
.v164-link{display:flex;align-items:center;justify-content:center;position:relative;height:30px;margin:2px 0}
.v164-link::before{content:"";position:absolute;left:8px;right:8px;top:50%;border-top:1px solid var(--line)}
.v164-linkbtn{position:relative;z-index:1;width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--muted);display:grid;place-items:center;cursor:pointer;padding:0}
.v164-link.on .v164-linkbtn{color:#fff;background:var(--green,#16a34a);border-color:var(--green,#16a34a)}
.v164-link.on::before{border-top:2px solid var(--green,#16a34a)}
/* 7: press-and-hold drag: the list compresses so the whole workout fits on one screen */
body.v164-dragging{overflow-anchor:none}
body.v164-dragging .bx-item>:not(.bx-item-head),body.v164-dragging .bx-blk-opts,body.v164-dragging .bx-add-ex,body.v164-dragging .bx-blk-note,body.v164-dragging .v164-link,body.v164-dragging .bx-head,body.v164-dragging .v164-plus-row,body.v164-dragging .voice-card,body.v164-dragging .mv-card,body.v164-dragging .bx-draft{display:none!important}
body.v164-dragging .bx-blk{padding-top:2px!important;padding-bottom:2px!important;margin-bottom:4px!important}
body.v164-dragging .bx-blk-bar{min-height:0;padding:0 4px;font-size:11px}
body.v164-dragging .bx-blk-bar input,body.v164-dragging .bx-blk-bar .blk-type,body.v164-dragging .bx-blk-bar .bx-more{display:none}
body.v164-dragging .bx-item{padding:4px 8px!important;margin:3px 0!important;transition:transform .12s}
body.v164-dragging .bx-item .bx-more,body.v164-dragging .bx-item .each-chip{visibility:hidden}
body.v164-dragging .v164-thumb,body.v164-dragging .v164-thumb .lib-thumb{width:30px;height:30px}
body.v164-dragging .bx-item.v164-src{opacity:.35}
body.v164-dragging .bx-item.v164-drop-before{box-shadow:0 -3px 0 var(--blue,#0b63f6)}
body.v164-dragging .bx-item.v164-drop-after{box-shadow:0 3px 0 var(--blue,#0b63f6)}
.v164-ghost{position:fixed;left:12px;right:12px;z-index:9999;display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:12px;background:var(--card,#fff);box-shadow:0 10px 28px rgba(15,23,42,.25);pointer-events:none;font-size:14px}
.v164-ghost .v164-thumb,.v164-ghost .lib-thumb{width:32px;height:32px}
.bx-item.v164-moved{animation:v164pulse 1.2s}
@keyframes v164pulse{0%{box-shadow:0 0 0 3px var(--blue,#0b63f6)}100%{box-shadow:0 0 0 0 transparent}}
/* 10: exercise details sheet */
.v164-exd-sheet{max-height:100dvh}
@media(max-width:899px){.modal .sheet.v164-exd-sheet{height:100dvh;max-height:100dvh;border-radius:0}}
.v164-exd-name{margin:6px 0 10px}
.v164-exd-vid{border-radius:12px;overflow:hidden;background:#0f172a;aspect-ratio:16/9;display:grid;place-items:center;margin-bottom:10px}
.v164-exd-vid iframe,.v164-exd-vid video{width:100%;height:100%;border:0;display:block}
.v164-exd-novid{color:#cbd5e1;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:13px}
.v164-exd-vrow{flex-wrap:nowrap;gap:6px}
.v164-exd-m{flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.v164-exd-m .chip{text-transform:capitalize}
.v164-exd-save{gap:8px;margin-top:10px}
/* 5: the builder's own + replaces the global + on the phone (the ✦ and feedback bubbles stay) */
@media(max-width:899px){body.v164-bx #dqFabs .dq-fab{display:none!important}}
body.v164-dragging .bx-ex-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

/* ===== v164c: edge-to-edge Home + tab swipe / camera (Nick batch 1 items 11-14) ===== */
/* v164f: padding:0 is Home-only. v158 cards and .home-stories-wrap still use margin:-14px,
   so zeroing gutters on every client page pulled Train/Me titles and icons off the left
   and made the page itself scroll sideways. Inner scrollers keep their own overflow-x. */
@media (max-width:899px){
  html,body{overflow-x:hidden}
  /* 11/12: full-bleed Home only — Train / Me / chat keep the 14px page gutter */
  body.igm.v164c-edge.v164c-home .ig-main .page{padding-left:0!important;padding-right:0!important}
  body.igm.v164c-edge.v164c-home .client-head,
  body.igm.v164c-edge.v164c-home .home-stories-wrap,
  body.igm.v164c-edge.v164c-home .home-stories,
  body.igm.v164c-edge.v164c-home .pin-stack,
  body.igm.v164c-edge.v164c-home .hero-card,
  body.igm.v164c-edge.v164c-home .week-card,
  body.igm.v164c-edge.v164c-home .today-card,
  body.igm.v164c-edge.v164c-home .post,
  body.igm.v164c-edge.v164c-home .hf-compose,
  body.igm.v164c-edge.v164c-home .tu-nudge,
  body.igm.v164c-edge.v164c-home .ig-main .page .card{margin-left:0!important;margin-right:0!important;border-radius:0!important;border-left:0!important;border-right:0!important}
  body.igm.v164c-edge.v164c-home .hero-card,
  body.igm.v164c-edge.v164c-home .week-card,
  body.igm.v164c-edge.v164c-home .today-card{border:0!important;box-shadow:none!important}
  body.igm.v164c-edge.v164c-home .hero-card,
  body.igm.v164c-edge.v164c-home .week-card,
  body.igm.v164c-edge.v164c-home .today-card,
  body.igm.v164c-edge.v164c-home .client-head{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  body.igm.v164c-edge.v164c-home .home-stories{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
  body.igm.v164c-edge.v164c-home .home-stories-wrap{margin-top:-8px;margin-bottom:12px}
  /* 12: feed posts flow with no dividers / card chrome */
  body.igm.v164c-edge.v164c-home .post{border:0!important;box-shadow:none!important;background:transparent;padding-bottom:18px;margin-bottom:0}
  body.igm.v164c-edge.v164c-home .post + .post{border-top:0!important}
  body.igm.v164c-edge.v164c-home .post .ph{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  body.igm.v164c-edge.v164c-home .post .pm{margin-left:0;margin-right:0;border-radius:0;aspect-ratio:auto;min-height:220px}
  body.igm.v164c-edge.v164c-home .post .pa,
  body.igm.v164c-edge.v164c-home .post .pc{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  /* 13: bottom bar — no border, flush to the bottom; + removed */
  body.igm.v164c-edge nav.home-bar.ig-tabs{
    border:0!important;border-top:0!important;box-shadow:none!important;
    padding-top:4px;padding-bottom:env(safe-area-inset-bottom,0px);
    background:color-mix(in srgb,var(--card) 96%,transparent);
  }
  body.igm.v164c-edge .home-plus,
  body.igm.v164c-edge .home-plus-slot{display:none!important}
  body.igm.v164c-edge .ig-main .page{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
  /* 14: Instagram-style camera sheet */
  .v164c-cam{position:fixed;inset:0;z-index:80;background:#0b1220;color:#fff;display:flex;flex-direction:column;padding:max(12px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));transform:translateX(-105%);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
  .v164c-cam.open{transform:translateX(0)}
  .v164c-cam-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
  .v164c-cam-top b{font-size:18px;letter-spacing:-.02em}
  .v164c-cam-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:auto 0;width:100%}
  .v164c-cam-grid button,.v164c-cam-grid label{appearance:none;border:0;border-radius:22px;background:#152238;color:#fff;min-height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font:inherit;font-weight:750;cursor:pointer}
  .v164c-cam-grid button:active,.v164c-cam-grid label:active{transform:scale(.98)}
  .v164c-cam-grid .ic-wrap{width:52px;height:52px;border-radius:50%;background:#0c8f58;display:grid;place-items:center}
  .v164c-hint{position:fixed;left:10px;top:42%;z-index:45;pointer-events:none;opacity:0;transform:translateX(-8px);transition:opacity .4s,transform .4s;background:#0c2348e6;color:#fff;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:700;box-shadow:0 8px 24px #0005}
  .v164c-hint.show{opacity:1;transform:translateX(0)}
  /* coach bottom bar: keep + fabs, but allow swipe */
  body.v164c-edge nav.bnav:not(.home-bar){border-top:0!important;box-shadow:none!important}
}
@media (min-width:900px){
  .v164c-cam,.v164c-hint{display:none!important}
}

/* ================= v164d: tentative bookings (items 15-17) ================= */
.ds-card.is-tentative, .sc-b.is-tentative, .wk-item.is-tentative { outline: 2px solid #c47a00; outline-offset: -1px; }
.pill.ds-tent, .sc-tent, .wk-tent {
  background: #fff3d6; color: #8a4b00; font-weight: 750; border: 1px solid #e6b15a;
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; line-height: 1.4;
}
.sc-b .sc-tent, .wk-item .sc-tent { margin-top: 2px; }
.ds-tent-banner {
  background: #fff3d6; border: 1px solid #e6b15a; color: #5c3a00;
  padding: 12px 14px; margin: 0 0 12px; border-radius: 12px;
}
.ds-tent-banner > b { display: block; font-size: 15px; margin-bottom: 8px; }
.ds-tent-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e6b15a55; }
.ds-tent-row:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.ds-tent-row .grow { min-width: 0; flex: 1 1 140px; }
.ds-tent-row small { display: block; color: #8a4b00; }
.dq[data-dq="tentative"] .dq-standby { margin: 10px 0; padding: 10px 12px; background: #f6f7fb; border-radius: 10px; }
