/* Body page · right arc nav (even spacing) + dock */

.body-orb-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Even vertical stack with a soft right-edge curve */
.body-orb-nav__arc {
  position: absolute;
  top: 8%;
  bottom: 8%;
  right: 0.65rem;
  width: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.body-orb-nav__arc::before {
  content: '';
  position: absolute;
  top: 4%;
  bottom: 4%;
  right: 1.5rem;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(200, 255, 58, 0.55) 14%,
    rgba(0, 210, 255, 0.45) 50%,
    rgba(255, 110, 199, 0.4) 86%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
  pointer-events: none;
}

.body-orb {
  --orb-pct: 0;
  --orb-shift: 0rem;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: right;
  transform: translateX(var(--orb-shift));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.body-orb:hover,
.body-orb:focus-visible {
  transform: translateX(calc(var(--orb-shift) - 0.2rem)) scale(1.04);
  outline: none;
}

.body-orb--active .body-orb__disc {
  background: rgba(0, 210, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(200, 255, 58, 0.9),
    0 0 18px rgba(0, 210, 255, 0.35);
}

/* Soft arc · outer items tuck left toward the body */
.body-orb--sleep { --orb-shift: -1.35rem; }
.body-orb--food { --orb-shift: -0.45rem; }
.body-orb--drink { --orb-shift: 0; }
.body-orb--move { --orb-shift: -0.45rem; }
.body-orb--plan { --orb-shift: -1.35rem; }

.body-orb__disc {
  position: relative;
  flex: 0 0 auto;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: rgba(36, 40, 52, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.body-orb__ring {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background:
    conic-gradient(
      rgba(255, 255, 255, 0.85) calc(var(--orb-pct) * 1%),
      transparent 0
    );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  opacity: 0.45;
}

.body-orb__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
}

.body-orb__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.body-orb__label {
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.body-orb__check {
  position: absolute;
  top: -0.12rem;
  right: -0.12rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #1a1e28;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.body-orb-dock {
  position: relative;
  margin-top: 0.75rem;
  padding: 1rem 1.05rem 1.1rem;
  animation: body-orb-dock-in 0.28s ease;
  z-index: 3;
}

.body-orb-dock[hidden] {
  display: none !important;
}

.body-orb-dock__close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--body-muted, rgba(170, 180, 220, 0.7));
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.body-orb-dock__close:hover,
.body-orb-dock__close:focus-visible {
  color: var(--body-text, #eef);
  outline: none;
}

.body-orb-dock__head {
  margin: 0 1.5rem 0.75rem 0;
}

.body-orb-dock__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--body-text, #eef);
}

.body-orb-dock__lead {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--body-muted, rgba(170, 180, 220, 0.7));
}

.body-orb-dock .behavior-panel__head {
  display: none;
}

.body-orb-dock__panel--focus-food .behavior-form > :not(.behavior-group--diet),
.body-orb-dock__panel--focus-drink .behavior-form > :not(.behavior-field--water),
.body-orb-dock__panel--focus-move .behavior-form > :not(.behavior-group--exercise) {
  display: none !important;
}

body.theme-day .body-orb__disc {
  background: #1e293b;
  box-shadow:
    0 0 0 2px rgba(14, 116, 144, 0.55),
    0 4px 14px rgba(15, 23, 42, 0.18);
}

body.theme-day .body-os-orbs .body-orb__disc {
  background: #0f172a;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.85),
    0 3px 10px rgba(15, 23, 42, 0.22);
}

body.theme-day .body-orb__label {
  color: #0f172a !important;
  text-shadow: none;
  font-weight: 650;
}

body.theme-day .body-os-orbs .body-orb-nav__arc::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(14, 116, 144, 0.45) 14%,
    rgba(15, 118, 110, 0.4) 50%,
    rgba(190, 24, 93, 0.35) 86%,
    transparent 100%
  );
  box-shadow: none;
}

body.theme-day .body-os-orbs .body-orb__icon,
body.theme-day .body-os-orbs .body-orb__icon span {
  color: #f8fafc !important;
}

body.theme-day .body-os-orbs .body-orb__icon svg {
  stroke: #f8fafc;
  fill: none;
}

body.theme-day .body-os-orbs .body-orb--active .body-orb__disc {
  background: #0f766e;
  box-shadow:
    0 0 0 2px rgba(200, 255, 58, 0.85),
    0 0 16px rgba(0, 210, 255, 0.25);
}

@keyframes body-orb-dock-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .body-orb-nav__arc {
    top: auto;
    bottom: 0.65rem;
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .body-orb-nav__arc::before {
    display: none;
  }

  .body-orb {
    --orb-shift: 0 !important;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .body-orb:hover,
  .body-orb:focus-visible {
    transform: scale(1.04);
  }

  .body-orb__disc {
    width: 2.65rem;
    height: 2.65rem;
  }

  .body-orb__label {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .body-orb,
  .body-orb-dock {
    transition: none;
    animation: none;
  }
}
