.pill {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 48px;
  background: #111;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: width 0.3s ease;
}

.pill.open { width: 190px; }

.pill-toggle {
  flex-shrink: 0;
  align-self: flex-start;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.pill-toggle span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.pill.open .pill-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pill.open .pill-toggle span:nth-child(2) { opacity: 0; }
.pill.open .pill-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.pill-links {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}

.pill.open .pill-links {
  max-height: 400px;
  opacity: 1;
  padding-bottom: 0.6rem;
}

.pill-links a {
  display: block;
  margin: 0 0.5rem;
  padding: 0.6rem 1rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  border-radius: 999px;
}

.pill-links a:hover { background: rgba(255, 255, 255, 0.15); }