.motion-calibration-coach {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 38%, rgba(62, 197, 255, .14), transparent 36%),
    rgba(2, 8, 16, .82);
  backdrop-filter: blur(12px) saturate(1.16);
  color: var(--ink, #f7fbff);
}

.motion-calibration-coach.hidden { display: none !important; }

.motion-coach-card {
  width: min(720px, 96vw);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid rgba(104, 226, 255, .38);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 28px);
  background:
    linear-gradient(145deg, rgba(8, 28, 43, .98), rgba(4, 13, 24, .98)),
    #071622;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .62), 0 0 42px rgba(73, 199, 255, .11);
}

.motion-coach-eyebrow {
  color: #73e8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.motion-coach-card h2 {
  margin: 7px 0 8px;
  font-size: clamp(25px, 5vw, 42px);
  line-height: 1.03;
}

.motion-coach-card > p {
  max-width: 62ch;
  margin: 0 auto 13px 0;
  color: #c2d5e3;
  font-size: 13px;
  line-height: 1.52;
}

.motion-horizon-visual {
  display: grid;
  grid-template-columns: 150px minmax(170px, 1fr);
  align-items: center;
  gap: 24px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 14px;
  background:
    linear-gradient(rgba(104, 226, 255, .03), rgba(128, 80, 255, .04)),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(104, 226, 255, .045) 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(104, 226, 255, .045) 20px);
}

.motion-horizon-ring {
  position: relative;
  width: 126px;
  height: 126px;
  margin: auto;
  border: 1px solid rgba(104, 226, 255, .42);
  border-radius: 50%;
  box-shadow: inset 0 0 25px rgba(104, 226, 255, .08), 0 0 24px rgba(104, 226, 255, .07);
}

.motion-horizon-ring::before,
.motion-horizon-ring::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .23);
}
.motion-horizon-ring::before { left: 8px; right: 8px; top: 50%; height: 1px; }
.motion-horizon-ring::after { top: 8px; bottom: 8px; left: 50%; width: 1px; }
.motion-horizon-ring b {
  position: absolute;
  inset: 25px;
  border: 1px solid rgba(255, 209, 102, .22);
  border-radius: 50%;
}
.motion-horizon-ring i {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  background: #62dfff;
  box-shadow: 0 0 16px rgba(98, 223, 255, .85);
  transform: translate(-50%, -50%);
  transition: transform 55ms linear;
}

.motion-device-silhouette {
  position: relative;
  width: min(310px, 100%);
  aspect-ratio: 2 / 1;
  margin: auto;
  border: 2px solid rgba(255, 255, 255, .32);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% 55%, rgba(104, 226, 255, .18), transparent 25%),
    linear-gradient(145deg, rgba(13, 43, 65, .82), rgba(4, 15, 26, .9));
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .24);
}
.motion-device-silhouette::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  transform: translateX(-50%);
}
.motion-device-silhouette span {
  position: absolute;
  left: 50%;
  top: 18px;
  color: #ffd166;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  transform: translateX(-50%);
}
.motion-device-silhouette i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #68e2ff, transparent);
  box-shadow: 0 0 9px rgba(104, 226, 255, .5);
  transform: translate(-50%, -50%);
}

.motion-coach-live {
  min-height: 36px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 9px;
  background: rgba(0, 0, 0, .18);
  color: #d9f5ff;
  font: 700 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.motion-coach-progress {
  height: 4px;
  overflow: hidden;
  margin: 11px 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}
.motion-coach-progress i {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55dfff, #8f6dff, #ffd166);
  box-shadow: 0 0 12px rgba(104, 226, 255, .55);
  transition: width 220ms ease;
}

.motion-coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.motion-coach-actions button {
  min-height: 44px;
  padding: 10px 14px;
}
.motion-coach-card > small {
  display: block;
  margin-top: 11px;
  color: rgba(200, 220, 234, .65);
  font-size: 9px;
  line-height: 1.45;
}

.motion-v702-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 9px 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(104, 226, 255, .18);
  border-radius: 10px;
  background: rgba(104, 226, 255, .045);
}
.motion-v702-block > div { min-width: 0; }
.motion-v702-block span,
.motion-v702-block strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.motion-v702-block span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.motion-v702-block strong { margin-top: 2px; color: #dff8ff; font-size: 10px; }
.motion-v702-block button { min-height: 38px; padding: 7px 10px; font-size: 9px; }

@media (max-width: 720px) {
  .motion-horizon-visual { grid-template-columns: 104px minmax(150px, 1fr); gap: 12px; padding: 10px; }
  .motion-horizon-ring { width: 92px; height: 92px; }
  .motion-v702-block { grid-template-columns: 1fr; }
  .motion-v702-block button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 470px) {
  .motion-calibration-coach { place-items: stretch center; padding: 5px max(8px, env(safe-area-inset-right)) 5px max(8px, env(safe-area-inset-left)); }
  .motion-coach-card { width: min(940px, 99vw); max-height: calc(100dvh - 10px); padding: 10px 14px; }
  .motion-coach-card h2 { margin: 3px 0 4px; font-size: 24px; }
  .motion-coach-card > p { margin-bottom: 6px; font-size: 11px; }
  .motion-horizon-visual { float: left; width: 44%; grid-template-columns: 90px 1fr; margin: 5px 12px 5px 0; padding: 6px; }
  .motion-horizon-ring { width: 78px; height: 78px; }
  .motion-coach-live { min-height: 29px; padding: 6px 8px; font-size: 9px; }
  .motion-coach-progress { margin: 7px 0 8px; }
  .motion-coach-actions button { min-height: 38px; padding: 7px 10px; font-size: 9px; }
  .motion-coach-card > small { margin-top: 7px; }
}
