.rehab-page{
  max-width:1180px;
  margin:auto;
  color:#173344;
  font-size:18px;
  line-height:1.75;
}
.rehab-back{
  display:inline-flex;
  margin:0 0 18px;
  color:#315b72;
  font-weight:750;
}
.rehab-hero{
  display:grid;
  grid-template-columns:minmax(0,1.04fr) minmax(320px,.74fr);
  gap:28px;
  align-items:stretch;
  min-height:360px;
  padding:34px;
  overflow:hidden;
  border:1px solid #d8e8ef;
  border-radius:28px;
  background:#f2f9fc;
  box-shadow:0 18px 45px rgba(22,82,120,.08);
}
.rehab-theme-green .rehab-hero{background:#f0faf5}
.rehab-theme-gold .rehab-hero{background:#fff8ea}
.rehab-hero-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.rehab-kicker{
  color:#176297;
  font-size:13px;
  font-weight:850;
  letter-spacing:1.5px;
  margin-bottom:14px;
}
.rehab-hero h1{
  margin:0 0 16px;
  font-size:clamp(34px,4vw,54px);
  line-height:1.18;
  letter-spacing:-1px;
}
.rehab-hero p{
  max-width:620px;
  margin:0 0 24px;
  color:#526977;
  font-size:20px;
}
.rehab-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.rehab-hero-actions a{
  min-height:46px;
  padding:11px 16px;
  border:1px solid #bcd8e6;
  border-radius:12px;
  background:#fff;
  font-weight:800;
  color:#164667;
}
.rehab-hero-actions a:first-child{
  background:#1576bc;
  border-color:#1576bc;
  color:#fff;
}
.rehab-hero-media{
  position:relative;
  min-height:290px;
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(25,88,125,.08);
}
.rehab-hero-scene{
  width:100%;
  height:100%;
  min-height:290px;
  object-fit:cover;
  display:block;
}
.rehab-hero-symbol{
  position:absolute;
  right:18px;
  bottom:18px;
  width:96px;
  height:96px;
  object-fit:contain;
  border-radius:22px;
  background:rgba(255,255,255,.88);
  box-shadow:0 12px 32px rgba(20,65,94,.16);
}
.rehab-safety{
  margin:22px 0;
  padding:18px 22px;
  border:1px solid #f0d8ae;
  border-left:6px solid #c98422;
  border-radius:18px;
  background:#fff9ee;
}
.rehab-safety strong{
  display:block;
  margin-bottom:8px;
  font-size:20px;
}
.rehab-safety ul{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 24px;
  margin:0;
  padding-left:20px;
}
.rehab-main-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);
  gap:22px;
  align-items:start;
}
.rehab-player,
.rehab-card,
.rehab-sources{
  border:1px solid #d6e5ed;
  border-radius:22px;
  background:#fff;
  box-shadow:0 12px 30px rgba(27,70,97,.05);
}
.rehab-player{
  position:sticky;
  top:18px;
  padding:24px;
  background:#eef7fb;
}
.rehab-section-head span{
  display:inline-flex;
  margin-bottom:6px;
  padding:5px 9px;
  border-radius:8px;
  background:#dceff8;
  color:#176297;
  font-size:13px;
  font-weight:850;
}
.rehab-section-head h2,
.rehab-card h2,
.rehab-sources h2{
  margin:0 0 16px;
  font-size:25px;
  letter-spacing:-.4px;
}
.rehab-illustration{
  overflow:hidden;
  min-height:250px;
  margin:4px 0 18px;
  border-radius:20px;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(30,91,126,.08);
}
.rehab-scene-demo{
  min-height:250px;
  padding:12px;
}
.rehab-scene-demo img{
  display:block;
  width:100%;
  height:220px;
  object-fit:contain;
  object-position:center;
  border-radius:16px;
  background:#f8fcfe;
}
.rehab-motion-strip{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}
.rehab-motion-strip span{
  min-height:42px;
  display:grid;
  place-items:center;
  padding:8px 6px;
  border:1px solid #cfe1eb;
  border-radius:12px;
  background:#f8fcfe;
  color:#173344;
  font-size:14px;
  font-weight:850;
  text-align:center;
}
.rehab-player[data-step="0"] [data-motion="0"],
.rehab-player[data-step="1"] [data-motion="1"],
.rehab-player[data-step="2"] [data-motion="2"],
.rehab-player[data-step="3"] [data-motion="3"]{
  background:#1576bc;
  color:#fff;
}
.rehab-beats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  padding:0;
  margin:0 0 16px;
  list-style:none;
}
.rehab-beats li{
  min-height:74px;
  padding:10px 8px;
  border:2px solid transparent;
  border-radius:14px;
  background:#fff;
  text-align:center;
}
.rehab-beats b,
.rehab-beats span{
  display:block;
}
.rehab-beats b{
  margin-bottom:3px;
  font-size:16px;
}
.rehab-beats .is-current{
  border-color:#176297;
  background:#d9eefb;
  box-shadow:0 8px 18px rgba(23,98,151,.12);
}
.rehab-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.rehab-controls label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:48px;
  padding-left:4px;
  font-weight:700;
}
.rehab-page button,
.rehab-page select,
.rehab-actions a{
  min-height:48px;
  padding:10px 15px;
  border:1px solid #176297;
  border-radius:12px;
  background:#fff;
  color:#164667;
  font:inherit;
  font-weight:750;
}
.rehab-page button[data-start]{
  background:#1576bc;
  color:#fff;
}
.rehab-page button:disabled{
  opacity:.52;
}
.rehab-status{
  margin:12px 0 0;
  color:#315b72;
  font-size:16px;
}
.rehab-side-stack{
  display:grid;
  gap:18px;
}
.rehab-card{
  padding:22px;
}
.rehab-card p{
  color:#526977;
}
.rehab-check label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:10px 0;
  color:#173344;
}
.rehab-page input[type=checkbox]{
  width:22px;
  height:22px;
  margin:3px 0 0;
  flex:0 0 auto;
}
.rehab-actions div{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.rehab-actions [data-completion-status]{
  margin:12px 0 0;
}
.rehab-read p{
  margin-bottom:12px;
}
.rehab-sources{
  margin-top:22px;
  padding:22px;
}
.rehab-sources>div{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.rehab-sources p{
  margin:0 0 12px;
}
.rehab-source{
  display:inline-block;
  max-width:100%;
  overflow-wrap:anywhere;
  color:#315b72;
  font-size:15px;
}
.rehab-page :focus-visible{
  outline:3px solid #175ea8;
  outline-offset:3px;
}
.rehab-player:not([data-reduced="true"]) .rehab-motion-strip span{
  transition:transform .25s ease,opacity .25s ease,background .25s ease,color .25s ease;
}
@media(max-width:900px){
  .rehab-hero,
  .rehab-main-grid{
    grid-template-columns:1fr;
  }
  .rehab-player{
    position:static;
  }
  .rehab-safety ul,
  .rehab-sources>div{
    grid-template-columns:1fr;
  }
}
@media(max-width:600px){
  .rehab-page{
    font-size:17px;
  }
  .rehab-hero{
    gap:18px;
    padding:20px;
    border-radius:22px;
  }
  .rehab-hero h1{
    font-size:31px;
  }
  .rehab-hero p{
    font-size:17px;
  }
  .rehab-hero-actions a{
    flex:1 1 44%;
    text-align:center;
  }
  .rehab-hero-media{
    min-height:210px;
  }
  .rehab-hero-scene{
    min-height:210px;
  }
  .rehab-hero-symbol{
    width:74px;
    height:74px;
  }
  .rehab-safety,
  .rehab-player,
  .rehab-card,
  .rehab-sources{
    padding:17px;
    border-radius:18px;
  }
  .rehab-illustration{
    min-height:190px;
  }
  .rehab-scene-demo,
  .rehab-scene-demo img{
    min-height:0;
  }
  .rehab-scene-demo img{
    height:178px;
  }
  .rehab-motion-strip{
    gap:4px;
  }
  .rehab-motion-strip span{
    min-height:32px;
    font-size:12px;
  }
  .rehab-beats{
    gap:6px;
  }
  .rehab-beats li{
    min-height:66px;
    padding:8px 4px;
    font-size:14px;
  }
  .rehab-controls button{
    flex:1 1 42%;
  }
  .rehab-controls label{
    width:100%;
  }
  .rehab-controls select{
    flex:1;
  }
}


.rehab-frame-note{
  margin:12px 0 0;
  padding:13px 15px;
  border:1px solid #b9dbea;
  border-radius:14px;
  background:#fff;
  color:#164667;
  font-size:16px;
  font-weight:800;
  line-height:1.55;
  text-align:center;
}
.rehab-step-card{
  margin:0 0 16px;
  padding:18px 20px;
  border:1px solid #cfe4ee;
  border-left:7px solid #1576bc;
  border-radius:18px;
  background:#fffdf7;
  box-shadow:0 10px 24px rgba(27,70,97,.06);
}
.rehab-theme-green .rehab-step-card{border-left-color:#3f9f78;background:#f8fff9}
.rehab-theme-gold .rehab-step-card{border-left-color:#d29a26;background:#fffaf0}
.rehab-step-card strong{
  display:block;
  margin-bottom:8px;
  color:#0e3651;
  font-size:22px;
  line-height:1.35;
  letter-spacing:-.3px;
}
.rehab-step-card p{
  margin:0;
  color:#425f70;
  font-size:18px;
  line-height:1.75;
}
.rehab-beats small{
  display:block;
  margin-bottom:5px;
  color:#176297;
  font-size:14px;
  font-weight:850;
}
.rehab-beats span{
  font-size:15px;
  line-height:1.45;
}
.rehab-status{
  min-height:34px;
  font-size:16px;
  line-height:1.6;
}
.rehab-page button[aria-pressed="true"]{
  background:#173344;
  border-color:#173344;
  color:#fff;
}
@media (max-width:720px){
  .rehab-step-card{padding:16px}
  .rehab-step-card strong{font-size:20px}
  .rehab-step-card p{font-size:17px}
  .rehab-frame-note{font-size:15px}
}

.rehab-action-frame{
  position:relative;
  margin:0;
  overflow:hidden;
  border-radius:18px;
  background:#f8fcfe;
}
.rehab-action-frame img{
  display:block;
  width:100%;
  height:300px;
  object-fit:contain;
  object-position:center;
  background:#f8fcfe;
}
.rehab-action-frame figcaption{
  position:absolute;
  left:16px;
  right:16px;
  bottom:16px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 26px rgba(15,58,86,.12);
  color:#173344;
  line-height:1.45;
}
.rehab-action-frame figcaption strong{
  flex:0 0 auto;
  color:#0f6eaa;
  font-weight:900;
}
.rehab-action-frame figcaption span{
  min-width:0;
  font-size:15px;
  font-weight:750;
}
.rehab-scene-demo .rehab-scene-demo img{height:auto}
@media (max-width:720px){
  .rehab-action-frame img{height:240px}
  .rehab-action-frame figcaption{position:static;margin-top:10px;box-shadow:none;background:#fff}
}

.rehab-coach-banner{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  margin:0 0 18px;
  padding:18px 20px;
  border:1px solid #b9dbea;
  border-radius:20px;
  background:linear-gradient(135deg,#ffffff 0%,#e7f6ff 100%);
  box-shadow:0 14px 30px rgba(21,118,188,.1);
}
.rehab-theme-green .rehab-coach-banner{background:linear-gradient(135deg,#ffffff 0%,#ecfbf2 100%);border-color:#bde5cf}
.rehab-theme-gold .rehab-coach-banner{background:linear-gradient(135deg,#ffffff 0%,#fff4d8 100%);border-color:#ecd28f}
.rehab-coach-banner strong{
  color:#0d3450;
  font-size:22px;
  line-height:1.42;
  letter-spacing:-.35px;
}
.rehab-coach-banner span{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 13px;
  border-radius:999px;
  background:#0f6eaa;
  color:#fff;
  font-weight:900;
  white-space:nowrap;
}
.rehab-theme-green .rehab-coach-banner span{background:#21835d}
.rehab-theme-gold .rehab-coach-banner span{background:#b97913}
.rehab-player{
  background:linear-gradient(180deg,#eef8fd 0%,#f8fcfe 100%);
}
.rehab-theme-green .rehab-player{background:linear-gradient(180deg,#effbf5 0%,#f9fffb 100%)}
.rehab-theme-gold .rehab-player{background:linear-gradient(180deg,#fff7e5 0%,#fffdf8 100%)}
.rehab-section-head h2{
  font-size:30px;
}
.rehab-illustration{
  min-height:360px;
  border-radius:26px;
  background:#fff;
}
.rehab-scene-demo{
  padding:16px;
}
.rehab-action-frame{
  border:1px solid #d4e8f1;
  box-shadow:0 18px 38px rgba(19,80,116,.12);
}
.rehab-action-frame img{
  height:390px;
  padding:10px;
}
.rehab-action-frame figcaption{
  left:20px;
  right:20px;
  bottom:20px;
  padding:16px 18px;
}
.rehab-action-frame figcaption strong{
  font-size:18px;
}
.rehab-action-frame figcaption span{
  font-size:17px;
}
.rehab-motion-strip{
  margin-top:14px;
}
.rehab-motion-strip span{
  min-height:58px;
  font-size:16px;
  border-radius:16px;
  background:#fff;
}
.rehab-beats{
  gap:12px;
}
.rehab-beats li{
  min-height:104px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-color:#dbeaf1;
  box-shadow:0 8px 20px rgba(27,70,97,.05);
}
.rehab-beats b{
  font-size:18px;
}
.rehab-beats small{
  color:#0f6eaa;
  font-size:15px;
}
.rehab-beats span{
  font-size:16px;
  font-weight:850;
}
.rehab-step-card{
  padding:22px 24px;
  border-radius:22px;
}
.rehab-step-card strong{
  font-size:25px;
}
.rehab-step-card p{
  font-size:19px;
}
.rehab-controls{
  padding-top:4px;
}
.rehab-page button[data-start]{
  min-width:140px;
  background:#0b78c6;
  box-shadow:0 10px 20px rgba(11,120,198,.2);
}
@media(max-width:900px){
  .rehab-coach-banner{grid-template-columns:1fr}
  .rehab-coach-banner span{justify-self:start;white-space:normal;text-align:center}
  .rehab-illustration{min-height:0}
  .rehab-action-frame img{height:320px}
}
@media(max-width:600px){
  .rehab-section-head h2{font-size:27px}
  .rehab-coach-banner{padding:15px}
  .rehab-coach-banner strong{font-size:19px}
  .rehab-action-frame img{height:250px}
  .rehab-motion-strip{grid-template-columns:repeat(2,1fr)}
  .rehab-motion-strip span{min-height:48px;font-size:14px}
  .rehab-beats{grid-template-columns:repeat(2,1fr)}
  .rehab-beats li{min-height:94px}
}

/* Live follow-along rehab coach diagrams */
.rehab-live-coach{
  position:relative;
  min-height:430px;
  overflow:hidden;
  border:1px solid #cfe3ed;
  border-radius:26px;
  background:radial-gradient(circle at 50% 20%,#ffffff 0,#f3fbff 46%,#e8f5fb 100%);
  box-shadow:0 18px 38px rgba(19,80,116,.12);
}
.rehab-countdown{
  position:absolute;
  z-index:3;
  top:18px;
  left:18px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}
.rehab-countdown span{
  min-width:54px;
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #cfe3ed;
  color:#164667;
  font-weight:900;
  text-align:center;
}
.rehab-player[data-step="0"] .rehab-countdown span:nth-child(1),
.rehab-player[data-step="1"] .rehab-countdown span:nth-child(2),
.rehab-player[data-step="2"] .rehab-countdown span:nth-child(3),
.rehab-player[data-step="3"] .rehab-countdown span:nth-child(4){background:#0b78c6;color:#fff;transform:scale(1.08)}
.coach-figure{position:absolute;inset:72px 24px 86px;}
.coach-figure i,.coach-figure em,.coach-figure b,.coach-figure div{box-sizing:border-box}
.coach-figure .body{position:absolute;left:50%;top:50%;width:260px;height:260px;transform:translate(-50%,-50%);transition:transform .55s ease}
.coach-figure .head{position:absolute;left:104px;top:0;width:54px;height:54px;border-radius:50%;background:#ffd7b0;border:5px solid #175f93;z-index:3}
.coach-figure .torso{position:absolute;left:90px;top:58px;width:78px;height:100px;border-radius:32px 32px 24px 24px;background:#67b7e7;border:6px solid #175f93;z-index:2}
.coach-figure .arm,.coach-figure .leg{position:absolute;border-radius:999px;background:#ffd7b0;border:6px solid #175f93;transform-origin:top center;transition:transform .55s ease,left .55s ease,top .55s ease,width .55s ease,height .55s ease}
.coach-figure .foot,.coach-figure .hand,.coach-figure .finger{position:absolute;background:#ffd7b0;border:5px solid #175f93;transition:transform .55s ease,left .55s ease,top .55s ease}
.coach-figure .floor{position:absolute;left:8%;right:8%;bottom:4px;height:8px;border-radius:999px;background:#b9dbea}
.coach-figure .floor b{position:absolute;top:-18px;width:70px;height:16px;border-radius:999px;background:#d9eefb;opacity:.72}
.coach-figure .floor b:nth-child(1){left:28%}.coach-figure .floor b:nth-child(2){left:46%}.coach-figure .floor b:nth-child(3){left:64%}
.rehab-coach-caption{position:absolute;left:18px;right:18px;bottom:18px;z-index:4;display:flex;gap:12px;align-items:flex-start;padding:16px 18px;border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 10px 28px rgba(15,58,86,.13);border:1px solid rgba(255,255,255,.75)}
.rehab-coach-caption strong{flex:0 0 auto;color:#0f6eaa;font-size:18px;font-weight:950}.rehab-coach-caption span{font-size:17px;font-weight:800;color:#173344;line-height:1.45}
.coach-hand .chair{position:absolute;left:42%;top:52%;width:120px;height:110px;border:8px solid #9ec5d8;border-radius:20px;transform:translate(-50%,-20%)}
.coach-hand .table{position:absolute;left:50%;top:58%;width:370px;height:22px;border-radius:999px;background:#9ec5d8;transform:translateX(-50%)}
.coach-hand .upper{left:136px;top:88px;width:30px;height:92px;transform:rotate(-62deg)}
.coach-hand .fore{left:167px;top:124px;width:34px;height:120px;transform:rotate(-83deg)}
.coach-hand .palm{left:235px;top:156px;width:48px;height:42px;border-radius:18px}
.coach-hand .finger{width:10px;height:36px;border-radius:999px;background:#ffd7b0}
.coach-hand .f1{left:252px;top:132px}.coach-hand .f2{left:266px;top:134px}.coach-hand .f3{left:280px;top:140px}
.coach-hand .leg.left{left:104px;top:150px;width:32px;height:96px;transform:rotate(14deg)}.coach-hand .leg.right{left:152px;top:150px;width:32px;height:96px;transform:rotate(-10deg)}
.coach-hand .slide-line{position:absolute;left:50%;top:67%;width:280px;height:6px;border-radius:999px;background:linear-gradient(90deg,#b9dbea,#0b78c6,#b9dbea);transform:translateX(-50%)}
.rehab-player[data-step="1"] .coach-hand .fore{transform:rotate(-90deg) translateY(44px)}
.rehab-player[data-step="1"] .coach-hand .palm{transform:translateX(62px)}
.rehab-player[data-step="1"] .coach-hand .finger{transform:translateX(62px)}
.rehab-player[data-step="2"] .coach-hand .finger{height:48px;top:120px}.rehab-player[data-step="2"] .coach-hand .palm{transform:scaleX(1.12)}
.rehab-player[data-step="3"] .coach-hand .fore,.rehab-player[data-step="3"] .coach-hand .palm,.rehab-player[data-step="3"] .coach-hand .finger{transform:translateX(-22px)}
.coach-walking .rail{position:absolute;left:11%;right:11%;top:45%;height:14px;border-radius:999px;background:#9ec5d8;box-shadow:0 58px 0 #d9eefb}
.coach-walking .arm.support{left:64px;top:92px;width:28px;height:128px;transform:rotate(72deg)}.coach-walking .arm.free{left:160px;top:86px;width:28px;height:100px;transform:rotate(-34deg)}
.coach-walking .leg.left{left:98px;top:146px;width:34px;height:122px;transform:rotate(8deg)}.coach-walking .leg.right{left:154px;top:146px;width:34px;height:122px;transform:rotate(-8deg)}
.coach-walking .foot.left{left:80px;top:254px;width:66px;height:24px;border-radius:999px}.coach-walking .foot.right{left:146px;top:254px;width:66px;height:24px;border-radius:999px}
.rehab-player[data-step="1"] .coach-walking .body{transform:translate(-58%,-50%)}
.rehab-player[data-step="2"] .coach-walking .foot.left{transform:translateY(-24px)}.rehab-player[data-step="2"] .coach-walking .foot.right{transform:translateY(6px)}
.rehab-player[data-step="3"] .coach-walking .leg.left{transform:rotate(-28deg)}.rehab-player[data-step="3"] .coach-walking .foot.left{transform:translate(54px,-8px)}
.coach-swallow .body{height:290px}.coach-swallow .head{left:99px;top:0;width:66px;height:66px}.coach-swallow .mouth{position:absolute;left:42px;top:35px;width:22px;height:8px;border-radius:999px;background:#175f93}.coach-swallow .neck{position:absolute;left:116px;top:60px;width:36px;height:74px;border-radius:18px;background:#ffd7b0;border:5px solid #175f93}.coach-swallow .torso{left:76px;top:128px;width:112px;height:120px}.coach-swallow .throat{position:absolute;left:126px;top:72px;width:16px;height:92px;border-radius:999px;background:#80c9d6;box-shadow:0 0 0 5px rgba(128,201,214,.22)}.coach-swallow .sip{position:absolute;left:130px;top:64px;width:18px;height:18px;border-radius:50%;background:#f4ad3d;transition:top .55s ease,opacity .55s ease}.coach-swallow .swallow-path{position:absolute;left:50%;top:23%;height:180px;border-left:6px dotted #9ec5d8}.coach-swallow .swallow-path b{display:block;width:18px;height:18px;margin:22px 0 0 -12px;border-radius:50%;background:#0b78c6;opacity:.2}
.rehab-player[data-step="1"] .coach-swallow .mouth{height:16px}.rehab-player[data-step="1"] .coach-swallow .head{transform:translateX(8px)}
.rehab-player[data-step="2"] .coach-swallow .sip{top:132px}.rehab-player[data-step="2"] .coach-swallow .throat{background:#0b78c6}
.rehab-player[data-step="3"] .coach-swallow .sip{top:170px;opacity:.35}.rehab-player[data-step="3"] .coach-swallow .mouth{width:30px;background:#21835d}
@media(max-width:600px){.rehab-live-coach{min-height:380px}.coach-figure{inset:78px 8px 100px;transform:scale(.82)}.rehab-countdown{left:12px;right:12px;grid-template-columns:repeat(4,1fr)}.rehab-countdown span{min-width:0}.rehab-coach-caption{position:absolute;left:12px;right:12px;bottom:12px;display:block}.rehab-coach-caption strong{display:block;margin-bottom:4px}.rehab-coach-caption span{font-size:15px}}

/* Replace crude body drawing with photo-based coaching overlays */
.rehab-photo-coach{background:#fff;}
.rehab-coach-photo{
  position:absolute;
  inset:18px;
  width:calc(100% - 36px);
  height:calc(100% - 36px);
  object-fit:contain;
  object-position:center;
  border-radius:22px;
  background:#f8fcfe;
}
.rehab-photo-shade{
  position:absolute;
  inset:18px;
  border-radius:22px;
  background:linear-gradient(90deg,rgba(5,38,62,.45),rgba(5,38,62,.12) 48%,rgba(255,255,255,.05));
  pointer-events:none;
}
.rehab-motion-cues{
  position:absolute;
  z-index:4;
  left:28px;
  top:82px;
  display:grid;
  gap:10px;
  width:min(330px,42%);
}
.rehab-motion-cues span{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:10px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(255,255,255,.82);
  color:#12384f;
  font-weight:900;
  box-shadow:0 8px 22px rgba(14,55,84,.14);
  opacity:.72;
  transform:translateX(0);
  transition:opacity .35s ease,transform .35s ease,background .35s ease,color .35s ease;
}
.rehab-motion-cues b{
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#dbeff9;
  color:#0f6eaa;
  flex:0 0 auto;
}
.rehab-player[data-step="0"] [data-cue="0"],
.rehab-player[data-step="1"] [data-cue="1"],
.rehab-player[data-step="2"] [data-cue="2"],
.rehab-player[data-step="3"] [data-cue="3"]{
  opacity:1;
  transform:translateX(12px) scale(1.03);
  background:#0b78c6;
  color:#fff;
}
.rehab-player[data-step="0"] [data-cue="0"] b,
.rehab-player[data-step="1"] [data-cue="1"] b,
.rehab-player[data-step="2"] [data-cue="2"] b,
.rehab-player[data-step="3"] [data-cue="3"] b{background:#fff;color:#0b78c6}
.rehab-motion-arrow{
  position:absolute;
  z-index:4;
  right:12%;
  top:42%;
  width:210px;
  height:96px;
  transition:transform .45s ease,opacity .35s ease;
}
.rehab-motion-arrow i{
  position:absolute;
  height:12px;
  border-radius:999px;
  background:#0b78c6;
  box-shadow:0 8px 20px rgba(11,120,198,.25);
}
.rehab-motion-arrow i:nth-child(1){left:0;right:28px;top:42px}
.rehab-motion-arrow i:nth-child(2){right:22px;top:26px;width:48px;transform:rotate(36deg);transform-origin:right center}
.rehab-motion-arrow i:nth-child(3){right:22px;top:58px;width:48px;transform:rotate(-36deg);transform-origin:right center}
.rehab-player[data-step="0"] .rehab-motion-arrow{opacity:.55;transform:translateX(-16px) scale(.92)}
.rehab-player[data-step="1"] .rehab-motion-arrow{opacity:1;transform:translateX(18px)}
.rehab-player[data-step="2"] .rehab-motion-arrow{opacity:1;transform:translateY(-28px) rotate(-18deg)}
.rehab-player[data-step="3"] .rehab-motion-arrow{opacity:.9;transform:translateX(-20px) rotate(180deg)}
.rehab-scene-walking .rehab-motion-arrow{right:16%;top:58%;transform:rotate(8deg)}
.rehab-scene-swallow .rehab-motion-arrow{right:18%;top:34%;width:120px;transform:rotate(90deg)}
.rehab-photo-coach .coach-figure{display:none!important}
@media(max-width:600px){
  .rehab-motion-cues{left:14px;right:14px;top:74px;width:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .rehab-motion-cues span{min-height:42px;padding:8px 9px;font-size:13px}
  .rehab-motion-cues b{width:24px;height:24px}
  .rehab-motion-arrow{right:8%;top:45%;width:128px;height:70px}
  .rehab-coach-photo,.rehab-photo-shade{inset:12px;width:calc(100% - 24px);height:calc(100% - 24px)}
}

/* Cleaner rehab coach layout: keep photo visible, move steps out of the image */
.rehab-photo-coach{
  display:grid;
  grid-template-columns:minmax(280px,1.15fr) minmax(220px,.85fr);
  gap:18px;
  align-items:stretch;
  padding:18px;
  min-height:430px;
  background:linear-gradient(135deg,#f7fcff 0%,#edf7fc 100%);
}
.rehab-coach-photo{
  position:relative;
  inset:auto;
  width:100%;
  height:100%;
  min-height:330px;
  grid-column:1;
  grid-row:1 / span 3;
  object-fit:contain;
  object-position:center;
  border:1px solid #d5e8f0;
  box-shadow:0 16px 34px rgba(14,55,84,.12);
}
.rehab-photo-shade{
  display:none;
}
.rehab-countdown{
  position:relative;
  top:auto;
  left:auto;
  z-index:5;
  grid-column:2;
  grid-row:1;
  align-self:start;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.rehab-countdown span{
  min-width:0;
}
.rehab-motion-cues{
  position:relative;
  z-index:4;
  left:auto;
  top:auto;
  width:auto;
  grid-column:2;
  grid-row:2;
  align-self:center;
}
.rehab-motion-cues span{
  min-height:58px;
  background:#fff;
  opacity:1;
}
.rehab-player[data-step="0"] [data-cue="0"],
.rehab-player[data-step="1"] [data-cue="1"],
.rehab-player[data-step="2"] [data-cue="2"],
.rehab-player[data-step="3"] [data-cue="3"]{
  transform:translateX(0) scale(1.02);
}
.rehab-motion-arrow{
  z-index:5;
  right:auto;
  top:auto;
  left:calc(48% - 105px);
  bottom:92px;
  width:190px;
  height:82px;
  opacity:.95;
}
.rehab-scene-walking .rehab-motion-arrow,
.rehab-scene-swallow .rehab-motion-arrow{
  right:auto;
  left:calc(48% - 80px);
  top:auto;
  bottom:92px;
}
.rehab-coach-caption{
  position:relative;
  left:auto;
  right:auto;
  bottom:auto;
  z-index:4;
  grid-column:2;
  grid-row:3;
  display:block;
  padding:16px;
}
.rehab-coach-caption strong{
  display:block;
  margin-bottom:6px;
}
.rehab-coach-caption span{
  font-size:16px;
}
@media(max-width:760px){
  .rehab-photo-coach{
    grid-template-columns:1fr;
    min-height:0;
  }
  .rehab-coach-photo{
    grid-column:1;
    grid-row:2;
    min-height:260px;
    height:280px;
  }
  .rehab-countdown{
    grid-column:1;
    grid-row:1;
  }
  .rehab-motion-cues{
    grid-column:1;
    grid-row:3;
    grid-template-columns:1fr;
  }
  .rehab-coach-caption{
    grid-column:1;
    grid-row:4;
  }
  .rehab-motion-arrow{
    left:auto;
    right:28px;
    bottom:210px;
    width:126px;
    transform:scale(.86);
  }
}

/* Four-frame rehab image coach: each step shows a different generated picture */
.rehab-frame-coach{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  padding:18px;
  background:linear-gradient(135deg,#f7fcff 0%,#edf7fc 100%);
}
.rehab-step-viewport{
  position:relative;
  overflow:hidden;
  width:100%;
  min-height:370px;
  border:1px solid #d5e8f0;
  border-radius:22px;
  background:#fff;
  box-shadow:0 16px 34px rgba(14,55,84,.12);
}
.rehab-step-strip{
  display:block;
  width:400%;
  height:370px;
  max-width:none;
  object-fit:cover;
  object-position:left center;
  transform:translateX(0);
  transition:transform .55s ease;
}
.rehab-player[data-step="0"] .rehab-step-strip{transform:translateX(0)}
.rehab-player[data-step="1"] .rehab-step-strip{transform:translateX(-25%)}
.rehab-player[data-step="2"] .rehab-step-strip{transform:translateX(-50%)}
.rehab-player[data-step="3"] .rehab-step-strip{transform:translateX(-75%)}
.rehab-frame-coach .rehab-countdown{
  position:relative;
  top:auto;
  left:auto;
  z-index:5;
  grid-template-columns:repeat(4,minmax(0,1fr));
  width:min(520px,100%);
}
.rehab-frame-coach .rehab-coach-caption{
  position:relative;
  left:auto;
  right:auto;
  bottom:auto;
  display:block;
  padding:15px 17px;
}
.rehab-frame-coach .rehab-coach-caption strong{display:block;margin-bottom:4px}
.rehab-frame-coach .rehab-coach-caption span{font-size:16px}
.rehab-frame-coach .rehab-coach-photo,
.rehab-frame-coach .rehab-photo-shade,
.rehab-frame-coach .rehab-motion-cues,
.rehab-frame-coach .rehab-motion-arrow,
.rehab-frame-coach .coach-figure{display:none!important}
@media(max-width:760px){
  .rehab-frame-coach{padding:12px;gap:10px}
  .rehab-step-viewport{min-height:270px}
  .rehab-step-strip{height:270px}
}
@media(max-width:420px){
  .rehab-step-viewport{min-height:230px}
  .rehab-step-strip{height:230px}
}

.rehab-scene-demo .rehab-step-viewport{
  min-height:370px;
  height:370px;
}
.rehab-scene-demo .rehab-step-strip{
  display:block;
  width:400% !important;
  max-width:none !important;
  height:100% !important;
  min-height:0 !important;
  object-fit:cover !important;
  object-position:left center !important;
  border-radius:0 !important;
  background:#fff !important;
}
@media(max-width:760px){
  .rehab-scene-demo .rehab-step-viewport{min-height:270px;height:270px}
}
@media(max-width:420px){
  .rehab-scene-demo .rehab-step-viewport{min-height:230px;height:230px}
}

.rehab-frame-coach{
  grid-template-columns:1fr !important;
}
.rehab-frame-coach .rehab-countdown,
.rehab-frame-coach .rehab-step-viewport,
.rehab-frame-coach .rehab-coach-caption{
  grid-column:1 / -1 !important;
  width:100% !important;
}
.rehab-scene-demo .rehab-step-viewport{
  height:430px;
  min-height:430px;
}
.rehab-scene-demo .rehab-step-strip{
  height:430px !important;
}
@media(max-width:760px){
  .rehab-scene-demo .rehab-step-viewport{height:320px;min-height:320px}
  .rehab-scene-demo .rehab-step-strip{height:320px!important}
}
@media(max-width:420px){
  .rehab-scene-demo .rehab-step-viewport{height:280px;min-height:280px}
  .rehab-scene-demo .rehab-step-strip{height:280px!important}
}

/* Independent four-picture rehab coach frames */
.rehab-step-viewport{
  background:#eef8fc;
}
.rehab-step-frame{
  position:absolute;
  inset:0;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:contain !important;
  object-position:center center !important;
  border-radius:22px !important;
  background:#f8fcfe !important;
  opacity:0;
  transform:scale(.985);
  transition:opacity .28s ease, transform .28s ease;
}
.rehab-player[data-step="0"] .rehab-step-frame[data-frame="0"],
.rehab-player[data-step="1"] .rehab-step-frame[data-frame="1"],
.rehab-player[data-step="2"] .rehab-step-frame[data-frame="2"],
.rehab-player[data-step="3"] .rehab-step-frame[data-frame="3"]{
  opacity:1;
  transform:scale(1);
}
.rehab-step-strip{display:none!important}

/* Make portrait rehabilitation frames feel intentional, not squeezed */
.rehab-frame-coach .rehab-step-viewport{
  background:radial-gradient(circle at 50% 40%, #ffffff 0 42%, #eef8fc 43% 100%);
}
.rehab-step-frame{
  object-fit:contain !important;
  padding:0 !important;
}
@media(min-width:900px){
  .rehab-main-grid{
    grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  }
  .rehab-scene-demo .rehab-step-viewport{
    height:520px;
    min-height:520px;
  }
}

.rehab-switch{
  margin:26px 0;
  padding:22px;
  border:1px solid #d7edf6;
  border-radius:26px;
  background:linear-gradient(135deg,#f8fcff,#eef8fc);
  box-shadow:0 14px 32px rgba(23,91,126,.08);
}
.rehab-switch .section-head{
  margin-bottom:14px;
}
.rehab-switch .section-head h2{
  margin:4px 0 0;
  font-size:24px;
  letter-spacing:-.5px;
}
.rehab-switch-rail{
  display:grid;
  grid-template-columns:repeat(3,minmax(220px,1fr));
  gap:14px;
}
.rehab-switch-rail a{
  position:relative;
  display:grid;
  min-height:128px;
  gap:8px;
  align-content:start;
  padding:20px 22px;
  border:1px solid #cce7f2;
  border-radius:22px;
  background:#fff;
  color:#123a55;
  text-decoration:none;
  box-shadow:0 10px 22px rgba(15,73,104,.06);
}
.rehab-switch-rail a:nth-child(2){background:#f4fff8;border-color:#cfeee0}
.rehab-switch-rail a:nth-child(3){background:#fbf8ff;border-color:#dfd3f5}
.rehab-switch-rail a.is-current{
  outline:3px solid rgba(14,123,199,.18);
  border-color:#1381cf;
}
.rehab-switch-rail strong{
  font-size:21px;
  font-weight:900;
  letter-spacing:-.4px;
}
.rehab-switch-rail span{
  color:#486577;
  font-size:16px;
  line-height:1.5;
}
.rehab-switch-rail b{
  margin-top:auto;
  color:#0878c8;
  font-size:15px;
}
@media(max-width:760px){
  .rehab-switch{padding:16px;margin:22px 0}
  .rehab-switch .section-head h2{font-size:21px}
  .rehab-switch-rail{
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    padding-bottom:8px;
  }
  .rehab-switch-rail a{
    flex:0 0 82%;
    scroll-snap-align:start;
    min-height:134px;
  }
}
